(rnrs arithmetic bitwise (6)) library provides procedures for
performing bitwise arithmetic operations on the two’s complement
representations of fixnums.
This library and the procedures it exports share functionality with SRFI-60, which provides support for bitwise manipulation of integers (see SRFI-60).
These procedures are identical to the
logxor procedures provided by Guile’s core
library. See Bitwise Operations, for documentation.
Returns the bitwise “if” of its arguments. The bit at position
i in the return value will be the
ith bit from ei2
ith bit of ei1 is 1, the
ith bit from
Returns the number of 1 bits in the two’s complement representation of ei.
Returns the number of bits necessary to represent ei.
Returns the index of the least significant 1 bit in the two’s complement representation of ei.
#t if the ei2th bit in the two’s complement
representation of ei1 is 1,
Returns the result of setting the ei2th bit of ei1 to the ei2th bit of ei3.
Returns the integer representation of the contiguous sequence of bits in ei1 that starts at position ei2 (inclusive) and ends at position ei3 (exclusive).
Returns the result of replacing the bit field in ei1 with start and end positions ei2 and ei3 with the corresponding bit field from ei4.
Returns the result of shifting the bits of ei1 right or left by
the ei2 positions.
bitwise-arithmetic-shift is identical
Returns the result of cyclically permuting the bit field in ei1 with start and end positions ei2 and ei3 by ei4 bits in the direction of more significant bits.
Returns the result of reversing the order of the bits of ei1 between position ei2 (inclusive) and position ei3 (exclusive).