You are on page 1of 14

EXPERIMENT 2

AIM: Configuring NAND and NOR logic gates as universal gates.

Virtual Lab Link:


Welcome to Virtual Labs - A MHRD Govt of india Initiative (vlabs.ac.in)
Online Circuit Simulator Link:
https://www.deldsim.com/simulator/

Components
 IC 7400 2 input NAND Gate.

 IC 7402 2 input NOR Gate

Theory:

Universal Logic Gates


The NAND and NOR gates are the complements of the AND and OR functions respectively
and are individually a complete set of logic as they can be used to implement any other
Boolean function or gate. But as we can construct other logic switching functions using just
these gates on their own, they are both called a minimal set of gates. Thus, the NAND and the
NOR gates are commonly referred to as Universal Logic Gates.

Implementation of Universal Logic Gates Function Using Only NAND


NAND gate is actually a combination of two logic gates i.e. AND gate followed by NOT gate. So
its output is complement of the output of an AND gate. This gate can have minimum two inputs.
By using only NAND gates, we can realize all logic functions: AND, OR, NOT, Ex-OR, Ex-
NOR, NOR. So this gate is also called as universal gate.

NAND gates as OR gate


From DeMorgan’s theorems:
(A.B)’ = A’ + B’
(A’.B’)’ = A’’ + B’’ = A + B
So, give the inverted inputs to a NAND gate, obtain OR operation at output.

NAND gates as AND gate


A NAND produces complement of AND gate. So, if the output of a NAND gate is inverted,
overall output will be that of an AND gate.
Y = ((A.B)’)’
Y = (A.B)
Digital Electronics (01EC0102) 2nd Semester page no
NAND gates as Ex-OR gate
The output of a two input Ex-OR gate is shown by:
Y = A’B + AB’.
This can be achieved with the logic diagram shown in the left side.

NAND gates as Ex-NOR gate


Ex-NOR gate is actually Ex-OR gate followed by NOT gate. So, give the output of Ex-OR gate to
a NOT gate, overall output is that of an Ex-NOR gate.
Y = AB+ A’B’

Thus, ALL other logic gate functions can be created using only NAND gates making it a universal
logic gate.
Implementation of Universal Logic Gates Function Using Only NOR
NOR gate is actually a combination of two logic gates: OR gate followed by NOT gate. So, its
output is complemented of the output of an OR gate. This gate can have minimum two inputs,
output is always one. By using only NOR gates, we can realize all logic functions: AND, OR,
NOT, Ex-OR, Ex-NOR, NAND. So, this gate is also called universal gate.

Digital Electronics (01EC0102) 2nd Semester page no


NOR gates as OR gate
A NOR produces complement of OR gate. So, if the output of a NOR gate is inverted, overall
output will be that of an OR gate.
Y = ((A+B)’)’
Y = (A+B)

NOR gates as AND gate


From DeMorgan’s theorems:
(A+B)’ = A’B’
(A’+B’)’ = A’’B’’ = AB
So, give the inverted inputs to a NOR gate, obtain AND operation at output.

NOR gates as Ex-OR gate


Ex-OR gate is actually Ex-NOR gate followed by NOT gate. So give the output of Ex-NOR gate
to a NOT gate, overall output is that of an Ex-OR gate.
Y = A’B+ AB’

NOR gates as Ex-NOR gate


The output of a two input Ex-NOR gate is shown by: Y = AB + A’B’. This can be achieved with
the logic diagram shown in the left side.

Digital Electronics (01EC0102) 2nd Semester page no


Thus, ALL other logic gate functions can be created using only NOR gates making it also a
universal logic gate.

Note also that the implementation of the Exclusive-OR gate is more efficient using NAND gates
compared to using NOR gates, while the implementation of the Exclusive-NOR gate is more
efficient with NOR gates compared to using NAND gates as in each case only four individual
logic gates are required. In other words we can create all the Boolean functions using just one
7400 NAND or one 7402 NOR chip including its various sub-families.

Draw Logic Diagram:

Basic Gates using NAND Gates:

Basic Gates using NOR Gates


Digital Electronics (01EC0102) 2nd Semester page no
Procedure:

To create all the basic logic gates using nand gate:

