NAND gates and NOR gates are basic logic gates with particularly powerful properties. They have a lower transistor cost than their AND/OR counterparts and are also universal gates (i.e., any digital circuit can be implemented solely in NAND/NOR1). Any SOP function can be implemented with only NAND gates, and any POS function can be implemented with only NOR gates.
Transistor-level implementation
Below are CMOS-style implementations of NAND and NOR. Observe that both cost four transistors (two NMOS, two PMOS), which is a benefit of the gates.
AND and OR would require the output to be chained onto an inverter, adding two transistors to their cost.
Equivalent circuits
We can convert circuits to only use NAND or NOR:
Footnotes
-
The Apollo flight computers only used NOR gates! ↩