Inclusive vs exclusive or (OR vs XOR), with truth table
Inclusive or (OR) is TRUE when at least one input is TRUE, including when both are; exclusive or (XOR) is TRUE when exactly one is. In logic, A OR B means the inclusive reading, while the everyday “or” often means the exclusive one. The two differ on exactly one row, A = TRUE, B = TRUE, and that row is where rules written from speech go wrong.
The table compares A OR B with A XOR B. They agree on three rows and differ on the row where both inputs are TRUE: inclusive OR is TRUE there and exclusive OR is FALSE. The equivalence check reports that row as the counterexample. Everything the engine prints as OR is the inclusive reading, and its plain-language reading says so: at least one of the parts, and both may hold.
English leaves the choice to context. “Tea or coffee?” is exclusive; “students or seniors get the discount” is inclusive, and a student who is also a senior is not refused. Law and specification text sometimes write “and/or” to force the inclusive reading and “either … or … but not both” to force the exclusive one; a formula needs neither, because OR and XOR are different operators.
The default when translating a rule should be inclusive, because exclusivity is an extra requirement that must be stated: a rule that denies a discount to someone who qualifies twice is unusual enough that it should be written deliberately. When exclusivity is meant for more than two options, a chain of XOR is not it; the parity pitfall explains why.
inclusive := A OR B · outputexclusive := A XOR B · output Truth table
They differ on this row: #3
| # | A | B | inclusive | exclusive |
|---|---|---|---|---|
| 0 | FALSE | FALSE | FALSE | FALSE |
| 1 | FALSE | TRUE | TRUE | TRUE |
| 2 | TRUE | FALSE | TRUE | TRUE |
| 3 | TRUE | TRUE | TRUE | FALSE |
Plain-language reading
Beginnerinclusive is true exactly when at least one of A or B is true (both may be true).
In every other case, inclusive is false.
About the operators:
- OR is inclusive: it is true when at least one part is true, including when several are.
Intermediateinclusive is true exactly when at least one of A or B is true (both may be true).
In every other case, inclusive is false.
Advancedinclusive is true exactly when at least one of A or B is true (both may be true) [inclusive disjunction ∨].
In every other case, inclusive is false.
Formal notation: A ∨ B
The common slip
Translating a plain “or” as XOR because the options feel like alternatives. The rule then rejects exactly the people who qualify on two grounds, a case that rarely appears in test data and always appears in production.
Questions
How do I write “one or the other but not both”?
A XOR B, or, more readably, (A OR B) AND NOT (A AND B). The engine checks the two equivalent.
Why is inclusive OR the default in logic?
Because it is the weaker claim and it combines cleanly: the laws of distribution, De Morgan and absorption are all stated for inclusive OR, and exclusive or has its own identities.
Related
Worked examples
Tools
- Logical equivalence checker: two expressions, exact verdict, counterexample
- Truth table generator: any Boolean expression, up to 12 variables, with intermediate columns
Practice
See also
- OR gate: truth table for 2, 3 and 4 inputs, inclusive or explained
- XOR gate: truth table for 2, 3 and 4 inputs (odd parity, not “exactly one”)
- XOR of three inputs is odd parity, not “exactly one”
- XOR and OR in Boolean algebra: which laws each one obeys
- Lesson 2: XOR: exclusive OR and parity (beginner, 10 min)
- Discount eligibility rule: (student OR senior) AND NOT expired AND (member OR coupon)
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.