Home »
Digital Electronics
Universal Logic Gates (NAND, NOR)
Universal Logic Gates: In this tutorial, we are going to learn about the Universal Logic Gates which are NAND Gate and NOR Gate.
Submitted by Saurabh Gupta, on November 13, 2019
NAND and NOR Gates are known as Universal Logic Gates, because we can realize any logic circuit or gate only by using NAND or NOR gates singlehandedly.
Although the logic circuit of any complexity can be realized using three basic gates i.e., AND, OR, NOT Gates, but they can also be realized using only a single type of gate, that is why sometimes NAND and NOR gates are called "universal building blocks". Thus, AOI logic can be converted into NAND or NOR logic.
1) NAND Gate
NAND Gate is a combination of two gates. It is an AND Gate followed by a NOT Gate where the output of AND Gate is inverted using a NOT Gate to get the final output. The logic operation for the NAND gate can be written as Y= A.B
Symbol and Truth Table for a twoinput NAND Gate is:
2) NOR Gate
NOR Gate is also a combination of two gates namely, OR Gate followed by a NOT Gate where the output of OR Gate is inverted using a NOT Gate to get the final output. The logic operation of NOR Gate can be written as Y = A+B
Question 1: Realize the following gates by only using NAND Gates.
 AND
 OR
 NOT
 NOR
 XOR
 XNOR
Answer:

AND Gate can be implemented using NAND Gate as:

OR Gate can be implemented using NAND Gate as:

NOT Gate can be implemented using NAND Gate as:

NOR Gate can be implemented using NAND Gate as:

XOR Gate can be implemented using NAND Gate as:

XNOR Gate can be implemented using NAND Gate as:
Question 2: Realize the following gates by only using NOR Gates.
 AND
 OR
 NOT
 NOR
 XOR
 XNOR
Answer:

AND Gate can be implemented using NOR Gate as:

OR Gate can be implemented using NOR Gate as:

NOT Gate can be implemented using NOR Gate as:

NAND Gate can be implemented using NOR Gate as:

XOR Gate can be implemented using NOR Gate as:

XNOR Gate can be implemented using NOR Gate as:
TOP Interview Coding Problems/Challenges