Excel BITOR function
The BITOR function returns the bitwise ‘OR’ of two given numbers.
Note: This function is only available in Excel 2013 and later versions.
Syntax
BITOR(number1, number2)
Arguments
- Number1 (required): This argument must be in decimal form greater than or equal to 0;
- Number2 (required): This argument must be in decimal form greater than or equal to 0.
Remarks
Tips: As these two binaries have different digits, to help with comparison, 1101 can be considered as 01101.
Return value
It returns a numeric value.
Example
To calculate the bitwise ‘OR’ of the given numbers in the table below, you can do as follows.
Select a cell (says D6 in this case), enter the formula below and press Enter to get the bitwise ‘OR’ of the first two numbers. Select this result cell and then drag its AutoFill Handle down to get other results.
=BITOR(B6,C6)
Notes:
1) Arguments in the formula above are supplied as cell references that contain numbers. However, you can change the formula as follows:
=BITOR(1,4)
2) How does this BITOR function work?
Take the formula in D6 as an example: =BITOR(B6,C6)
The following table shows how this function works in details.
Related Functions
Excel BITRSHIFT function
The BITRSHIFT function returns the given number shifted right by the specified number of bits.
Excel BITXOR function
The BITXOR function returns the bitwise ‘XOR’ of two given numbers.
Excel BITLSHIFT Function
The BITLSHIFT function returns a decimal number shifted left by a specified number of bits.
Excel BITAND function
The BITAND function returns a decimal number representing the bitwise 'AND' of two supplied numbers.
The Best Office Productivity Tools
Kutools for Excel - Helps You To Stand Out From Crowd
Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...
Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)
- One second to switch between dozens of open documents!
- Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
- Increases your productivity by 50% when viewing and editing multiple documents.
- Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.