Logical operations on integer vectors with elements viewed as sets of bits.
1 2 3 4 5 6 7
integer vectors; numeric vectors are coerced to integer vectors.
non-negative integer vector of values up to 31.
Each element of an integer vector has 32 bits.
Pairwise operations can result in integer
Shifting is done assuming the values represent unsigned integers.
An integer vector of length the longer of the arguments, or zero length if one is zero-length.
The output element is
NA if an input is
coercion) or an invalid shift.
The logical operators,
implementation of the standard logical operators is based on these
Package bitOps has similar functions for numeric vectors which differ in the way they treat integers 2^31 or larger.
1 2 3 4 5 6