notesonly.in

One notebook for every subject — open it anywhere.

Log in

Universal Gates: Building Everything from NAND and NOR

NAND and NOR gates are called universal gates because any logic function can be built using only NAND gates, or using only NOR gates. This is very useful in manufacturing, because a chip maker can produce huge numbers of one gate type and still build every circuit.

Universality also simplifies design and reduces cost. Instead of stocking many gate types, engineers can convert AND, OR and NOT into NAND or NOR forms. Computer chips often use NAND heavily because it is fast and small in CMOS technology.

Key Concepts

  • NAND: Y = NOT (A · B). Output 0 only when both inputs are 1.
  • NOR: Y = NOT (A + B). Output 1 only when both inputs are 0.
  • NOT from NAND: Join both NAND inputs together. Output = NOT A.
  • AND from NAND: NAND followed by NOT made from another NAND.
  • OR from NAND: Invert both inputs first, then NAND them, using De Morgan law.
  • De Morgan laws: NOT (A · B) = (NOT A) + (NOT B), and NOT (A + B) = (NOT A) · (NOT B).

How It Works

  1. First show that NOT, AND and OR can each be made from NAND alone.
  2. Since any Boolean function can be written with AND, OR and NOT, NAND alone is sufficient for all logic.
  3. The same proof works for NOR: tie inputs for NOT, NOR plus NOT gives OR, and inverted inputs to NOR give AND.
  4. Conversion uses bubble pushing: an inversion at output can be moved to inputs by changing AND to OR or OR to AND.
  5. Practical circuits balance gate count, delay and power while using the chosen universal gate.

Worked Example

Build OR using NAND gates for inputs A = 1, B = 0. Step 1: NOT A = 0 using a NAND with tied inputs. Step 2: NOT B = 1. Step 3: NAND of 0 and 1 = NOT (0 · 1) = NOT 0 = 1. This matches OR output 1 + 0 = 1. Three NAND gates make one OR gate.

Common Misconceptions

  • Universal means strongest voltage: It means functionally complete, able to build all logic, not electrically stronger.
  • XOR cannot be made from NAND: It can, using four NAND gates in the standard arrangement.
  • Using one gate type is always slower: Conversions add gates, but mass production and CMOS efficiency often make NAND designs fastest overall.

Real-World Applications

  • NAND flash memory used in pen drives, SSDs and memory cards.
  • Standard cell libraries in chip design based mainly on NAND and NOR.
  • Programmable logic where identical gates are configured as needed.
  • Reducing inventory in digital trainer kits and industrial controllers.

NAND and NOR are universal because each can create NOT, AND and OR, and therefore any digital system. This single idea underlies low-cost manufacturing and modern memory and processor chips.