Contact

BITOR Function in Apple Numbers: Bitwise OR, Syntax and Worked Examples

Engineering Intermediate Apple Numbers

Combine enabled flags encoded as integers without counting existing flags twice. Includes real worksheets, decimal and binary examples, common input problems and official Apple references.

Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Apple Numbers. How formula examples are checked

Quick answer. =BITOR(9,13) returns 13, as published in Apple’s Functions Help. Every bit that is 1 in either input integer survives. Use this to combine independent flags without adding them twice. The result is a regular decimal number, not an automatically formatted binary string. [A1][M1]

All custom results below are expected outputs independently computed from integer bitwise arithmetic, not observed Apple Numbers screenshots. [V1]

Purpose: when should you use BITOR?

Every bit that is 1 in either input integer survives. Use this to combine independent flags without adding them twice. Bitwise operations process matching positions in the binary representations of two integers. A decimal value such as 13 is 1101 in base two, while 9 is 1001; the rightmost digit is the 1’s place, then 2, 4, 8, and so on. [A1]

Unlike Numbers’ logical AND or OR functions, BITOR does not directly answer a multi-condition TRUE/FALSE question. It returns an integer built from bit positions. For examples in this guide, arguments are deliberately restricted to nonnegative integers whose binary representation is unambiguous. That is a conservative teaching choice, not a statement that Apple rejects all negative integers. [A1]

Exact official syntax and required arguments

=BITOR(value-1, value-2)
Position Apple’s parameter Accepted value according to Apple Required?
1 value-1 First number; integer Yes
2 value-2 Second number; integer Yes

Apple shows two parameters, both required and integer-valued. Neither has a documented default. Swapping their order does not change the result. This English documentation uses a comma separator; the Portuguese (Brazil) edition of Apple’s BITOR article instead displays semicolons, demonstrating that examples can differ by locale. Follow the delimiter suggested by your own Numbers formula editor rather than copying punctuation blindly. [A1][L1]

Documentation/version scope: The source was Apple’s Formulas and Functions Help 15.4, accessed 2026-10-12, including its engineering-functions table of contents. This establishes that the English documentation lists BITOR; it does not establish the minimum Numbers release that introduced this particular function or native test results across Mac, iPhone, iPad and iCloud versions. No synonym or alternate canonical function name was verified for BITOR. [A1][A0][V1]

Single-bit truth table

Input bit A Input bit B BITOR output bit
0 0 0
0 1 1
1 0 1
1 1 1

Apply the same rule independently to every matching binary position, then add the surviving powers of two to get the decimal result. The truth table is explicitly present in Apple’s function article. [A1]

Copyable examples from Apple’s documentation

Formula (English separator) Apple-documented result Why?
=BITOR(9,13) 13 Binary 1001 and 1101 are compared position by position.
=BITOR(12,3) 15 Binary 1100 and 0011 give the documented output.

These two results are observations from Apple’s published documentation, not execution by this research run. Independently computing the integer operation yields the same results. [A1][M1]

Reproduce six examples in one Apple Numbers table

Create a blank Numbers table called BitwisePractice with one header row. Put Input A in A1, Input B in B1, Expected output in C1, and Result in D1. Enter these pairs in A2:B7. The header labels are illustrative; the formulas use ordinary A1-style references, which Apple documents for cells in the same table. [R1]

A: Input A B: Input B Binary A (explanation only) Binary B (explanation only) C: Expected decimal result
9 13 00001001 00001101 13
12 3 00001100 00000011 15
5 3 00000101 00000011 7
0 8 00000000 00001000 8
10 6 00001010 00000110 14
255 15 11111111 00001111 255

In D2 enter:

=BITOR(A2,B2)

Fill down to D7, or manually enter =BITOR(A3,B3) through =BITOR(A7,B7). Read the expected-result column above for comparison. The binary strings in the explanation columns are human-computed labels, not formulas to copy into Numbers. All six expected decimal outputs were calculated independently using Python’s integer | operator on nonnegative values; native Apple Numbers was not run. [M1][R1][V1]

Table-qualified references. If the formula is in a different table, Apple documents the pattern TableName::Cell, for instance:

=BITOR(BitwisePractice::A2,BitwisePractice::B2)

If the cells are on another sheet, Apple’s guide additionally allows a SheetName::TableName::Cell form. When copying formulas in Numbers, check whether references are relative or absolute: Apple’s editor provides the $ notation for anchoring rows and columns. [R1]

Advanced use: combine flags and avoid double-counting

Consider permissions represented by powers of two: 1 = view, 2 = comment, 4 = edit, 8 = approve. A user with permission value 5 (0101) has view and edit, while value 2 (0010) grants comment. =BITOR(5,2) yields 7 (0111), combining all three permission bits. This is a teaching model, not an Apple Numbers built-in permission system. [M1]

If you simply add two masks, repeated flags may produce a different value: 5+4=9 (1001), which falsely changes the encoded flags. In contrast, =BITOR(5,4) returns 5 because the value-4 flag was already enabled. This is why bitwise OR is useful for merging sets of flags.

Nested combinations

Suppose you want to enable view (1), comment (2), and edit (4):

