Menu

Theme

Component reference · Reference · CHECKED ON 5.0.0

Logisim XOR gate and every other logic gate, tested

The Logisim XOR gate and its siblings live in the Gates library, which has NOT, Buffer, AND, OR, NAND, NOR, XOR, XNOR, Odd Parity, Even Parity, Controlled Buffer, Controlled Inverter and PLA. Set the number of inputs and Data Bits on the gate, and rotate it with Facing. With three or more inputs, XOR is 1 when exactly one input is 1 unless you change its XOR behaviour to an odd number of inputs on.
FOR
Anyone building combinational circuits
CHECKED
11 Nov 2026
Checked against Logisim-evolution 5.0.0 on 1 machines
On this page

The gates at a glance

Thirteen parts sit in the Gates library. Twelve are shown here with truth tables read from our test circuit, which Logisim-evolution 5.0.0 reproduced row for row (F85). The thirteenth, PLA, is described below.

NOT gate

Inverts one input.

Truth table of the NOT gate
AOut
01
10

Buffer

Passes the value on unchanged. Adds a delay step and shows the bus width.

Truth table of the Buffer
AOut
00
11

AND gate

1 only when all inputs are 1.

Truth table of the AND gate
ABOut
000
010
100
111

OR gate

1 when any input is 1.

Truth table of the OR gate
ABOut
000
011
101
111

NAND gate

AND followed by NOT.

Truth table of the NAND gate
ABOut
001
011
101
110

NOR gate

OR followed by NOT.

Truth table of the NOR gate
ABOut
001
010
100
110

XOR gate

1 when the two inputs differ. With three or more inputs see below.

Truth table of the XOR gate
ABOut
000
011
101
110

XNOR gate

1 when the two inputs are equal.

Truth table of the XNOR gate
ABOut
001
010
100
111

Odd Parity gate

1 when an odd number of inputs are 1. Same as XOR for two inputs.

Truth table of the Odd Parity gate
ABOut
000
011
101
110

Even Parity gate

1 when an even number of inputs are 1. Same as XNOR for two inputs.

Truth table of the Even Parity gate
ABOut
001
010
100
111

Controlled Buffer

Passes A when C is 1, and drives nothing (U) when C is 0.

Truth table of the Controlled Buffer
ACOut
00U
010
10U
111

Controlled Inverter

Passes NOT A when C is 1, and drives nothing (U) when C is 0.

Truth table of the Controlled Inverter
ACOut
00U
011
10U
110
circ-gates-gallery · mainscroll to see all
AaBbCcanotNOTnotabufBUFbufabandANDandaborORorabnandNANDnandabnorNORnorabxorXORxorabxnorXNORxnorOddParaboddODDoddEvenPaabevenEVENevenaccbufCBUFcbufaccinvCINVcinv
All twelve gates in one circuit, with inputs A, B and C. The controlled gates use C as their control. CC BY 4.0 · SHA-256 77d4ae1e1fa0
Describe this circuit

Components: Input pin A; Input pin B; Input pin C; NOT Gate 1; Output pin NOT; Buffer 1; Output pin BUF; AND Gate 1; Output pin AND; OR Gate 1; Output pin OR; NAND Gate 1; Output pin NAND; NOR Gate 1; Output pin NOR; XOR Gate 1; Output pin XOR; XNOR Gate 1; Output pin XNOR; Odd Parity 1; Output pin ODD; Even Parity 1; Output pin EVEN; Controlled Buffer 1; Output pin CBUF; Controlled Inverter 1; Output pin CINV.

  • Input pin A connects to NOT Gate 1, Buffer 1, AND Gate 1, OR Gate 1, NAND Gate 1, NOR Gate 1, XOR Gate 1, XNOR Gate 1, Odd Parity 1, Even Parity 1, Controlled Buffer 1, Controlled Inverter 1 (net A, a).
  • Input pin B connects to AND Gate 1, OR Gate 1, NAND Gate 1, NOR Gate 1, XOR Gate 1, XNOR Gate 1, Odd Parity 1, Even Parity 1 (net B, b).
  • Input pin C connects to Controlled Buffer 1, Controlled Inverter 1 (net C, c).
  • NOT Gate 1 connects to Output pin NOT (net not, NOT).
  • Buffer 1 connects to Output pin BUF (net buf, BUF).
  • AND Gate 1 connects to Output pin AND (net and, AND).
  • OR Gate 1 connects to Output pin OR (net or, OR).
  • NAND Gate 1 connects to Output pin NAND (net nand, NAND).
  • NOR Gate 1 connects to Output pin NOR (net nor, NOR).
  • XOR Gate 1 connects to Output pin XOR (net xor, XOR).
  • XNOR Gate 1 connects to Output pin XNOR (net xnor, XNOR).
  • Odd Parity 1 connects to Output pin ODD (net odd, ODD).
  • Even Parity 1 connects to Output pin EVEN (net even, EVEN).
  • Controlled Buffer 1 connects to Output pin CBUF (net cbuf, CBUF).
  • Controlled Inverter 1 connects to Output pin CINV (net cinv, CINV).

Download circ-gates-gallery.circ.

XOR with three or more inputs

Set Number Of Inputs to 3 and the XOR gate’s default behaviour is “exactly one input is on”, not parity. The second setting makes it a parity gate, like chained two-input XORs.

One gate with the default and one with the odd-number setting (F39). Only the row 1 1 1 differs. The file stores the second setting as xor = odd.
#ABCDefaultOdd number on
00000
00111
01011
01100
10011
10100
11000
11101

