Partager via


Long.NumberOfLeadingZeros(Int64) Method

Definition

Returns the number of zero bits preceding the highest-order ("leftmost") one-bit in the two's complement binary representation of the specified long value.

[Android.Runtime.Register("numberOfLeadingZeros", "(J)I", "")]
public static int NumberOfLeadingZeros (long i);
[<Android.Runtime.Register("numberOfLeadingZeros", "(J)I", "")>]
static member NumberOfLeadingZeros : int64 -> int

Parameters

i
Int64

the value whose number of leading zeros is to be computed

Returns

the number of zero bits preceding the highest-order ("leftmost") one-bit in the two's complement binary representation of the specified long value, or 64 if the value is equal to zero.

Attributes

Remarks

Java documentation for java.lang.Long.numberOfLeadingZeros(long).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to