C220L Week 4 Report
C220L Week 4 Report
FACULTY OF ENGINEERING
DEPARTMENT OF COMPUTER AND COMMUNICATIONS ENGINEERING
LOGIC GATES
Prepared by
Michel Abou Haidar
Presented to
Mr. Anthony Alhadchiti
Achrafieh Campus
ABSTRACT
The goal of this experiment was to understand the theory behind the adders and
subtractors, use truth tables and K-maps to deduce the experiment’s Boolean algebra
expression and simplify it to get the shortest circuit with less components.
2
connect ICs, understand the
logic behind each gate and to
learn how to make a very
simple
circuit.
3
List of Figures
4
LIST OF TABLES
5
Table of Contents
I. OBJECTIVES..........................................................................................................1
II. BACKGROUND THEORY................................................................................1
III. REQUIRED COMPONENTS.............................................................................4
IV. SCHEMATIC REPRESENTATION.................................................................5
V. PROCEDURE.......................................................................................................7
VI. CONCLUSION...................................................................................................11
REFERENCES..............................................................................................................12
6
I. Objectives
1. To use the Boolean expression in simplifying and building any logic circuit.
2. To discover the behavior and demonstrate the operation of a logic gate.
3. To use the Boolean algebra to help designing a real life useful system.
2. The AND function states that the output will become true if only both of
the inputs are true This function is shown in the truth table below.
7
Figure 2. AND gate
A B C
0 0 0
0 1 0
1 0 0
1 1 1
3. The NOT function states that the output is the opposite of the input. This
function is shown in the truth table below.
A out
0 1
1 0
4. The OR function states that the output will become true if only one of the
inputs or both are true. This function is shown in the truth table below.
Figure 4. OR gate
8
Table 3. OR gate truth table
A B C
0 0 0
0 1 1
1 0 1
1 1 1
9
III. Required Components
1. Resistors: 330Ω (2)
2. Voltage Source
3. Test Board
4. Connecting wires
5. Green LED lights (2)
6. Quad 2-input IC 7408 (AND)
7. Hex inverter IC 7404 (NOT)
8. Quad 2-input IC 7432 (OR)
9. Switches (3)
10
IV. Schematic Representation
11
Figure 5d. Schematic representation of the full subtractor.
12
V. Procedure
To design a half adder we need a combinational circuit that receives two inputs and
produces two outputs verifying the SUM and the CARRY of the addition of two
bits.
This design could be made with a simple truth table of two inputs.
0+0=0 0+1=1 1+1=10 (addition operations)
To design a full adder we need a combinational circuit that receives three inputs and
produces the same two outputs the SUM and the CARRY the addition of the three
bits.
This design could be made with a simple truth table or a K-map.
13
Table 4b. Truth table
A B C SUM=S CARRY=C From the truth table we have:
0 0 0 0 0 S= A B C+ A B C+ A B C+ ABC
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
S=C ( A B+ AB ) +C (A B+ A B)
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
S=C ( A ⊕ B )+C ( A ⊕ B)
S= A ⊕ B ⊕ C
C= A B C + A B C + AB C+ ABC
C= A BC + A B C + AB C+ ABC + ABC + ABC
C= AB ( C +C ) + A C ( B+ B ) + BC ( A+ A)
C= A B + A C+ BC
BC
00 01 11 10
A
0 0 1 0 1
1 1 0 1 0
BC
A
14
0 0 0 1 0
1 0 1 1 1
To design a half substractor we need a combinational circuit that receives two inputs
and produces two outputs verifying the BORROW and the DIFFERENCE of the
substraction of the two bits.
0 0 0 0 D= A B+ A B= A ⊕ B
0 1 1 1 B= A B
1 0 1 0 The Borrow and Difference are in
1 1 0 0 simplified form.
To design a full subtractor we need a combinational circuit that receives three inputs
and produces the same two outputs the BORROW and the DIFFERENCE the
substraction of the three bits.
This design could be made with a simple truth table or a K-map.
15
Table 4d. Truth table
0 0 0 0 0 D= A B C+ A B C+ A B C+ ABC
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
D=C ( A B+ AB ) +C ( A B+ A B)
D=C ( A ⊕B ) +C ( A ⊕ B)
D= A ⊕ B ⊕ C
B= A B C+ A B C+ A BC + ABC
B= A B C+ A B C+ A BC + ABC + ABC + ABC
B= A B ( C+C ) + A C ( B+ B )+ BC ( A + A )
B= A B+ A C+ BC
BC
00 01 11 10
A
0 0 1 0 1
1 1 0 1 0
BC
A
0 0 1 1 1
1 0 0 1 0
16
Figure 6c. Schematic representation of the full subtractor.
1) Prepare the test-board, connection wires, resistors, ICs, LEDs and switches.
2) Implement the circuits shown in the schematic representations above.
3) Verify the truth tables by trying different switches positions.
VI. Conclusion
We conclude that using the Boolean algebra, the truth tables and the K-maps helps
us in minimizing the chip count and gives us a faster circuit, adding to that using
less power, and generating less heat. We succeed in designing adders and
subtractors in the most efficient way and the best result we can have.
17
18
REFERENCES
TEXT
REFERENCES
19