blength


blength(i)
      

Return the number of bits set in the integer i.

Returns the number of bits of the smallest two's complement representation of i, not including the sign bit for negative numbers.

Examples:


blength(5)
// 3
      

Also see:

bit_count


Core Module Index | Contents