C# Class LitDev.LDBits

Mostrar archivo Open project: litdev1/LitDev

Public Methods

Method Description
AndBits ( Primitive var1, Primitive var2 ) : Primitive

Logically And 2 numbers.

GetBit ( Primitive var, Primitive bit ) : Primitive

Get the bit value in a number.

GetBits ( Primitive var ) : Primitive

Get an array of bit values.

Not ( Primitive var ) : Primitive

Logically Not a number.

OrBits ( Primitive var1, Primitive var2 ) : Primitive

Logically Or 2 numbers.

SetBit ( Primitive var, Primitive bit ) : Primitive

Set a bit in a number.

UnsetBit ( Primitive var, Primitive bit ) : Primitive

Unset a bit in a number.

XOrBits ( Primitive var1, Primitive var2 ) : Primitive

Logically XOr 2 numbers.

Method Details

AndBits() public static method

Logically And 2 numbers.
public static AndBits ( Primitive var1, Primitive var2 ) : Primitive
var1 Primitive The first number.
var2 Primitive The second number.
return Primitive

GetBit() public static method

Get the bit value in a number.
public static GetBit ( Primitive var, Primitive bit ) : Primitive
var Primitive The number to test.
bit Primitive A bit to test (1 to 32).
return Primitive

GetBits() public static method

Get an array of bit values.
public static GetBits ( Primitive var ) : Primitive
var Primitive The number to get the bits.
return Primitive

Not() public static method

Logically Not a number.
public static Not ( Primitive var ) : Primitive
var Primitive The number to Not.
return Primitive

OrBits() public static method

Logically Or 2 numbers.
public static OrBits ( Primitive var1, Primitive var2 ) : Primitive
var1 Primitive The first number.
var2 Primitive The second number.
return Primitive

SetBit() public static method

Set a bit in a number.
public static SetBit ( Primitive var, Primitive bit ) : Primitive
var Primitive The number to set the bit.
bit Primitive A bit to set (1 to 32).
return Primitive

UnsetBit() public static method

Unset a bit in a number.
public static UnsetBit ( Primitive var, Primitive bit ) : Primitive
var Primitive The number to unset the bit.
bit Primitive A bit to unset (1 to 32).
return Primitive

XOrBits() public static method

Logically XOr 2 numbers.
public static XOrBits ( Primitive var1, Primitive var2 ) : Primitive
var1 Primitive The first number.
var2 Primitive The second number.
return Primitive