XOR of three inputs is odd parity, not “exactly one”
A XOR B XOR C is TRUE when an odd number of inputs are TRUE, so it is TRUE when all three are. “Exactly one of three” is a different function, and the two differ on exactly one row.
The table compares the XOR chain with the written-out “exactly one” formula, (A AND NOT B AND NOT C) OR (NOT A AND B AND NOT C) OR (NOT A AND NOT B AND C). They agree on seven rows and differ on the row A = TRUE, B = TRUE, C = TRUE, where three is odd and the chain is TRUE while exactly-one is FALSE. The equivalence check reports that row as the counterexample.
Two-input XOR does mean “exactly one of two”, which is where the intuition comes from. But XOR is associative, so A XOR B XOR C is (A XOR B) XOR C: the first XOR is TRUE when one of A and B holds, and XOR with C then flips it, giving TRUE for one input or for three. The same holds for longer chains: a chain is TRUE for any odd count, which is why it computes parity and why the three-way light switch works.
When a rule needs exactly one of several options, write the cases out, as the worked example does, or combine “at least one” with “at most one”: (A OR B OR C) AND NOT ((A AND B) OR (A AND C) OR (B AND C)). Both forms are checked equivalent to the written-out version by the engine. The engine also has the count itself, EXACTLY(1; A, B, C): one gate, read as “exactly 1 of A, B, C”, which the counting-constraint expansion law rewrites as the written-out form.
xor_chain := A XOR B XOR C · outputexactly_one := (A AND NOT B AND NOT C) OR (NOT A AND B AND NOT C) OR (NOT A AND NOT B AND C) · output Truth table
They differ on this row: #7
| # | A | B | C | xor_chain | exactly_one |
|---|---|---|---|---|---|
| 0 | FALSE | FALSE | FALSE | FALSE | FALSE |
| 1 | FALSE | FALSE | TRUE | TRUE | TRUE |
| 2 | FALSE | TRUE | FALSE | TRUE | TRUE |
| 3 | FALSE | TRUE | TRUE | FALSE | FALSE |
| 4 | TRUE | FALSE | FALSE | TRUE | TRUE |
| 5 | TRUE | FALSE | TRUE | FALSE | FALSE |
| 6 | TRUE | TRUE | FALSE | FALSE | FALSE |
| 7 | TRUE | TRUE | TRUE | TRUE | FALSE |
Plain-language reading
Beginnerxor_chain is true exactly when an odd number of A, B, and C are true (1 or 3 of them).
In every other case, xor_chain is false.
About the operators:
- A chain of XORs is true when an odd number of its parts are true. With three parts, all three being true also counts: it does not mean “exactly one”.
Intermediatexor_chain is true exactly when an odd number of A, B, and C are true (1 or 3 of them).
In every other case, xor_chain is false.
Advancedxor_chain is true exactly when an odd number of A, B, and C are true (1 or 3 of them) [parity: n-ary exclusive disjunction ⊕].
In every other case, xor_chain is false.
Formal notation: A ⊕ B ⊕ C
The common slip
Modelling a choice between three payment methods, or three mutually exclusive roles, as A XOR B XOR C. The rule accepts the case where all three are selected. The test that catches it is the all-TRUE row, which is the one row people rarely try.
Questions
Does =XOR() in Excel have the same reading?
Yes: with several arguments it returns TRUE when an odd number are TRUE, the same parity reading as the engine, so it has the same trap.
What is XOR of four inputs TRUE on?
On the rows with one or three TRUE inputs, eight of the sixteen. The XOR operator page shows the four-input table.
Related
Worked examples
- Odd parity of three inputs: A XOR B XOR C
- Exactly one of three: why XOR is the wrong tool
- Staircase light with three switches: A XOR B XOR C
- Exactly one payment option: cash, card or voucher
Tools
- Logical equivalence checker: two expressions, exact verdict, counterexample
- Truth table generator: any Boolean expression, up to 12 variables, with intermediate columns
See also
- XOR gate: truth table for 2, 3 and 4 inputs (odd parity, not “exactly one”)
- Exactly one of three: why XOR is the wrong tool
- Odd parity of three inputs: A XOR B XOR C
- Staircase light with three switches: A XOR B XOR C
- Exactly one payment option: cash, card or voucher
- XOR identities: A XOR FALSE = A, A XOR TRUE = NOT A, A XOR A = FALSE
- Lesson 2: XOR: exclusive OR and parity (beginner, 10 min)
Pitfalls
Generated from the Tangibool engine, semantics tangibool-semantics/1, engine 1.0.0, build . Every table, map, simplification and verdict on these pages was computed by the Tangibool engine when the site was built, and every claim was re-checked by the same exact checker the app uses. Limits are stated where they apply. © 2026 Foreranger LTD.