Syntax
| Parameter | Description |
|---|---|
| number1 | Parameter of the BITOR function. |
| number2 | Parameter of the BITOR function. |
Examples
Basic OR operation
=BITOR(5, 3)
Set a flag bit
=BITOR(8, 4)
Combine permission flags
=BITOR(BITOR(1, 2), 4)
Common Errors
One or both numbers is negative, or exceeds 2^48 - 1.
An argument is non-numeric.
Tips
BITOR(value, 2^N) sets bit N without affecting other bits. This is the standard way to turn on a specific flag.
To set multiple flags at once, OR them together: BITOR(BITOR(flag1, flag2), flag3). Or use nested BITORs.
BITAND tests which bits are common to both values; BITOR merges all bits from both values. They're complementary operations.
Try BITOR in Viztab
Import your data and use BITOR with 370+ other formulas. No signup required.
Open Viztab