Click or drag to resize

BitMathCountLeadingZeros(UInt32) 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.250-beta+e1aac152bf9c38c67035c6d283461f222e39e02a
Syntax
public static int CountLeadingZeros(
	uint value
)
View Source

Parameters

value  UInt32

Return Value

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