Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Laboratory Activity 2 (Multisim)

De Morgan’s Theorem & Universal Logic Gates

OBJECTIVES:
De Morgan’s Theorem & Universal Logic Gates
1. Verify De Morgan’s theorem
2. Use NAND circuit to operate as an OR gate
3. Use NOR circuit to operate as an AND gate

EQUIPMENT AND MATERIALS:


Part 1
Laptop with Multisim
5V DC power source
1 7400 or 74LS00 Quad 2-input NAND gate IC
1 7402 or 74LS02 Quad 2-input NOR gate IC
1 7404 or 74LS04 Hex Inverter IC
1 7408 or 74LS08 Quad 2-input AND gate IC
1 7432 or 74LS32 Quad 2-input OR gate IC
1 LED
1 47 ohms 1/4W resistor

PROCEDURE

De Morgan’s theorem states that inversion or negation of a Boolean expression may be


accomplished by negating each variable and changing each AND to OR and each OR to
AND. The equations below generalize De Morgan’s theorem.
1. Verifying the OR Expression
Building the circuit
a. Build the circuit as shown in Figure 1 using the materials listed.
b. Use the datasheets available on the internet for proper pin assignment of the
ICs to be used.
c. Label the inputs A and B of your circuit.
d. Connect the Vcc pins of the IC to the +5V output of the power supply.
e. Connect the GND pins of the ICs to the ground output of the power supply.

Figure 1. The OR Circuit with LED Indicator

2. Testing the Circuit

a. With the inputs initially set to ground, apply power to the circuit by
turning on the power supply.
b. Observe the output in the LED indicator or monitor the voltage and
current flowing across the LED. If the LED indicator is in the ON state
or emits light, the gate output is high or logic 1 and if it is in the OFF
state, the gate output is low or logic 0.
c. Record the status of the LED indicator in Table 1.
d. Apply the other available combinations for inputs A and B as given in
Table 1 and repeat procedure c above.
e. Specify the logic value of the obtained outputs in the last column of Table
1.
Figure 1A. Both Inputs Connected to the Ground

Figure 1B. Input A Connected to the Ground and Input B Connected to the Power
Supply
Figure 1C. Input A Connected to the Power Supply and Input B Connected to the Ground

Figure 1D. Both Inputs Connected to the Power Supply


Table 1. Truth Table of the OR Gate.

INPUT A INPUT B LED LOGIC LOGIC OUTPUT


INDICATOR VALUE VALUE OF LOGIC
(ON/OFF) OF A B VALUE

GND GND OFF 0 0 0

GND +5V ON 0 1 1

+5V GND ON 1 0 1

+5V +5V ON 1 1 1

The circuit expressions are: (A’B’)’ = A + B

Table 1 shows the truth table of the OR circuit. The LED indicator is in the ON
state if the logic value is 1 and it is in the OFF state when the logic value is 0. The table
shows the different combinations done in the simulation. When both inputs are connected
to the ground, the LED indicator is in the OFF state and the logic value is 0. When a
ground is connected to one input and a power supply to the other, the LED indicator is in
the ON state and the circuit has a logic output value of 1. Lastly, when both inputs are
connected to the power supply, the output will have a logic value of 1 and the LED
indicator will be in its ON state. Therefore, in an OR gate, if either A or B is true, then
the output is true as well.
3. Verifying the AND Circuit
Building the Circuit
a. Figure 2 shows the AND circuit
b. Build the circuit as shown using the provided materials.
c. Use the data sheets available on the internet for proper pin assignment of the ICs
to be used.
d. Connect VCC pins of the ICs to a +5V power supply.
e. Connect the GND pins of the ICS to the ground terminal of the power supply.

Figure 2. The AND Circuit with LED Indicator

4. Testing the Circuits

a. With the inputs initially set to ground, apply power to the circuit by turning on the
power supply.
b. Observe the output in the LED indicator or monitor the voltage and current
flowing across the LED. If the LED indicator is in the ON state or emits light,
the gate output is high or logic 1 and if it is in the OFF state, the gate output is
low or logic 0.
c. Record the status of the LED indicator in Table 2.
d. Apply the other available combinations for inputs A and B as given in Table 2
and repeat procedure c above.
e. Specify the logic value of the obtained outputs in the last column of Table 2.

Figure 2A. Input of A and B is set to Ground, having an Input logic value of 0,0 respectively
Figure 2B. Input of A is to Ground and B is to +5V, having an Input logic value of 0,1
respectively

Figure 2C. Input of A is to +5V and B is to Ground, having an Input logic value of 1, 0
respectively

Figure 2D. Input of A and B is set to +5V, having an Input logic value of 1,1 respectively
Table 2. Truth Table of the AND Circuit.

INPUT A INPUT B LED LOGIC LOGIC OUTPUT


INDICATOR VALUE VALUE OF LOGIC
(ON/OFF) OF A B VALUE

GND GND OFF 0 0 0

GND +5V OFF 0 1 0

+5V GND OFF 1 0 0

+5V +5V ON 1 1 1

The circuit expressions are: F = (A’ + B’)’ ; F = (A’)’ x (B’)’ ; F = AB

Table 2 displays the Truth Table of the AND Circuit. A logic value 0 means the
LED is OFF whereas a logic value of 1 means ON. The table shows the output logic
value when the Inputs are set to both ground, both +5V, and when either of the inputs is
set to +5V and ground but not both. This Table indicates that in an AND Circuit the
output logic value is 1 if and only if both Inputs are set to +5V or a logic value of 1.
Moreover, the circuit expressions are specified in the table.
5. Universal Logic Gates

