C# 클래스 BooRunner.Tools.Bits

Contains helping methods to with with bits in dword (UInt32).
파일 보기 프로젝트 열기: juanplopes/euler

공개 메소드들

메소드 설명
CeilLog2 ( uint x ) : int

Ceil(Log2(x)).

Msb ( uint x ) : int

Counts position of the most significant bit in int. Can also be used as Floor(Log2(x)).

Nlz ( uint x ) : int

Returns number of leading zero bits in int.

메소드 상세

CeilLog2() 공개 정적인 메소드

Ceil(Log2(x)).
public static CeilLog2 ( uint x ) : int
x uint Int value.
리턴 int

Msb() 공개 정적인 메소드

Counts position of the most significant bit in int. Can also be used as Floor(Log2(x)).
public static Msb ( uint x ) : int
x uint Int value.
리턴 int

Nlz() 공개 정적인 메소드

Returns number of leading zero bits in int.
public static Nlz ( uint x ) : int
x uint Int value.
리턴 int