In this article, you will learn about the BITAND function, the formula syntax, and usage of the function in Microsoft Excel.
BITAND Function in Excel
The BITAND function in Excel returns a decimal number of bitwise AND of two numbers.
BITAND( number1, number2)
- Number1 – This should be in decimal form and greater than or equal to 0.
- Number2 – This should be in decimal form and greater than or equal to 0.
- When any of the arguments is less than 0, BITAND returns the #NUM! error value.
- When any of the arguments is a non-integer or is greater than (2^48)-1, BITAND returns the #NUM! error value.
- When any of the arguments is a non-numeric value, BITAND returns the #VALUE! error value.
How to use BITAND Function in Excel?
Using this function in a WS is simple; all you need to do is enter the function as a formula of the cell in the formula bar.
Take a look at the given example
|Number 1||Number 2|
The above numbers are the binary version of some Hexadecimal numbers. To find out the BIT wise AND of the two numbers, Enter the given decimal numbers in column A and column B, enter the following formula in column C,
Formula: =BITAND (A1, B1)
Here, A1 and B1, refers to the cell name or the cell address. Repeat the same to the other cells and you will get the Bitwise AND of the two decimal numbers.
From the Cell A6 and B6, you can find that the corresponding value is #NUM! error, that is due to the presence of negative values or values less than 0.
Enter your email address to subscribe to this blog and receive notifications of new posts by email.