Math.clz32

Returns the number of leading zero bits in the 32-bit binary representation of a number.

Syntax

clz32(value)

Parameters

Return value

A number of leading zero bits.

Examples

Math.clz32(0b00000000001111111111111111111111)
10
Math.clz32(4194303)
10