Function list
Quote
tobits (n)
n - number to convert to binary/bits
returns a table of bits
BitOp (n, n2, bits, c)
n - first number
n2 second number
bits - max bits (default 8 (1 byte/octet))
c - bitop function to use (default and)
performs c on each bit in n and n2
NOT (n)
n - number
returns n except with the bits negated
LSHIFT (n, s)
n - number
s - number of shifts (default 1)
shifts each bit in n to the left s times
RSHIFT (n, s)
n - number
s - number of shifts (default 1)
shifts each bit in n to the right s times
n - number to convert to binary/bits
returns a table of bits
BitOp (n, n2, bits, c)
n - first number
n2 second number
bits - max bits (default 8 (1 byte/octet))
c - bitop function to use (default and)
performs c on each bit in n and n2
NOT (n)
n - number
returns n except with the bits negated
LSHIFT (n, s)
n - number
s - number of shifts (default 1)
shifts each bit in n to the left s times
RSHIFT (n, s)
n - number
s - number of shifts (default 1)
shifts each bit in n to the right s times
BitOp functions
Use these as the c parameter of BitOp
Quote
bitop_or perform or on the bits
bitop_xor perform exclusive or on the bits
bitop_and perform and on the bits
bitop_xor perform exclusive or on the bits
bitop_and perform and on the bits
Source
edited 1×, last 26.04.11 02:07:47 am