Skip to content

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
Are inclusive and exclusive equivalent? No Counterexample: A = T, B = T · Exhaustively checked and solver cross-checked · 4 rows

Truth table

They differ on this row: #3

Inclusive vs exclusive or (OR vs XOR), with truth table
#ABinclusiveexclusive
0FALSEFALSEFALSEFALSE
1FALSETRUETRUETRUE
2TRUEFALSETRUETRUE
3TRUETRUETRUEFALSE

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
Inclusive vs exclusive or (OR vs XOR), with truth table Inclusive vs exclusive or (OR vs XOR), with truth table A B inclusivePRIMARY exclusive OR XOR
Inclusive vs exclusive or (OR vs XOR), with truth table Inclusive vs exclusive or (OR vs XOR), with truth table A B inclusivePRIMARY exclusive OR XOR

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

Practice

See also

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.