EXCEL BITAND FUNCTION

The BitAnd function in Excel returns the bitwise ‘AND’ of two numbers.

Syntax:

=BITAND( number1number2 )

Parameter:

  • The number parameters given are all positive integers.

Example:

The binary equivalent of 5 is 101.
The binary equivalent of 7 is 111.
The digit ‘1’ appears in places 1 and 3 in the binary digits 101 and 111. (counting from the right).
As a consequence, the bitwise ‘AND’ result is the binary number with a ‘1’ in places 1 and 3. (from the right). That is, the binary number 101.
This value is returned as the integer 5 in decimal form.

  • #NUM! – Occurs if one or both of the supplied number arguments is a non-integer, or if one or both of the supplied number arguments is negative or greater than (248)-1.
  • #VALUE! – This error occurs when one or both of the supplied number arguments are non-numeric.

Related Functions

HLOOKUP Function

HLOOKUP Function

Explore Now

VLOOKUP Function

VLOOKUP Function

Explore Now

INDEX Function

INDEX Function

Explore Now

MATCH Function

MATCH Function

Explore Now

DATE Function

DATE Function

Explore Now

IF Function

IF Function

Explore Now

OR Function

OR Function

Explore Now

AND Function

AND Function

Explore Now

RANK Function

RANK Function

Explore Now

SUMIF Function

SUMIF Function

Explore Now

XIRR Function

XIRR Function

Explore Now

WORKDAYS Function

WORKDAYS Function

Explore Now