XOR gate (exclusive OR)

Exclusive OR: the output is 1 when an odd number of inputs are 1 — with two inputs, “1 when they differ”.

Truth table

ABY
000
011
101
110

Pins

2–8 inputs on the left, one output on the right.

How to use it

Half-adder sum S = A⊕B, spotting differing bits, parity checks. With one input as a control, it's a switchable inverter.

Usage example

Outputs 1 when the inputs differ (A = 1, B = 0 here). Used for an adder's sum bit and for checking whether two bits differ.

Try this circuit in Norro

Related parts(Logic gates)

← All parts