leadingZeroes()
Purpose
Find the number of leading zeroes in a binary number
Description
Find the number of leading zeroes in a 64 bit binary number
Syntax
result = leadingZeroes( value )
Arguments
value The number to find the number of leading zeroes in
result The number of leading zeroes in value
Example
for i = 0 to 16 loop
j = pow( 2, i )
printAt( 0, i, int( j ), " ", leadingZeroes( j ) )
update()
repeat
sleep( 3 )
Associated Commands
bitCount(), bitGet(), bitSet(), bitFieldExtract(), bitFieldInsert(), trailingZeroes()