BigInteger.GetBitLength Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the number of bits required for shortest two's complement representation of the current instance without the sign bit.
public:
long GetBitLength();
public long GetBitLength ();
member this.GetBitLength : unit -> int64
Public Function GetBitLength () As Long
Returns
The minimum non-negative number of bits in two's complement notation without the sign bit.
Remarks
This method returns 0 if the value of current object is equal to Zero or MinusOne. For positive integers the return value is equal to the ordinary binary representation string length.