LogisimRevisited

Components / Gates

XOR Logic Gate (Exclusive OR) in Logisim

Exclusive OR gate (Y = A ⊕ B = A·~B + ~A·B) in Logisim: 2-input truth table, multi-input odd-parity behavior, and binary adder design.

Default settings, facing east. Pins are the dots.
LibraryGates
Type nameXOR Gate
Pins and defaultsin0..inN (-50, ±10), out0 (0, 0), width 1..32, inputs 2..8

Try it in the app

How the XOR Works in Logisim

The XOR Gate (Exclusive OR, written A ⊕ B) outputs High (1) when its two inputs differ (one is 0 and the other is 1) and outputs Low (0) when both inputs are equal (both 0 or both 1). Its Boolean algebra expression in Sum-of-Products form is Y = A·~B + ~A·B.

Multi-input behavior in Logisim: When you increase the Inputs attribute above 2 (from 3 up to 8 inputs), the XOR Gate operates as an odd-parity detector (A ⊕ B ⊕ C ...), outputting 1 whenever an odd number of active inputs are 1, and 0 when an even number of inputs are 1.

4-state propagation (E and Z): Unlike AND or OR gates, an XOR gate has no single controlling input value because flipping any input always flips the output. Consequently, if any connected input is Error (E), the XOR output is E. Unconnected input pins (floating Z) are ignored so long as at least one input is driven to 0 or 1; if all inputs are Z, the gate outputs E.

In digital arithmetic, the XOR gate is the heart of binary addition and subtraction: it computes the modulo-2 Sum bit in both the Half Adder (Sum = A ⊕ B) and the Full Adder (Sum = A ⊕ B ⊕ Cin), and acts as a programmable inverter when one input is used as a control line (X ⊕ 0 = X, while X ⊕ 1 = ~X).

Tip: Use an XOR gate as a controlled inverter: wire your signal to one input and an Invert control line to the other (when Control=0 the signal passes unchanged; when Control=1 it is inverted).

XOR Pins & Pinout

PinDirectionWidthLocation & Role
in0 .. in(N-1)Input (Left edge)1–32 bitsLocated at x = -50 (default 2 inputs at y = -10 and y = +10). Configurable from 2 to 8 inputs.
out0 (out)Output (Right tip)1–32 bitsLocated at (0, 0). Outputs 1 when an odd number of active inputs are 1 (A ⊕ B).

XOR Truth Table & Behavior

2-Input XOR Gate truth table (Y = A ⊕ B = A·~B + ~A·B)
ABY = A ⊕ BMeaning
000Inputs are equal → 0
011Inputs differ → 1
101Inputs differ → 1
110Inputs are equal → 0
0 or 1EEAny E input propagates to E

Related Circuits & Components