Concept:
In digital logic design, a universal gate is a logic gate that can implement any Boolean function on its own, without needing any other type of gate. The basic logic gates—AND, OR, and NOT—form a functionally complete set, meaning any logic circuit can be built using a combination of them. If a single gate can replicate the functions of all three basic gates, it is classified as a universal gate.
There are two primary universal gates used in digital systems: NAND and NOR.
Let us demonstrate the universality of the NAND gate by showing how it can be configured to recreate the three fundamental logic operations:
• Realizing a NOT Gate operation using NAND:
By tying both inputs of a 2-input NAND gate together to a single input variable \(A\):
\[
\text{Output} = \overline{A \cdot A} = \bar{A}
\]
This exactly matches the behavior of a standard logical NOT inverter.
• Realizing an AND Gate operation using NAND:
By passing the output of a standard NAND gate through a NAND-configured NOT inverter:
\[
\text{Output} = \overline{\left(\overline{A \cdot B}\right)} = A \cdot B
\]
This exactly matches a logical AND operation.
• Realizing an OR Gate operation using NAND:
By first inverting each input using NAND-configured NOT gates, and then feeding those inverted signals into a third NAND gate:
\[
\text{Output} = \overline{\bar{A} \cdot \bar{B}}
\]
Applying De Morgan's theorem (\(\overline{X \cdot Y} = \bar{X} + \bar{Y}\)) simplifies this expression to:
\[
\text{Output} = \overline{(\bar{A})} + \overline{(\bar{B})} = A + B
\]
This exactly matches a logical OR operation.
Since the NAND gate can reproduce the NOT, AND, and OR functions, it is a universal gate.