BITOR Function in Excel – Bitwise OR Operation in Excel

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:

BITOR Function in Excel 1

RESULT:

BITOR Function in Excel 2

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.

previous BITOR Function in Excel                                                                                                                next BITOR Function in Excel