BITXOR(n1,n2)
- where and specify the numeric values on which the bitwise XOR operation is to be performed.
Description
- BITOR() returns the result of bitwise OR operation performed on numeric values.
- and must be in decimal form and greater or equal to '0'.
- Each bit is set to 1 if the corresponding bit is either or is 1. The bit is set to 0 only if the corresponding bit is 0 in both and .
- If either argument is a non-numeric value, BITOR returns the #VALUE! error value.
For Example,
BITOR(1,6) = 7 (The binary representation of 1 is 1, and the binary representation of 6 is 110. Result is returned as 7 i.e 111.
BITOR(true, true) = 1 (Bit AND value of 'true' is '1'. Hence result is 1.)
Examples
- =BITOR(3,5) = 7
- =BITOR(17,-22) = -5
- =BITOR(-9,-3) = -1
- =BITOR(0.5,0.1) = 0
- =BITOR(12, 7) = 15
Related Videos
See Also
References