XOR Gate using transistors

Published: 12 February 2026

The XOR Gate is a basic digital logic gate that implements the logical XOR function. It has two inputs and one output.
The XOR gate can be built using a combination of AND, NAND, and OR Gates.
The full truth table showing all input and output states can be found below. Each row represents a physical state of the circuit.

Truth table

Input A Input B Output
0 0 0
0 1 1
1 0 1
1 1 0

Logic scheme

The inputs and output in the scheme correspond to the truth table headers.

Implementation

For the implementation, NPN 2N2222A transistors were used.

The video demonstrates the circuit behavior for all input states.