Bit

To Bit

int bit.tobit(int num)

Returns the input as a bit number? (in my testing it just returns the number without a decimal)

Binary NOT

int bit.bnot(int num)

Performs a bitwise NOT operation on the input.

Binary AND

int bit.band(int n1, int n2)

Performs a bitwise AND operation on the given inputs.

Binary OR

int bit.bor(int n1, int n2)

Performs a wise OR operation on the given inputs.

Binary xor

int bit.bxor(int n1, int n2)

Performs a bitwise XOR operation on the given inputs.

Binary Left Shift

int bit.lshift(int num, int ShiftAmount)

Shifts the input left by the given amount.

Binary Right Shift

int bit.rshift(int num, int ShiftAmount)

Shifts the input right by the given amount.

Arithmetic Right Shift

int bit.arshift(int num, int ShiftAmount)

Performs a arithmetic right shift on the given input by the given amount.

Binary Rotate Left

int bit.rol(int num, int ShiftAmount)

Circular shifts the input left by the given amount.

Binary Rotate Right

int bit.ror(int num, int ShiftAmount)

Circular shifts the input right by the given amount.

Binary Swap

int bit.bswap(int num)

Performs a byte swap on the given input. (basically reverses the bits).

To Hex

string bit.tohex(int num)

Returns the input as a hexadecimal string.