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