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

Output table — columns A, A ⊕ 0, A ⊕ 1
AA ⊕ 0A ⊕ 1
001
110

Compare with

Open the XOR gate

This input is entered in the tool itself — it is too rich for a link to carry.

Note:

Notation this page assumes

  • Symbols: · is AND, + is OR, ⊕ is XOR, a prime or an overline is NOT. The field also takes ∧ ∨ ¬ ~ ! & | and the words.
  • Operator precedence, tightest first: NOT, then AND (including juxtaposition), then XOR/XNOR, then NAND/NOR, then OR, then IMPLIES, then IFF.
  • Gate symbols follow whichever standard the header toggle is set to: ANSI/IEEE Std 91-1984 distinctive shapes, or IEC 60617-12 rectangles.

Sources

  • ANSI/IEEE Std 91-1984, Graphic Symbols for Logic Functions
  • IEC 60617-12, Graphical Symbols for Diagrams — Binary Logic Elements