1. NOT Gate: Connect both inputs of the NAND gate together to create an inverter.
2. AND Gate: Connect two NAND gates in series. Connect the inputs to the first
NAND gate, and connect the output of the first NAND gate to the input of the
second NAND gate.
3. OR Gate: Connect two NAND gates in parallel. Connect the inputs of both NAND
gates to the same inputs, and connect the outputs of both NAND gates to a third
NAND gate.
4. NOR Gate: Connect two NAND gates in series, and then connect a third NAND
gate to the outputs of the first two NAND gates.
5. XOR Gate: Use a combination of NAND gates to create an XOR gate. One way to
do this is to use four NAND gates in total.
6. XNOR Gate:
To create an XNOR Gate from NAND Gate we will require total 5 NAND gate.
The first NAND Gate output will be : (A.B)'
Output of the second and third NAND Gate respectively: (A. (A.B)')' and (B. (A.B)')'
Output of the fouth output is : ((A. (A.B)')' . B. (A.B)')'

To create all the basic logic gates using nor gate:

1. NOT Gate (Inverter):


 Connect one input of the NOR gate to both of its inputs.
 The output of the NOR gate will be the NOT of the input.
2. AND Gate:
 Connect the inputs of two NOR gates together.
 Connect the output of these NOR gates to another NOR gate.
 The output of this final NOR gate will be the AND of the inputs.
3. OR Gate:
 Connect the inputs of two NOR gates to separate inverters (NOT gates).
 Connect the outputs of these NOR gates to another NOR gate.
 The output of this final NOR gate will be the OR of the inputs.
4. NAND Gate:
 Create an AND gate using NOR gates as described above.
 Connect the output of the AND gate to a NOT gate (inverter).
 The output of this NOT gate will be the NAND of the inputs.
5. XOR Gate:
Digital Electronics (01EC0102) 2nd Semester page no
Use a combination of NOR gates and other gates to create an XOR gate.
 Connect the inputs to the gates as needed to achieve the XOR functionality.
6. XNOR Gate:
 Use a combination of NOR gates and other gates to create an XNOR gate.
 Connect the inputs to the gates as needed to achieve the XNOR
functionality.

Paste your delsim simulation result screen shot here:

Digital Electronics (01EC0102) 2nd Semester page no


Digital Electronics (01EC0102) 2nd Semester page no
Digital Electronics (01EC0102) 2nd Semester page no
Digital Electronics (01EC0102) 2nd Semester page no
Paste your virtual lab logic circuit result here:

Digital Electronics (01EC0102) 2nd Semester page no


Digital Electronics (01EC0102) 2nd Semester page no
Conclusion:

The conclusion of an experiment where all gates are implemented using only NAND
or NOR gates is that NAND and NOR gates are universal gates, meaning that any
logical function can be implemented using only NAND gates or only NOR gates. This
is a fundamental concept in digital logic design, demonstrating that complex logic
circuits can be constructed from just one type of gate.

Post Lab Exercise

1. Logically, the output of a NOR gate would have the same Boolean expression as a(n):
A. NAND gate immediately followed by an inverter

B. OR gate immediately followed by an inverter

C. AND gate immediately followed by an inverter

D. NOR gate immediately followed by an inverter

2. If a 3-input NOR gate has eight input possibilities, how many of those possibilities will result in a
HIGH output?
A. 1

B. 2

C. 7

D. 8

Digital Electronics (01EC0102) 2nd Semester page no


3. The output of a NOR gate is HIGH if ________.
A. all inputs are HIGH

B. any input is HIGH

C. any input is LOW

D. all inputs are LOW


4. What does the small bubble on the output of the NAND gate logic symbol mean?
A. open collector output

B. tri-state

C. The output is inverted.

D. none of the above


5. The NOR logic gate is the same as the operation of the ________ gate with an inverter connected to
the output.
A. OR

B. AND

C. NAND

D. none of the above


6. The logic expression for a NOR gate is ________.
A.

B.

C.

D.
7. Which of the following gates is described by the expression ?
A. OR

B. AND

C. NOR

D. NAND
8. How many entries would a truth table for a four-input NAND gate have?
A. 2

B. 8

C. 16

D. 32
9. From the truth table for a three-input NOR gate, what is the only condition of inputs A, B, and C that
will make the output X high?

Digital Electronics (01EC0102) 2nd Semester page no


A. A = 1, B = 1, C = 1

B. A = 1, B = 0, C = 0

C. A = 0, B = 0, C = 1

D. A = 0, B = 0, C = 0
10. The logic gate that will have a LOW output when any one of its inputs is HIGH is the:
A. NAND gate

B. AND gate

C. NOR gate

D. OR gate

Sign: Date:

Digital Electronics (01EC0102) 2nd Semester page no

You might also like