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.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om