Professional Documents
Culture Documents
Lab 2
Lab 2
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
PROCEDURE
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
GND +5V ON 0 1 1
+5V GND ON 1 0 1
+5V +5V ON 1 1 1
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.
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.
+5V +5V ON 1 1 1
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.
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.
+5V +5V ON 1 1 1
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
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.
GND +5V ON 0 1 1
+5V GND ON 1 0 1
+5V +5V ON 1 1 1
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.
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.