return to top
source
testBit m n returns whether the (n+1) least significant bit is 1 or 0, using the two's complement convention for negative m.
testBit m n
(n+1)
1
0
m
Construct an integer from a sequence of bits using little endian convention.
The sign is determined using the two's complement convention: the result is negative if and only if n > 0 and f (n-1) = true.
n > 0
f (n-1) = true