Related Concepts: 03 Logic Gate Characteristics & Buffer Gates | 07 Boolean Algebra Foundations & Duality Principle | 09 XOR Gate Properties, Parity Generator & Error Checking

10 Universal Logic Gates (NAND & NOR Implementation)

What is a Universal Logic Gate?

A logic gate is classified as Universal if any arbitrary Boolean function or digital logic circuit can be completely implemented using only that single type of gate, without requiring any other logic gates {such as separate AND, OR, or NOT gates}.

In digital electronics, both NAND and NOR gates are Universal Gates.


1. NAND Gate Realizations

The fundamental rule for NAND gate synthesis relies on input tying:

Tying both inputs of a 2-input NAND gate together transforms it into a NOT Gate (Inverter). Proof: .

NAND as NOT:  A ---+---\ NAND )o---> A'
                   +---/
graph TD
    subgraph 4-NAND Gate XOR Network
        InA[Input A] & InB[Input B] --> NAND1[NAND 1: Output N1 = AB']
        InA & NAND1 --> NAND2[NAND 2: Output N2 = A • N1 ']
        InB & NAND1 --> NAND3[NAND 3: Output N3 = B • N1 ']
        NAND2 & NAND3 --> NAND4[NAND 4: Output F = A ⊕ B]
    end

Implementing 5 Basic Logic Gates Using NAND Gates Only:

1. NOT Gate (Requires 1 NAND Gate)

  • Circuit: Connect input signal to both inputs of a single NAND gate.
  • Equation: .

2. AND Gate (Requires 2 NAND Gates)

  • Circuit:
    1. Pass inputs and into NAND Gate 1 Output = .
    2. Invert the output using NAND Gate 2 (inputs tied together).
  • Equation: .

3. OR Gate (Requires 3 NAND Gates)

  • Circuit:
    1. Pass input through NAND Gate 1 (as NOT) .
    2. Pass input through NAND Gate 2 (as NOT) .
    3. Feed and into NAND Gate 3.
  • Equation: (by De Morgan’s Law).

4. NOR Gate (Requires 4 NAND Gates)

  • Circuit: Take the 3-NAND OR gate output () and pass it through a 4th NAND gate acting as an inverter.
  • Equation: .

5. XOR Gate (Requires 4 NAND Gates)

  • Circuit Network:
    1. NAND 1: Receives inputs and .
    2. NAND 2: Receives input and output of NAND 1 .
    3. NAND 3: Receives input and output of NAND 1 .
    4. NAND 4: Receives outputs of NAND 2 and NAND 3.
  • Equation: .

6. XNOR Gate (Requires 5 NAND Gates)

  • Circuit: Pass the 4-NAND XOR output () through a 5th NAND gate acting as an inverter.
  • Equation: .

2. NOR Gate Realizations

The fundamental rule for NOR gate synthesis relies on input tying:

Tying both inputs of a 2-input NOR gate together transforms it into a NOT Gate (Inverter). Proof: .

NOR as NOT:   A ---+---\ NOR  )o---> A'
                   +---/
graph TD
    subgraph 5-NOR Gate XOR Network
        InA[Input A] & InB[Input B] --> NOR1[NOR 1: Output N1 = A+B ']
        InA & NOR1 --> NOR2[NOR 2: Output N2 = A + N1 ']
        InB & NOR1 --> NOR3[NOR 3: Output N3 = B + N1 ']
        NOR2 & NOR3 --> NOR4[NOR 4: Output N4 = A ⊙ B XNOR]
        NOR4 --> NOR5[NOR 5 Inverter: Output F = A ⊕ B XOR]
    end

Implementing 5 Basic Logic Gates Using NOR Gates Only:

1. NOT Gate (Requires 1 NOR Gate)

  • Circuit: Connect input signal to both inputs of a single NOR gate.
  • Equation: .

2. OR Gate (Requires 2 NOR Gates)

  • Circuit:
    1. Pass inputs and into NOR Gate 1 Output = .
    2. Invert the output using NOR Gate 2 (inputs tied together).
  • Equation: .

3. AND Gate (Requires 3 NOR Gates)

  • Circuit:
    1. Pass input through NOR Gate 1 (as NOT) .
    2. Pass input through NOR Gate 2 (as NOT) .
    3. Feed and into NOR Gate 3.
  • Equation: (by De Morgan’s Law).

4. XNOR Gate (Requires 4 NOR Gates)

  • Circuit Network:
    1. NOR 1: Receives inputs and .
    2. NOR 2: Receives input and output of NOR 1 .
    3. NOR 3: Receives input and output of NOR 1 .
    4. NOR 4: Receives outputs of NOR 2 and NOR 3.
  • Equation: (The XNOR function).

5. XOR Gate (Requires 5 NOR Gates)

  • Circuit: Pass the 4-NOR XNOR output () through a 5th NOR gate acting as an inverter.
  • Equation: .

3. Summary of Gate Counts for Universal Realizations

Target Logic GateNumber of NAND Gates RequiredNumber of NOR Gates Required
NOT11
AND23
OR32
NAND1 (Native)4
NOR41 (Native)
XOR45
XNOR54

Past Year Questions (PYQs)

5-Gate NOR Network Verification PYQ

Question: Show mathematically that the 5-gate NOR network circuit yields an Exclusive-OR (XOR) output.

Proof Solution:

  1. Output of NOR 1: .
  2. Output of NOR 2: .
  3. Output of NOR 3: .
  4. Output of NOR 4 (XNOR): .
  5. Output of NOR 5 (Inverter): .
  6. Thus, the 5-gate NOR network is proven to yield an XOR gate.