Click or drag to resize

BitMathCountLeadingZeros(UInt64) Method

Counts the number of consecutive 0's starting from the highest bit working down.

Namespace: GSF
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.313-beta+5fa9ed2a8819cbb219f1e178bdad6a8d23dec2ce
Syntax
public static int CountLeadingZeros(
	ulong value
)
View Source

Parameters

value  UInt64
 

Return Value

Int32
Remarks
Unfortunately, c# cannot call the cpu instruction clz Example from http://en.wikipedia.org/wiki/Find_first_set
See Also