FormulaCraft

BITOR

BITOR performs a bitwise OR operation on two non-negative decimal integers, returning a new integer where each bit is 1 if at least one of the corresponding bits in either operand is 1. Use it to combine permission bits, feature flags, or any scenario where you need to set multiple independent bits.

Excel
=BITOR(12,10)
Google Sheets
=BITOR(12,10)

Verified example

Computed by a real spreadsheet engine on the sample data below.

Number1Number2BITOR Result
1210=BITOR(12,10)
78=BITOR(7,8)
312=BITOR(3,12)
0255=BITOR(0,255)

=BITOR(12,10)14

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

How it works

  1. 1Provide the first non-negative integer as argument 1 (e.g., 12 = binary 1100).
  2. 2Provide the second non-negative integer as argument 2 (e.g., 10 = binary 1010).
  3. 3The result is the decimal integer whose bits are 1 wherever either input has a 1 bit (12 OR 10 = 14 = binary 1110).

Need a version for your data?

Try: “Combine two permission bitmasks so all flags from both are active

Related

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: