Path: blob/main/files/en-us/webassembly/reference/numeric/count_leading_zeros/index.md
6537 views
------{{WebAssemblySidebar}}
The clz instructions, short for count leading zeros, are used to count the amount of zeros at the start of the numbers binary representation.
{{EmbedInteractiveExample("pages/wat/clz.html", "tabbed-taller")}}
Syntax
| Instruction | Binary opcode |
|---|---|
i32.clz | 0x67 |
i64.clz | 0x79 |