Documentation/Calc Functions/BITAND/en

Function name:
BITAND

Category:
Mathematical

Summary:
Performs a bitwise AND binary operation on two non-negative integer values.

Syntax:
BITAND(Number1; Number2)

Returns:
Returns an integer in the range [0, 248-1], which is the result of the bitwise AND operation on the two supplied numbers.

Arguments:
Number1 is an integer in the range [0, 248-1], or a reference to a cell containing that number, that is the first value for the bitwise AND operation.

Number2 is an integer in the range [0, 248-1], or a reference to a cell containing that number, that is the second value for the bitwise AND operation.


 * If either Number1 or Number2 is non-numeric, then BITAND reports a #VALUE! error.
 * If either Number1 or Number2 is a non-integer value, then BITAND truncates that value to an integer.
 * If either Number1 or Number2 is less than 0 or greater than 248-1, then BITAND reports an invalid argument error (Err:502).

Additional details:

 * More information is available on Wikipedia’s Bitwise operation page.


 * 248 is equal to 281474976710656.

Related LibreOffice functions:
AND

BITLSHIFT

BITOR

BITRSHIFT

BITXOR

ODF standard:
Section 6.6.2, part 2

Equivalent Excel functions:
BITAND