BITOR Function in Excel returns the bitwise ‘OR’ for two supplied integers.
Note: BITOR Function was only introduced from Excel 2013 onwards
Bitwise OR Explained Let us find the bitwise OR operation of two integers 12 and 25.
12 = 00001100 (In Binary)
25 = 00011001 (In Binary)
Bitwise OR Operation of 12 and 25
00001100
| 00011001
________
00011101 = 29 (In decimal)
Syntax of BITOR Function in Excel (BITWISE OR OPERATION IN EXCEL):
BITOR(number1,number2)
Where the supplied number arguments are positive integers
Example of BITOR Function in Excel (BITWISE OR OPERATION IN EXCEL):
FORMULA:
RESULT:
NOTE: #NUM! – Error occurs if
- One or both of the supplied number arguments is a non-integer;
- One or both of the supplied number arguments is negative or is greater than (2^48)-1.