circ-gates-xor-3-input · mainscroll to see all
AaBbCcabconeOneoneabcoddOddodd
Two 3-input XOR gates: the top uses the default, the bottom the odd-number setting. CC BY 4.0 · SHA-256 a59b63ffdbef
Describe this circuit

Components: Input pin A; Input pin B; Input pin C; XOR Gate 1; Output pin One; XOR Gate 2; Output pin Odd.

  • Input pin A connects to XOR Gate 1, XOR Gate 2 (net A, a).
  • Input pin B connects to XOR Gate 1, XOR Gate 2 (net B, b).
  • Input pin C connects to XOR Gate 1, XOR Gate 2 (net C, c).
  • XOR Gate 1 connects to Output pin One (net one, One).
  • XOR Gate 2 connects to Output pin Odd (net odd, Odd).

Inputs: how many, inverted, unconnected

Number Of Inputs

Gates take 2 to 64 inputs in 5.0.0. A new gate has 2 inputs; in classic 2.7.1 the default instance has 5 (the default instance has 3 ports in 5.0.0 and 6 in 2.7.1, F23). Course screenshots from 2.7.1 often show 5-input gates with unused inputs.

Negate an input

Each input has a Negate attribute that draws a bubble on it. We tried to build a gate with one negated input in a generated file and did not get the expected table, so we do not publish a tested result. If you need an inverted input and want a result you can check, put a NOT gate in front of it.

Unconnected inputs

Third input left unconnected, default project options. No U or E appears (F40).
#ABAND, 3 inputsOR, 3 inputs
0000
0101
1001
1111

A spare input does no harm, but an input you meant to wire and missed is silently ignored: check the connection dots. The project option Gate Output When Undefined can change this; we did not test its other setting.

Multi-bit gates

Data Bits above 1 makes a bitwise gate.

A 4-bit AND. Each bit is ANDed separately.
#ABY
0x00x00x0
0x50x30x1
0xa0xc0x8
0xf0x90x9
0xf0xf0xf
0x60x60x6

Rotate, resize and switch shapes

Select a gate and change Facing in the Properties panel to rotate it. The Gate Size attribute changes its width. The gate shape (distinctive or rectangular) is a Preference, and the command line takes –gates ANSI or –gates IEC (the option and its error text are in the error list). We did not test the shape setting in the window.

Buffers, tri-state and buses

A Controlled Buffer passes its input when its control is 1 and drives nothing when the control is 0. Two of them on one wire make a shared bus. Our test gave this table (F10):

Two Controlled Buffers on one wire: nothing enabled gives U, one gives its value, both enabled give the value if equal and E if different.
#ABSelASelBY
0000U
00010
00100
00110
0100U
01011
01100
0111E
1000U
10010
10101
1011E
1100U
11011
11101
11111

See wire colours for the circuit and what red means. A plain Buffer is useful for adding one step of delay, for fan-out, and for showing a width.

PLA

The Gates library also holds a PLA (programmable logic array). It has a program table you edit in a dialog. We did not test it. To turn a truth table into gates instead, use Combinational Analysis.

Transistors and transmission gates

They sit in the Wiring library, not Gates. Logisim models them as simple switches. We did not test them for this page.

Common mistakes

  • Expecting a 3-input XOR to be parity: it is not, by default.
  • Leaving a gate input unconnected and not noticing: it is ignored (F40).
  • Two outputs on one wire: red wire, E (F07).
  • A loop through gates with a defined start value: Oscillation apparent.
  • Copying a 5-input gate from an old screenshot: new gates have 2 inputs.

Version differences

Feature2.7.15.0.0
Default number of inputs2.7.1: yes5 (6 ports)5.0.0: yes2 (3 ports)
PLA2.7.1: untestednot in our 2.7.1 component list5.0.0: yesin the Gates library
Parity gates and controlled gates2.7.1: untested5.0.0: yestested (F85)
Maximum Number Of Inputs2.7.1: untested5.0.0: partial64, per the documentation

Cells say untested where we did not run 2.7.1. See also all components.

Frequently asked questions

How do I make an XOR gate with 3 inputs in Logisim?

Set Number Of Inputs to 3 on the XOR gate. By default it is 1 only when exactly one input is 1. To get a parity gate, change its XOR behaviour to an odd number of inputs on. With inputs 1, 1, 1 we saw 0 with the default and 1 with the odd setting (F39).

How do I invert one input of a gate?

Gates have a Negate attribute for each input, which draws a bubble. We could not confirm the result in a generated file, so for a tested alternative put a NOT gate in front of the input.

How do I rotate a gate?

Select the gate and change Facing in the Properties panel.

What is a controlled buffer used for?

It lets several sources share one wire: when its control is 0 it drives nothing, so another source can. In our test it gave U when disabled (F85).

Why is my gate's output E?

Two outputs drive the same wire with different values, or a loop never settles. See the wire colours page.

How do I switch between rectangular and distinctive gate shapes?

In the Preferences, and with the --gates ANSI or IEC option on the command line. We list the option in the error messages but did not test the shape setting.

Does Logisim simulate gate delay?

Each component has a fixed delay inside one global schedule, according to the project's documentation. This is why symmetric loops such as a NOR latch can oscillate.

Sources

  1. Gate truth tables on Logisim-evolution 5.0.0, logisim.dev lab data: src/content/circuits/circ-gates-*, test-data/lab2-2026-11-09-components/tables/

Try: , , ,