# Universal Gates in Digital Electonics – NAND and NOR

In one of our previous post, we provided a quick snapshot of digital electronic logic gates. NAND and NOR gates are called as Universal Gates as they can be used to create all other logic gates. These two gates are the digital building blocks. Very quickly, below are the symbols, boolean expression and truth table of NAND and NOR gates:

Now let us see how each logic gate can be created with NAND and NOR gates. (Apologies for the quality of images)

### Using NAND Gate

a) NOT Gate
Short the two inputs together as shown in the image below:

NOT gate using NAND

b) AND Gate
Add NOT Gate to the output of NAND GATE as shown in the image below:

AND gate using NAND

c) OR Gate
Invert the inputs A and B of a NAND Gate by using two NOT Gates as shown in the image below:

OR gate using NAND

d) NOR Gate
Add NOT Gate to the output of OR Gate as shown in the image below:

NOR gate using NAND

e) XOR Gate

XOR gate using NAND

f) XNOR Gate
XOR + NAND Inverter(NOT) = XNOR i.e. Add NOT Gate to the output of XOR gate as shown in the image above. Here is the boolean algebra for XNOR gate:

### Using NOR Gate

a) NOT Gate
Short the two inputs together as shown in the image below:

NOT gate using NOR

c) OR Gate
Add NOT Gate to the output of NOR GATE as shown in the image below:

OR gate using NOR

b) AND Gate
Invert the inputs A and B of a NOR Gate by using two NOT Gates as shown in the image below:

AND gate using NOR

d) NAND Gate
Add NOT Gate to the output of AND Gate as shown in the image below:

NAND gate using NOR

e) XNOR Gate

XNOR gate using NOR

f) XOR Gate
XNOR + NOR = XOR i.e. Add NOR gate to the ouptut of XNOR gate. Here is the boolean algebra for XOR gate:

Hope you find the information presented here useful. Please leave your footprints in the comments section below for any queries, feedback or suggestions…!!

1. Thanks , the way you have described, its nice.

2. O mean what on and gates input

3. Thanks admin, your website is awesome. thanks for sharing the knowledge in such a decent way.. It helped me a lot.

4. good usefull one for online studies .It explained in clear manner

5. I have a question. In the first part of NAND gate,’section f. In explaining the boolean algebra, how is (A.B’ + A’B)’ = (A. B’)’ . (A’B)’?
How did the “+” become “.” ?

6. This design is steller! You certainly know how