Full 2-input truth table — XOR gate
introtrue when the inputs differ
Answer
output column 0110
Why this example is worth doing
The defining reading: XOR outputs 1 when its inputs are unequal, which makes it a one-bit difference detector rather than a kind of OR. Every use it has follows from that — comparison, parity, controlled inversion, addition without carry. The page leads with the inequality description and gives the or-but-not-both description second, because the first generalises to more inputs and the second does not.
Try your own input in the XOR gate. Truth table, symbol and algebraic form for A ⊕ B, the difference detector.
How the answer is reached
Truth table
| # | A | B | A ⊕ B |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 2 | 1 | 0 | 1 |
| 3 | 1 | 1 | 0 |