Exclusive-or
Context: FIT1058_MOC · the “exactly one” connective · the negation of equivalence · generalises to odd parity · the logical Symmetric Difference
Quick Revision
- 🎯 Objective: is True precisely when differ ➔ “or, but not both”.
- 📦 Core Components: ➔ chains to odd parity ➔ addition mod 2.
- ⚡ Key Constraint: differs from inclusive only on the both-true row.
📝 Core
1. The Connective (Exactly One)
- Definition ➔ True iff exactly one of is True (they differ).
- vs ➔ inclusive-or also accepts both-true; excludes it.
- Negation of equivalence ➔ (opposite columns).
2. Odd Parity Generalisation
- Chain ➔ True iff an odd number of the are True.
- Why ➔ two trues cancel (mod-2 addition); provable by Mathematical Induction.
- Use ➔ parity bits for error detection.
3. Algebraic Structure
- Associative + commutative ➔ chained is unambiguous.
- Identity F ➔ ; self-inverse ➔ .
- Set dual ➔ mirrors Symmetric Difference (elements in exactly one set).
Key identities:
⚖️ Core Decision Matrix
| Relation | Formula | Meaning |
|---|---|---|
| vs equivalence | True on disagreement | |
| vs inclusive-or | agree except TT | excludes both-true |
| identity / inverse | , | addition mod 2 |
| set analogue | exactly one set |
When It Flips: for ""/"", corresponds to Symmetric Difference — just as , . XOR is the logical "exactly one".
📊 Exam Execution Trace
Manual Execution Trace
Accumulate left to right:
| Step / State | Bit | Running | odd? |
|---|---|---|---|
| 0 (Init) | — | 0 | no |
| 1 | 1 | 1 | yes |
| 2 | 0 | 1 | yes |
| 3 | 1 | 0 | no |
| 4 | 1 | 1 | yes |
⚠️ Common Mistakes
- 💡 vs split only at TT ➔ agree on three rows; gives T at both-true, gives F.
🧠 Active Recall
How does exclusive-or relate to equivalence and to inclusive-or?
- Hint: Opposite of ; splits from at TT.
Answer
- Short answer: (True on difference); matches except both-true.
- Why: “Or but not both” ➔ returns T at TT, returns F.
When is true, and where is this used?
- Hint: Odd count.
Answer
- Short answer: True iff an odd number of the are True (pairs cancel, mod-2 addition).
- Why: Parity bits ➔ this odd-parity property (by induction) underlies error detection in stored/transmitted data.