BigIntegerStatic: TestBit

TestBit

Tests a specific bit in the BigInteger number to determine if it is set (1) or not (0).



 Public Function TestBit(
	  ByVal x As BigInteger,
	  ByVal bit As Long ) As Boolean

Parameters

x
[ByVal] BigInteger. The BigInteger number to test the bit of.
bit
[ByVal] Long. The bit to be tested.

Return Values

Boolean -  Returns True if the bit is set (1), false if it is not (0).

Remarks

The max value for bit is 2147483647. If the bit value is larger than the BigInteger instance, then the sign of the number is used. This will represent a negative number with infinite sign extension bits.

Values of Nothing will be treated as zero.

See Also

Project VBCorLib Overview Class BigIntegerStatic Overview BigIntegerStatic Properties BigIntegerStatic Methods Ten (get) ToString