A ⊕ 0 and A ⊕ 1 — XOR gate
coreXOR as a programmable inverter
Answer
A ⊕ 0 column 01, A ⊕ 1 column 10
Why this example is worth doing
XOR against a constant is the identity or the complement depending on the constant, which turns the gate into an inverter you can switch on. That is how an adder-subtractor negates its second operand, how Gray-code conversion works, and how a stream cipher applies a keystream. The page presents it as the single most useful XOR identity, ahead of the truth table, because it is the one that explains the gate's appearance in circuits that have nothing to do with comparison.
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
Output table
| A | A ⊕ 0 | A ⊕ 1 |
|---|---|---|
| 0 | 0 | 1 |
| 1 | 1 | 0 |