i32.ctz
Pops an i32 value off the stack, counts the number of trailing zero bits on the right, and then pushes the result back on to the stack. This is the number of 0 bits at the lower end of the binary number (0b01100100 has 2 trailing zeros).

Syntax

i32.ctz

Stack In

i32 The value to workout the trailing 0 bits for.

Stack Out

i32 The number of trailing 0 bits the value has.

Example

;; Push the i32 value 0x12AB4400 onto the stack
i32.const 0x12AB4400

;; Pop the i32 value off the stack, count the number of trailing zeros
;; and push the result back onto the stack
i32.ctz

;; The stack contains an i32 value of 8