XOR identities: A XOR FALSE = A, A XOR TRUE = NOT A, A XOR A = FALSE
The XOR identities: XOR with FALSE leaves a value unchanged, XOR with TRUE negates it, and a value XOR itself is FALSE.
XOR with FALSE leaves a value unchanged, XOR with TRUE negates it, and a value XOR itself is FALSE.
XOR is true exactly when its operands differ. Against FALSE, that means “true when A is true”, so A XOR FALSE = A. Against TRUE, it means “true when A is false”, so A XOR TRUE = NOT A, which makes XOR a controllable inverter: the second input decides whether the first is passed through or flipped. And a value never differs from itself, so A XOR A = FALSE.
These three identities are why XOR chains compute parity: every pair of equal inputs cancels, and what remains is whether an odd number of inputs are true. They are also why XOR is used to toggle bits and to build the sum of a half adder.
The truth tables below prove each identity on its rows, and the XOR operator page shows the three- and four-input tables that the parity reading relies on.
Statement
A XOR FALSE = AA XOR TRUE = NOT AA XOR A = FALSE Proof by truth table: A XOR FALSE = A
| # | A | lhs | rhs |
|---|---|---|---|
| 0 | FALSE | FALSE | FALSE |
| 1 | TRUE | TRUE | TRUE |
The same law in four notations
A XOR FALSEA XOR FALSEA ⊕ 0A ⊕ 0A \oplus 0AAAAAProof by truth table: A XOR TRUE = NOT A
| # | A | lhs | rhs |
|---|---|---|---|
| 0 | FALSE | TRUE | TRUE |
| 1 | TRUE | FALSE | FALSE |
The same law in four notations
A XOR TRUEA XOR TRUEA ⊕ 1A ⊕ 1A \oplus 1NOT A!A¬AA'\overline{A}Proof by truth table: A XOR A = FALSE
| # | A | lhs | rhs |
|---|---|---|---|
| 0 | FALSE | FALSE | FALSE |
| 1 | TRUE | FALSE | FALSE |
The same law in four notations
A XOR AA XOR AA ⊕ AA ⊕ AA \oplus AFALSEFALSE000The common slip
Expecting A XOR A to be A, by analogy with A OR A. XOR is not idempotent; it cancels.
Questions
Is XOR associative and commutative?
Yes to both, which is why A XOR B XOR C needs no brackets and reads the same in any order: it is true when an odd number of the three are true.
Related
Lesson that teaches this
Pitfalls
Tools
- Boolean algebra calculator and simplifier with steps (every law named and verified)
- Logical equivalence checker: two expressions, exact verdict, counterexample
See also
- 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”
- Lesson 2: XOR: exclusive OR and parity (beginner, 10 min)
- Odd parity of three inputs: A XOR B XOR C
- Half adder sum: A XOR B
Laws
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.