The NAND or NOR gates are considered universal gates because they can be used to obtain
the function of the other logic gates by the principle of negation.

Building the NOR circuit


a. Study carefully the NOR circuit with the LED indicator shown in Figure 3.
b. Using the components listed, build the circuit as shown.
c. Connect the Vcc pins of the IC to the +5V output of the power supply.
d. Connect the GND pins of the ICs to the ground output of the power supply.

Figure 3. A NOR Circuit.

6. Testing the Circuit

a. With the inputs initially set to ground, apply power to the circuit by
turning on the power supply.
b. Observe the output in the LED indicator or monitor the voltage and
current flowing across the LED. If the LED indicator is in the ON state
or emits light, the gate output is high or logic 1 and if it is in the OFF
state, the gate output is low or logic 0.
c. Record the status of the LED indicator in Table 3.
d. Apply the other available combinations for inputs A and B as given in
Table 3 and repeat procedure c above.
e. Specify the logic value of the obtained outputs in the last column of Table
3.
f. Write the simplified NOR circuit expression in the last row of Table 3.
Figure 3A. A NOR Circuit with Both Inputs Connected to the Ground.

Figure 3B. A NOR Circuit with Input A Connected to the Ground and B connected to 5V DC
Source.
Figure 3C. A NOR Circuit with Input B Connected to the Ground and A connected to 5V DC
Source.

Figure 3D. A NOR Circuit with Both Inputs Connected to 5V AC Source.


Table 3. Truth Table of the NOR Gate.

INPUT A INPUT B LED LOGIC LOGIC OUTPUT


INDICATOR VALUE VALUE OF LOGIC
(ON/OFF) OF A B VALUE

GND GND OFF 0 0 0

GND +5V OFF 0 1 0

+5V GND OFF 1 0 0

+5V +5V ON 1 1 1

The circuit expressions are: (A'+B')'=AB

Table 3 shows the truth table of the NOR gate simulated using the multisim. It
shows that the LED does not turn on when either or both of the inputs are from ground. It
only turns on when both of the inputs have voltage. In logic terms, this means that the
two inputs have either or both 0 equivalent logic value, the result or the output logic
equivalent will always be zero. It will only have an output of 1 when both inputs have 1
logic equivalent value.
7. Verifying the NAND circuit

Building the NAND circuit


a. Build the circuit as shown in Figure 4 using the borrowed materials.
b. Use the datasheets available on the internet for proper pin assignment of the
ICs to be used.
c. Label the inputs A and B of your circuit.
d. Connect the Vcc pins of the IC to the +5V output of the power supply.
e. Connect the GND pins of the ICs to the ground output of the power supply.

Figure 4. A NAND Circuit

8. Testing the NAND Circuit

a. With the inputs initially set to ground, apply power to the circuit by
turning on the power supply.
b. Observe the output in the LED indicator or monitor the voltage and
current flowing across the LED. If the LED indicator is in the ON state
or emits light, the gate output is high or logic 1 and if it is in the OFF
state, the gate output is low or logic 0.
c. Record the status of the LED indicator in Table 4.
d. Apply the other available combinations for inputs A and B as given in
Table 4 and repeat procedure c above.
e. Specify the logic value of the obtained outputs in the last column of Table 4.
f. Write the simplified NOR circuit expression in the last row of Table 4.
Figure 4A. Input A and Input B of a NAND Circuit are connected to the ground

Figure 4B. Input A and Input B of a NAND Circuit are connected to the ground and
Input B is connected to a 5V DC source.
Figure 4C. Input A and Input B of a NAND Circuit are connected to the ground and
Input A is connected to a 5V DC source.

Figure 4D. Input A and Input B of a NAND Circuit are connected to the ground and to a
5V DC source.
Table 4. Truth Table of the NAND Gate.

INPUT A INPUT B LED LOGIC LOGIC OUTPUT


INDICATOR VALUE VALUE OF LOGIC
(ON/OFF) OF A B VALUE

GND GND OFF 0 0 0

GND +5V ON 0 1 1

+5V GND ON 1 0 1

+5V +5V ON 1 1 1

The circuit expressions are: F = ((A + A)’(B + B)’)’ : F = A + B

The truth table of the NAND gate simulated using multisim is shown in Table 4.
When both inputs are connected to the ground, the LED doesn’t turn on. It will only turn
on if any of them is connected to a 5V DC Source. This indicates that the ground itself
can’t turn on the LED without a voltage.

Table 5. Data Sheet for Proper Pin Assignment for IC

VOH VOL VIL VIH IOL IOH IIL IIH

3.5V 0.35V 0.8V 2.0V 8.0mA -0.4mA -0.4 20µA


(max) (min) (max) (max) (max) (max)
CONCLUSION

The DeMorgan Theorems are two sets of rules or laws derived from Boolean expressions
for AND, OR, and NOT utilizing two input variables, A and B. The input variables can be
negated and transferred from one form of a Boolean function to the other form using these two
principles or theorems.

Two (or more) variables NOR'ed together are the same as two variables inverted
(Complement) and AND'ed, whereas two (or more) variables NAND'ed together are the same as
two terms inverted (Complement) and OR'ed, according to DeMorgan's first theorem. That is, all
OR operators should be replaced with AND operators, and all AND operators should be replaced
with OR operators.

Apart from expanding expressions, De Morgan's Law may also be utilized to simplify
enlarged expressions in logic design. Simplifying expressions is an important part of writing
short programs or circuit designs, since it helps programmers to work more quickly. This is
simply one of several theorems that programmers may utilize to efficiently simplify and describe
certain logic architectures.

You might also like