# BITOR function

This article describes the formula syntax and usage of the BITOR function (function: A prewritten formula that takes a value or values, performs an operation, and returns a value or values. Use functions to simplify and shorten formulas on a worksheet, especially those that perform lengthy or complex calculations.) in Microsoft Excel.

## Description

Returns a bitwise 'OR' of two numbers.

## Syntax

`BITOR(number1, number2)`

The BITOR function syntax has the following arguments.

• Number1    Required. Must be in decimal form and greater than or equal to 0.
• Number2    Required. Must be in decimal form and greater than or equal to 0.

## Remarks

• The result is a bitwise 'OR' of its parameters.
• In the result, each bit position is 1 if any of the parameter's bits at that position are 1.
• The values returned from the bit positions progress from right to left as powers of 2. The rightmost bit returns 1 (2^0), the bit to the left returns 2 (2^1), and so on.
• If either argument is outside their constraints, BITOR returns the #NUM! error value.
• If either argument is greater than (2^48)-1, BITOR returns the #NUM! error value.
• If either argument is a non-numeric value, BITOR returns the #VALUE! error value.

## Example

The workbook below shows examples of this function. Inspect them, change existing formulas, or enter your own formulas to learn how the function works.

To work more in-depth with the example data in Excel, download the embedded workbook to your computer, and then open it in Excel.

Applies to:
Excel 2013, Excel Online