BITOR in Collabora Office: Merge Flags Without Adding Shared Bits Twice
Merge numeric masks in Collabora Calc, distinguish bitwise union from addition and build repeatable flag-setting operations with explicit positive inputs.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: BITOR returns the mask containing every bit set in either input. For 27 and 21, the expected result is 31, not their arithmetic sum 48. Shared bits appear once in the combined mask.
Availability and version history
- Introduced: the original Collabora release and launch date are not established by the reviewed sources.
- Availability: documented in Collabora Office 26.04 desktop help.
- Platform scope: online and mobile deployment support is not inferred from the desktop documentation.
- Checked: October 14, 2026. Function-specific documentation and independent controls; no native Collabora execution.
Syntax and documented input scope
=BITOR(Number1; Number2)
The dedicated Collabora help describes positive integer arguments strictly below 2^48, or 281474976710656. All inputs in this guide are positive integers within that bound.
The source does not explicitly certify zero as an argument, text or Boolean coercion, fractional values or a native error table. Those cases remain unverified. Do not transfer another spreadsheet’s broader input wording merely because it has the same function name.
BITOR produces a numeric encoding, not a logical TRUE/FALSE result. Use OR for alternatives between ordinary conditions; use BITOR when the inputs actually represent bit masks.
Example 1: combine report configurations
Define fictional weights summary=1, detail=2, charts=4, archive=8 and checksum=16. Enter these masks in A1:B4, including headings:
| A, first mask | B, second mask |
|---|---|
| 27 | 21 |
| 1 | 8 |
| 12 | 12 |
In C2 use =BITOR(A2;B2) and fill through C4. Expected outputs are 31, 9 and 12.
For the first pair, binary 11011 and 10101 combine to 11111, selecting all five options. Summary and checksum appear in both sources, but are included once in the output.
In D2 put =A2+B2 and fill down. Arithmetic gives 48, 9 and 24. Only the disjoint pair 1 and 8 agrees with BITOR. Addition double-counts shared weights and can even carry into a position with a different meaning.
Example 2: ensure charts remain enabled
Enter existing masks 1, 5, 18 and 22 in F2:F5. Charts has weight 4. Put =BITOR(F2;4) in G2 and fill down.
Expected updated masks are 5, 5, 22 and 22. Each now includes charts; a mask that already had the bit stays unchanged.
In H2 enter =BITOR(G2;4) and fill down. The same sequence 5, 5, 22 and 22 returns. This repeatable operation sets the bit rather than toggling it. Applying it twice does not undo the first application.
The numeric formula does not itself create a chart or modify report files. It changes a fictional configuration value whose meaning is supplied by the option table.
Advanced example: combine three independent proposals
Enter masks 3, 12 and 17 in J2:J4. Use:
=BITOR(BITOR(J2;J3);J4)
The first combination is 15; adding the bits from 17 produces 31. All five fictional options are now selected. Ordinary addition gives 3+12+17=32, which is a different bit pattern and does not describe the intended union.
Nested BITOR supplies the documented two-argument function with two positive values at each step. It is not a claim that the function accepts an arbitrary number of separate arguments.
Advanced check: explain the overlap numerically
For the first pair in A2:B2, evaluate:
=BITOR(A2;B2)+BITAND(A2;B2)
The union is 31 and the intersection is 17, so the result is 48, equal to 27+21. BITAND accounts for exactly the weights that ordinary addition counted twice.
For identical masks 12 and 12, union and intersection are both 12, totaling 24. For 1 and 8, the intersection is zero, and union alone equals their sum 9. Zero here is an output of a positive-input comparison, not an assumed accepted input to BITOR.
Checks, alternatives and unverified boundaries
The official example =BITOR(6;10) returns 14. Swapping the arguments preserves the result because each bit is selected when either input contains it.
BITXOR answers a different question: it removes shared selected bits and identifies differences. It can also toggle a chosen bit, which is inappropriate for a repeatable “ensure enabled” step unless that reversal is intended.
The source’s positive-input contract and exclusive upper bound remain visible. Native zero-input behavior, imported text coercion, fractions, error precedence and extreme precision were not tested. Keep field validation separate from a correctly computed union.
References and verification
Complete function-specific documentation reviewed. Outputs are independently calculated positional, equality or arithmetic models, not captured native application results. Formulas use English names and semicolon separators; optional-argument brackets describe syntax and are not typed into a working formula.