RosettaCodeData/Task/Bitwise-operations/R/bitwise-operations-2.r

6 lines
123 B
R
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
a <- as.hexmode(35)
b <- as.hexmode(42)
as.integer(a & b) # 34
as.integer(a | b) # 43
as.integer(xor(a, b)) # 9