EE222 Lab 4
EE222 Lab 4
EE222 Lab 4
Submitted By:
1
Equipment:
Breadboard, 1 x Chip (74LS00) Quad 2-input NAND gates, 1 x Chip (74LS20)
Dual 4-input NAND gates, 3 x Resistors (~100 OHMS), 2 x LEDs, 1 x DIP
Switch, +5 Volts Power Supply, 1 x Chip 74LS32 Quad 2-input OR Gate, 1 x Chip
74LS08 Quad 2-input AND Gate and 1 x Chip 74LS04 NOT Gate.
Procedure:
Part I
1. The truth table with inputs A, B, C and output F was filled with 1s where 1
was the majority input and 0 where 0 was the majority input.
2. The sum-of-minterms expression in Σm notation and product-of-maxterms
expression in ΠM notation was written for F from the truth table.
3. The Karnaugh Map for F was filled and the simplified sum-of-product
expression for F was obtained.
4. The logic diagrams for F were drawn using 2-level AND-OR circuit and 2-
level NAND circuit.
5. The wiring plan for implementing the logic diagrams in hardware were
drawn.
6. The 2-level AND-OR circuit and 2-level NAND circuit were constructed in
hardware.
7. Exactly six 2-input NAND gates and one 3-input NAND gate was needed to
turn the 3-bit majority circuit into a 3-bit minority logic circuit (Totally 7
NAND gates).
8. The 3-bit minority logic diagram was drawn.
Part II
X + X´ Y = X + Y
The above Simplification Theorem was proven using Truth Tables (worked by
hand), fundamental Boolean Algebra and implementation of said Theorem in
Software simulations and Hardware experiments.
2
Results and Analysis:
Part I
3-bit Majority logic circuit
A B C F
0 0 0 0 A+B+C
0 0 1 0 A+B+C
0 1 0 0 A+ B+C
0 1 1 1 A BC
1 0 0 0 A +B+C
1 0 1 1 A BC
1 1 0 1 ABC
1 1 1 1 ABC
Table 1 shows the Truth Table for 3-bit majority logic circuit where the input bits
are A, B and C while the output bit is F
The sum of minterms expression in Σm notation for F
F = ∑ m(3 ,5 , 6 , 7)
The product-of-maxterms expression in ΠM notation for F
F = ∏ M (0 ,1 , 2 , 4)
Drawn below is the Karnaugh Map for F, where the circled parts are where the
simplified SOP expression was derived from:
AB AB AB AB
C 0 0 1 0
C 0 1 1 1
3
Figure 1 shows the logic diagram to implement F using 2-level AND-OR circuit
Figure 2 shows the logic diagram to implement F using 2-level NAND circuit
4
Figure 3 shows the 2-level NAND circuit on the breadboard when output, F, is off
(0)
figure 4 shows the 2-level NAND circuit on the breadboard when output, F, is on
(1)
5
3-bit minority logic circuit
A B C F
0 0 0 1 A BC
0 0 1 1 A BC
0 1 0 1 A BC
0 1 1 0 A+ B+C
1 0 0 1 AB C
1 0 1 0 A +B+C
1 1 0 0 A + B+C
1 1 1 0 A + B+C
Table 2 shows the Truth Table for 3-bit minority logic circuit where the input bits
are A, B and C while the output bit is F
The sum of minterms expression in Σm notation for F
F = ∑ m(0 ,1 , 2 , 4)
The product-of-maxterms expression in ΠM notation for F
F = ∏ M (3 ,5 , 6 , 7)
Drawn below is the Karnaugh Map for F, where the circled parts are where the
simplified SOP expression was derived from:
AB AB AB AB
C 1 1 0 1
C 1 0 0 0
Simplified SOP expression for F:
F = A B + BC + AC (2-level AND-OR)
´ + A C (using De-Morgan’s Theorem)
= A B+ BC
= ( A B)(B C )( A C) (2-level NAND)
= ( AB)(BC )( AC ) (Involution Theorem)
6
After observing the SOP, it is concluded that 3 more NAND gates will be needed
(Will be used as Inverters) to turn the 3-bit majority logic circuit into a 3-bit
minority logic circuit.
figure 5 shows logic circuit diagram after turning a 3-bit majority circuit into a 3-
bit minority circuit.
Part II
X Y X´ X´Y X + X´Y X+Y
0 0 1 0 0 0
0 1 1 1 1 1
1 0 0 0 1 1
1 1 0 0 1 1
Table 3 shows the Truth Table (worked by hand) of the Simplification Theorem
Using Fundamental Boolean Algebra:
X + X´Y = (X + X´) · (X + Y) = 1· (X + Y) = X + Y
7
Figure 6 shows implementation of simplification theorem on circuit maker and confirms Truth
Table
Figure 7 shows implementation of simplification theorem on hardware and confirms Truth Table
8
Discussion:
For part I, the output for the 3-bit majority logic circuit, for truth table, was filled
with “1” where there were two or more “1” inputs. The output was “0” when two
or more inputs were also “0”. The third line (starting from 0) and the last three
lines had “1” while the first three lines and the fourth line (starting from 0) had
“0”. The Karnaugh Map for the 3-bit majority circuit had three groups (each of two
bits) which results in a simplified Sum Of Product expression that had no
complementary terms. The 2-level AND-OR circuit had three 2-input AND gates
and one 3-input OR gate while the 2-level NAND circuit had three 2-input NAND
gates and one 3-input NAND gate (totally 4 NAND gates). The wiring plan was
drawn on paper before implementation of the 2-level NAND circuit on Hardware,
where the Vcc was located near the top right and Ground was in the bottom left
(when the notch is oriented vertically on the top of the Chip) and inputs was above
the output. Double bars were added to the simplified SOP and then De-Morgans
Theorem was applied to break the lower bar and change the operation from OR to
AND, hence giving the expression for 2-level NAND circuit [2]. Due to the
components and instructions provided, only the 2-level NAND circuit was
constructed on the breadboard using 4-input NAND gate chip instead of a 3-input
NAND gate chip. The fourth input of the 4-input NAND gate chip was wired with
“1”, since “1” is an identity for NAND gates and would not affect the output. A
common line for Ground and the Voltage source was adjusted on the breadboard
and three common lines were also made for A, B and C. Inputs A, B and C were
then wired into the 2-input NAND gate chip of which the three outputs were wired
into the 4-input NAND gate chip.
For a 3-bit minority circuit, it was observed that the outputs were complementary
of the 3-bit majority circuit (where F was “1” in 3-bit majority circuit, F was “0” in
3-bit minority circuit and vice versa). The Karnaugh Map had same number of
groups (each of 2 bits) with the result also being the complementary version of the
3-bit majority circuit Karnaugh Map. The logic diagram was exactly the same (2-
level NAND circuit) but with three NAND gates used as inverters as shown in
figure 5.
9
For part II, the Simplification Theorem was proven using 2-input Truth Tables as it
showed that the first output will always be “0” while the rest will be “1” for both
sides of the expression. The Simplification Theorem was also proven using
Fundamental Boolean Algebra such as Distributive, Complementary and Identity
Theorems [2]. Simulations were run on Circuit Maker where the left-hand side was
proven using NOT, AND, OR gates and right-hand side was proven using only a
OR gate. A LED was added to the output of the simulation to represent “1” when
it’s on and “0” when off. Then using three 2-input chips for the left-hand side (OR,
AND, NOT) and one 2-input chip for the right-hand side (OR), the theorem was
proven on hardware as well. A resister was added before the LED as the LED
cannot handle too much current. The results matched with no error.
Conclusion:
The aim of the lab was achieved as the students were able to design a 3-bit
majority circuit using Truth tables, Karnaugh Maps and logic diagrams. The
connection and testing of the circuit were also successful and students learnt how
to draw the wiring plan for the circuit, connect with the different types of chips and
improvise with the limited components provided. It was also observed that 3-bit
minority circuits are complementary to 3-bit majority circuits. The Simplification
Theorem was also repeated proven using Truth Tables, three Boolean Algebra
theorems (Distributive, Complementary and Identity) and constructed in Circuit
Maker and on Hardware. Students also learnt how LEDs are used to represent
output and how resisters are utilized to protect the LEDs.
References
[1] A. V. a. A. Kumar, "Design and Analysis of Majority Logic Based Fault Tolerant Systems,"
IEEE Transactions on Computers, vol. 64, no. 1, pp. 120-135, 2015.
10
11