BITAND

  • Updated

Returns a bitwise boolean 'AND' of two numbers.

Sample Usage

BITAND(1,5)
BITAND(C5,C6)

Syntax

BITAND(number1,number2)

  • number1 - The first number.
  • number2 - The second number.

Examples

BITAND(1,5) returns a value of 1.
BITAND(C5,C6) returns the bitwise boolean AND of the two numbers contained in C5 and C6.

Notes

  • BITAND returns a decimal number.
  • The value of each bit position is counted only if both parameter's bits at that position are 1.
  • The values returned from the bit positions progress from right to left as powers of 2. The rightmost bit returns 1 (2^0), the bit to its left returns 2 (2^1), and so on.
  • If either argument is less than 0, BITAND returns the #NUM! error value.
  • If either argument is a non-integer or is greater than (2^48)-1, BITAND returns the #NUM! error value.
  • If either argument is a non-numeric value, BITAND returns the #VALUE! error value.