Bitwise And, Or and Xor Operations
bitAnd.RdDetails
The bitwise operations are applied to the arguments cast as 32 bit (unsigned long) integers. NA is returned wherever the magnitude of the arguments is not less than \(2^{31}\), or, where either of the arguments is not finite.
Examples
bitAnd(15,7) == 7 ; identical(15 %&% 7, bitAnd(15, 7))
#> [1] TRUE
#> [1] TRUE
bitOr(15,7) == 15 ; identical(15 %|% 7, bitOr (15, 7))
#> [1] TRUE
#> [1] TRUE
bitXor(15,7) == 8 ; identical(15 %^% 7, bitXor(15,7))
#> [1] TRUE
#> [1] TRUE
bitOr(-1,0) == 4294967295 ; identical(-1 %|% 0, bitOr(-1,0))
#> [1] TRUE
#> [1] TRUE