C# Class GitSharp.Core.Util.Int32Extensions

Show file Open project: stschake/GitSharp

Public Methods

Method Description
BitCount ( this n ) : int

computes the number of 1 bits in the two's complement binary representation of the integer

LowestOneBit ( this n ) : int

Returns the number of zero bits preceding the highest-order ("leftmost") one-bit in the two's complement binary representation of the specified int value. Returns 32 if the specified value has no one-bits in its two's complement representation, in other words if it is equal to zero.

NumberOfTrailingZeros ( this n ) : int

computes the number of 0 bits to the right of the first 1

Method Details

BitCount() public static method

computes the number of 1 bits in the two's complement binary representation of the integer
public static BitCount ( this n ) : int
n this
return int

LowestOneBit() public static method

Returns the number of zero bits preceding the highest-order ("leftmost") one-bit in the two's complement binary representation of the specified int value. Returns 32 if the specified value has no one-bits in its two's complement representation, in other words if it is equal to zero.
public static LowestOneBit ( this n ) : int
n this
return int

NumberOfTrailingZeros() public static method

computes the number of 0 bits to the right of the first 1
public static NumberOfTrailingZeros ( this n ) : int
n this
return int