haya.Learning made clear
Unit XVIII · Applications of semiconductor devices (lesson 29)
9 min readConcept sheetSection A MCQ (1 mark) and objective (2 marks, two parts); Section B very short answer (2 marks) on why NAND is universal; Section B short answer (3 marks) on making NOT, AND and OR from NAND gates; also a NEET favourite

NAND and NOR gates: universal gates

NAND is AND followed by NOT; NOR is OR followed by NOT. Each is a universal gate: copies of it alone can make AND, OR and NOT.

NAND gateY = NOT(A·B): the output is 0 only when both inputs are 1
NOR gateY = NOT(A + B): the output is 1 only when both inputs are 0
Universal gateA gate from which AND, OR and NOT, and so every other gate, can be built
NAND as NOTJoin both inputs together: Y = NOT(A·A) = Ā

Truth tables of NAND and NOR

ABA·BNANDA + BNOR
000101
010110
100110
111010

How to draw the symbols

  • NAND: draw the AND D shape and add a small bubble at the output. Write Y = NOT(A·B), or A·B with a bar over it.
  • NOR: draw the OR shield shape with a bubble at the output. Write Y = NOT(A + B).
  • To show NAND as a combination, draw an AND gate whose output Y′ feeds a NOT gate giving Y. Do the same with OR and NOT for NOR.
  • NOR with diodes and a transistor: feed the output of the diode OR gate into the base of the transistor NOT gate (the switch). The OR output is inverted, so Y = NOT(A + B). A diode AND gate followed by the transistor NOT gives a NAND gate in the same way.
  • The bubble always means invert.

Building NOT, AND and OR from NAND gates

Below, A′ means NOT A (the same as Ā).

  1. 1
    NOT: join the two inputs of one NAND gate. Then A = B, and Y = NOT(A·A) = Ā.
  2. 2
    AND: feed A and B into a NAND gate, then pass its output through a second NAND used as a NOT. Inverting NOT(A·B) gives back A·B.
  3. 3
    OR: first invert A and B with two NAND gates used as NOTs, giving A′ and B′. Feed these into a third NAND.
  4. 4★
    The third NAND gives NOT(A′·B′), which equals A + B, as the table below shows. So three NAND gates make an OR gate.

★ key step

Checking the three-NAND OR gate

ABA′ = NOT AB′ = NOT BY = NOT(A′·B′)
00110
01101
10011
11001

Building gates from NOR gates

  • NOT: join both inputs of one NOR gate: Y = NOT(A + A) = Ā.
  • OR: a NOR gate followed by a second NOR used as a NOT gives A + B.
  • AND: invert A and B with two NOR gates, then feed A′ and B′ into a third NOR. Y = NOT(A′ + B′) = A·B.
  • So NOR, like NAND, is a universal gate.

Worked example: a two-gate puzzle

Problem

The output of a NAND gate (inputs A and B) is fed to both inputs of a second NAND gate. Find the final output Y for all four input combinations. Which gate does the pair make?

Working
  1. The first NAND gives NOT(A·B): 1, 1, 1 and 0 for the inputs 00, 01, 10 and 11.
  2. The second NAND has its inputs joined, so it acts as a NOT and inverts these.
  3. Final Y: 0, 0, 0 and 1.
Answer

Y = A·B: the pair works as an AND gate

In real life

Chip makers often build whole circuits from NAND gates alone, because one well-made gate repeated millions of times is cheaper and more reliable. The memory card in a phone uses NAND flash, named after this gate.

Exam angle

2 marks: “Why is the NAND gate called a universal gate? Show how a NOT gate can be made from a NAND gate.” AND, OR and NOT, and so any gate, can be built using NAND gates alone. Join both inputs: Y = NOT(A·A) = Ā; input 0 gives 1 and input 1 gives 0.

3 marks: “Show, with a diagram and a truth table, how an OR gate can be made using only NAND gates.” Two NANDs with joined inputs give A′ and B′; a third NAND gives NOT(A′·B′). Table: 00 gives 0, 01 gives 1, 10 gives 1, 11 gives 1, which is OR.

1 marks: “What is the output of a NOR gate when both its inputs are 0?” 1.

Remember it

NAND is 0 only for 1-1. NOR is 1 only for 0-0. The bubble means NOT.