=BITOR(BITOR(1,2),4)

Expected: 7. Apple documents both arguments as integers and the same ordering rule at each call, so nesting the returned integer in an outer call is a reasonable calculation. The result was independently checked; native execution was not available. [A1][M1]

Identity checks: BITOR(x,0)=x, BITOR(x,x)=x, and BITOR(10,6)=14. The equation x OR y = x + y − (x AND y) holds for nonnegative integer bit patterns; for 10 and 6, 10+6-2 = 14. Cross-check the result using both BITOR and BITAND if debugging an unexpected answer. [M1]

If your task is to accept a record when any logical condition is TRUE, use Apple’s logical OR() rather than BITOR(). The OR guide explains logical conditions.

Errors, inputs and limits: what is verified?

Symptom or question Evidence-based interpretation Safe troubleshooting step
A parameter is omitted, e.g. =BITOR(9) Apple documents two required integers; this is outside its stated syntax. Exact Numbers error text was not tested. [A1] Supply both value-1 and value-2.
One argument is fractional, e.g. =BITOR(2.5,1) An integer is required; a fraction does not meet that documented contract. Whether Numbers coerces or errors was not verified. [A1] Use actual whole-number inputs. Do not assume silent rounding.
One argument is quoted text, e.g. =BITOR("9",13) Apple’s article calls for integers, not text. Conversion and error behaviour for numeric-looking strings were not tested. [A1] Enter a numeric cell or validate/convert input separately.
Empty cell or boolean TRUE/FALSE Apple’s function article does not establish coercion rules for these values. Test the exact case in Numbers; do not claim an automatic zero or one.
Negative integer, very large integer, or overflow Apple’s cited BITOR page specifies integers but does not enumerate its signed-width or upper-limit rules. [A1] Avoid asserting Excel’s documented 2^48−1 ceiling applies to Numbers; perform a native boundary check before depending on such inputs.
Formula text rejected in a localized Numbers installation Argument delimiters vary in Apple regional documentation. [L1] Try the formula editor’s locale-appropriate separator, and check localized function spelling.
Output seems unlike a Boolean TRUE/FALSE BITOR returns a numeric bitwise result, not a logical AND/OR truth value. [A1] Convert the result into a comparison only when that is your real task.

Do not present any presumed #NUM!, #VALUE!, signed width, precision cap or exact error wording as observed Numbers behaviour; these are outside the present native-testing evidence. [V1]

Compatibility: Apple Numbers versus Excel

Behaviour Apple Numbers 15.4 Functions Help Microsoft Excel’s own BIT documentation
Name and core operation BITOR and bitwise OR explicitly documented. [A1] BITOR separately documented by Microsoft. [E1]
Argument count Two required integer parameters; no optional/default parameter. [A1] Two required numeric inputs; read Microsoft’s rules separately. [E1]
Argument order Apple explicitly says order does not affect the result. [A1] Bitwise operation on two values is mathematically commutative for these nonnegative integers. [M1]
Negative and oversized values No specific boundary behaviour established in the cited Apple BITOR article. [A1] Microsoft documents a nonnegative, at-most-2^48−1 domain for this Excel function; this is Excel evidence only. [E1]
Locale or table references This guide uses Apple Numbers’ own syntax and Table::Cell convention. [R1][L1] Excel commonly uses a single-grid reference model; do not paste Numbers table-qualified identifiers into Excel unchanged.

This is intentionally a narrow compatibility claim: using the same English function name and elementary integer truth table does not prove that every error case, conversion rule, locale spelling or release-specific feature behaves identically. Excel’s limits are cited solely for Excel, never imposed on Apple Numbers. We did not verify Google Sheets, LibreOffice or other implementations of this function. [A1][E1][V1]

Sources, access dates, and validation provenance

  • [A1] Primary official function contract: Apple, BITOR — Formulas and Functions Help 15.4, accessed 2026-10-12. Supports the description, exact two-argument syntax and integer type, commutativity, truth table and Apple’s two worked examples.
  • [A2] Related primary function contracts: Apple, BITAND, BITOR and BITXOR, accessed 2026-10-12. Used only for the named related operation and externally checked source links.
  • [A0] Catalogue presence and documentation scope: Apple’s function-list navigation includes the engineering-functions category in its table of contents; English 15.4 version path, checked 2026-10-12.
  • [R1] Apple references: Refer to cells in formulas, 15.4 edition, checked 2026-10-12. Supports A1-style, table-qualified and sheet-qualified references.
  • [L1] Locale: Apple BITOR, Portuguese (Brazil), accessed 2026-10-12, prints semicolons, contrasting the English comma notation. This establishes a real locale example, not exhaustive global locale rules.
  • [E1] Cross-compatibility (Excel only): Microsoft, BITOR function, accessed 2026-10-12. Supports Excel syntax and Excel-specific numeric bounds; it cannot establish Numbers error handling.
  • [M1] Independent computation: Python’s exact nonnegative-integer | operator, run during manuscript creation; results in the tables and mathematical identities are expected, not app-observed.
  • [V1] Execution limitation: No native Numbers, Mac, iPhone/iPad, iCloud, or Excel runtime was available for execution. No native-application screenshots were captured.