Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mohamedkhallouq
GitHub Repository: mohamedkhallouq/content
Path: blob/main/files/en-us/webassembly/reference/numeric/multiplication/index.md
6517 views
---
title: Multiplication slug: WebAssembly/Reference/Numeric/Multiplication
---

{{WebAssemblySidebar}}

The mul instructions, short for multiplication, are used for multiplying one number by another number, similar to the * operator in other languages.

{{EmbedInteractiveExample("pages/wat/mul.html", "tabbed-taller")}}

Syntax

;; load two numbers onto the stack i32.const 10 i32.const 3 ;; multiply one number by the other i32.mul ;; the top item on the stack will now be 30 (10 * 3 = 30)
InstructionBinary opcode
i32.mul0x6c
i64.mul0x7e
f32.mul0x94
f64.mul0xa2