fxbit_count


fxbit_count(fx)
      

Return the number of bits set in the two's complement representation of the fixnum fx.

For negative inputs, fxbit_count will return a negative number whose magnitude is one greater than the number of bits not set in fx.

Examples:


fxbit_count(5)
// 2
fxbit_count(-5)
// -2
      

Also see:

fxbit_is_set
fxlength
fxshift


Core Module Index | Contents