Path: blob/main/files/en-us/webassembly/reference/numeric/division/index.md
6516 views
------{{WebAssemblySidebar}}
The div instructions, short for division, are used for dividing one number by another, similar to the / operator in other languages.
{{EmbedInteractiveExample("pages/wat/div.html", "tabbed-taller")}}
Syntax
| Instruction | Binary opcode |
|---|---|
i32.div_s | 0x6d |
i32.div_u | 0x6e |
i64.div_s | 0x7f |
i64.div_u | 0x80 |
f32.div | 0x95 |
f64.div | 0xa3 |