메소드 | 설명 | |
---|---|---|
ClearLeast ( uint num ) : uint |
Clear the least significant bit that is set and return the result.
|
|
Count ( uint num ) : int |
Returns the number of 1 bits in an unsigned integer. Counts bits by divide-and-conquer method, first computing 16 2-bit counts, then 8 4-bit counts, then 4 8-bit counts, then 2 16-bit counts, and finally 1 32-bit count.
|
|
ExactlyOne ( uint num ) : bool |
Returns true if the unsigned integer has exactly one bit set.
|
|
LeastPosition ( uint num ) : int |
Compute the 1-based position of the least sigificant bit that is set, and return it (return 0 if no bits are set). (e.g. 0x1001100 will return 3, since the 3rd bit is set).
|
|
MoreThanOne ( uint num ) : bool |
Returns true if the unsigned integer has more than one bit set.
|