- where and specify the numeric values on which the bitwise AND operation is performed.
- BITAND() returns the result of bitwise AND operation performed on numeric values.
- and must be in decimal form and greater or equal to '0'.
- The value of each bit position is counted only if both parameter's bits at that position are 1.
- If either argument is a non-numeric value, BITAND returns the #VALUE! error value.
BITAND(1,6) = 0 (The binary representation of 1 is 1, and the binary representation of 6 is 110. Their bits do not match at any position. This is returned as 0.
BITAND(true, true) = 1 (Bit AND value of 'true' is '1'. Bits match the position, hence result is 1.)
- =BITAND(3,5) = 1
- =BITAND(17,-22) = 0
- =BITAND(-9,-3) = -11
- =BITAND(0.5,0.1) = 0