Toggle navigation
Hot Examples
EN
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
C#
PHP
C#
Java
Go
C++
Python
JS
TS
Search
Home
GSF
BitMath
CountLeadingOnes
GSF.BitMath.CountLeadingOnes C# (CSharp) Method
BitMath Class Documentation
Show file
Open project: GridProtectionAlliance/gsf
CountLeadingOnes()
public
static
method
Counts the number of consecutive 1's starting from the highest bit working down.
public
static
CountLeadingOnes
(
uint
value
) :
int
value
uint
return
int
public static int CountLeadingOnes(uint value) { return CountLeadingZeros(~value); }
Same methods
BitMath::
CountLeadingOnes
(
ulong
value
) :
int
BitMath
CountBitsCleared
CountBitsSet
CountLeadingOnes
CountLeadingZeros
CountTrailingOnes
CountTrailingZeros
CreateBitMask
GetClearedBitPositions
GetSetBitPositions
IsPowerOfTwo
RoundDownToNearestPowerOfTwo
RoundUpToNearestPowerOfTwo