All computer chips are made from the same building blocks: elementary logic gates. A logic gate is a physical device that implements a mathematical logic (Boolean) function. The simplest example of a logic gate is the
NOT gate. It takes a single input and outputs its inverse. If the signal is ON, the inverter outputs OFF and vice versa. These gates can be constructed in many different ways but their logic behaviour remains consistent across all computers.
For this project, I started with the
Nand gate and then built all other gates from it. These standard set of gates were then used to construct the computer’s processing and storage chips.
Nand: the special one
Nand gate is designed to compute the following Boolean function:
| Input A | Input B | Nand(A, B) | | ------- | ------- | ---------- | | 0 | 0 | 1 | | 0 | 1 | 1 | | 1 | 0 | 1 | | 1 | 1 | 0 |
Nand function has an interesting property. Each one of the operations
Not can be constructed from it, and it alone.
x Or y = (x Nand x) Nand (y Nand y)
Since every Boolean function can be constructed from
Not operations using the canonical representation method, it follows that every Boolean function can be constructed from
Nand function alone. This is why
Nand gate was chosen as the primitive gate and the foundational element of all other gates in the project.