Professional Documents
Culture Documents
Manual
EE-220L
Fall 2022
Name : ________________________
Student ID : ____________________
Section : _______________________
EE-220L Digital Logic Design
Program BS EE
Credit Hours 1
Prerequisites Nil
Email asad-ali@umt.edu.pk
Chairman/Director signature………………………………….
Dean’s signature……………………………
Date………………………………………….
1
EE-220L Digital Logic Design
Learning Objectives:
The objective of this lab is to introduce students with basic digital logic design concepts and
to implement them as well. Labs are designed in such a way that at the end students will be
able to know the following terms
• Verification of basic binary operators and basic theorems using gates.
• Understanding of gates.
• Design of combinational circuits.
• Implementation of Adder and Subtractor circuits.
• Implementation of Encoder, Decoder, Multiplexer and Demultiplexer.
• Verification of Latch’s and Flip Flops.
• Design of Sequential Circuits
• Implementation of series and parallel registers
• Implementation of asynchronous and synchronous counters
In accordance with HEC curriculum outcomes a, b, d, e, g, h & i, students at the end of the
course should be able to
Learning Methodology:
Lecture, interactive, participative
Term Project 10
Total: 100
2
EE-220L Digital Logic Design
Recommended Text Books:
Digital Design, Edition by Morris Mano and Michael D. Ciletti
Reference Books:
Digital Design, Principles & Practices, Edition by John F. Wakerly
CLO 1: Construct / build and troubleshoot different digital circuits using basic gates.
CLO 2: Analyze the different small-scale combinational and sequential digital circuits.
CLO 3: Demonstrate responsible attitude in lab execution.
CLO 4: Synthesize experimental results through technical report.
CLO 5: Demonstrate teamwork while working towards project deliverables.
Related Levels of
CLOs Teaching Methods CLO Attainment checked in
PLOs Learning
CLO 1 PLO 3 Psy-4 Instructions Lab Work Lab Sessions, Exam
CLO 2 PLO 4 Cog-3 Instructions, Lab Work Lab Sessions, Exam
CLO 3 PLO 8 Aff-3 Instructions, Lab Work Lab Sessions
CLO 4 PLO 10 Aff-4 Instructions, Lab Work Lab Reports
CLO 5 PLO 9 Aff-3 Group Project Project Deliverables
3
EE-220L Digital Logic Design
8 Mid-Term Examinations
4
EE-220L Digital Logic Design
5
EL-220 Digital Logic Design Lab Evaluation Rubric
Lab # Lab Title : Section :
Analyze the
Implementation of Logic circuit Ability to Debug Illustrate experimental
outcome Punctuality Behavior in Lab
Areas Assessed Lab Work Organization Logic circuits results through report CLO wise Total
of the circuits
(CLO 1) (CLO 1) (CLO 1) (CLO 2) (CLO 3) (CLO 3) (CLO 4)
Logic circuit was
Logic circuit was Wasn’t able No analysis on the No care of equipment and Wasn’t able to
not
Poor (0 to 40%) not to debug the results obtained work-station with components summarize the
properly
properly functional Logic circuit in the lab Not on not returned after use experiment
organized
Time Total
Reasonable Appropriate care of equipment
Logic circuit was Debugged the Was able to
Logic circuit was interpretation and work-station with
Satisfactory (40 to 75%) somewhat Logic circuit with summarize some CLO 1 CLO 2 CLO 3 CLO 4
somewhat neat of results components
functional assistance of the experiment(s)
obtained returned after use
Debugged the Thorough
Thorough understanding
Logic circuit was Logic circuit understanding Proper care of equipment and
Logic circuit was of
Very Good (75 to 100%) properly successfully of the results On Time work-station with components
fully functional every aspect of
organized without obtained in the returned after use
experiments conducted
assistance lab
Maximum Marks ►
Sr #
3 1 1 2 0.5 0.5 2 5 2 1 2 10
Student ID▼ Student Name▼
1 0 0 0 0 0
2 0 0 0 0 0
3 0 0 0 0 0
4 0 0 0 0 0
5 0 0 0 0 0
6 0 0 0 0 0
7 0 0 0 0 0
8 0 0 0 0 0
9 0 0 0 0 0
10 0 0 0 0 0
11 0 0 0 0 0
12 0 0 0 0 0
13 0 0 0 0 0
14 0 0 0 0 0
15 0 0 0 0 0
16 0 0 0 0 0
17 0 0 0 0 0
18 0 0 0 0 0
19 0 0 0 0 0
20 0 0 0 0 0
EL-220 Digital Logic Design Lab 1
Relevant Theory Topics: Introduction to digital logic, Number system and codes,
Binary storage and binary logic, Boolean algebra (Ref er to Chapter 1 & 2 of Digital
design, Edition by Morris Mano)
APPARATUS / COMPONENTS
1. Digital Logic Trainer
2. IC 7408, IC 7432, IC 7404, IC 7400, IC 7402 and IC 7486
(PART A)
OBJECTIVE:
Familiarization with the AND, OR, NOT, NAND, NOR and XOR gates.
Inputs Outputs
Desired
A B Observed
x= A . B
0 0 0
0 1 0
1 0 0
1 1 1
PROCEDURE
Page 0 of 104
EE-220L Digital Logic Design Lab 1
4. By setting various combinations of the two switches verif y that the output of
the AND gate is in accordance with the Truth Table shown above. Record your
observation.
TASK 2
▪ Repeat Task 1 f or IC 7432, IC 7404, IC 7400, IC 7402 and IC 7486. Draw
truth table and show your results to lab instructor [For IC conf iguration see
datasheet].
(PART B)
OBJECTIVE
To verif y Theorems of Boolean Algebra through Logic Circuits.
Inputs Output
A B Observed
0 0
0 1
1 0
1 1
Page | 1
EE-220L Digital Logic Design Lab 1
Verif y Absorption Theorem A. (A + B) = A
Show your results to the lab instructor.
Inputs Output
A B Observed
0 0
0 1
1 0
1 1
Page | 2
EE-220L Digital Logic Design Lab 1
PIN Configurations
Below are the pin configurations for different logic gates. They will be
helpful to your during your lab work.
Page | 3
EE-220L Digital Logic Design Lab 1
LAB ASSIGNMENT
Page | 4
EE-220L Digital Logic Design Lab 1
Observations/Comments/Explanation of Results
(Please write in your own words the objectives and yours learning during the
experiment. Also explain the results and comment on it.)
Page | 5
EE-220L Digital Logic Design LAB 2
UNIVERSALITY OF NAND AND NOR GATES
APPARATUS / COMPONENTS
1. Digital Logic Trainer
2. IC 7400, 7402
Relevant Theory Topics: NAND, NOR and XOR Implementation, Two level
implementation (Refer to Chapter 03 of Digital design, Edition by Morris Mano)
OBJECTIVE
To learn the implementation of any logic expression by using only NAND or NOR
gates.
THEORY
Digital circuits are more f requently constructed with NAND or NOR gates than with
AND and OR gates. NAND and NOR gates are easier to f abricate with electronic
components and are the basic gates used in all IC digital logic f amilies. Because of
the prominence of NAND and NOR gates in the design of digital circuits, rules and
procedures have been developed f or conversion f rom Boolean f unction given in terms
of AND, OR, and NOT into equivalent NAND and NOR logic diagram.
If we can show that the logical operations AND, OR, and NOT can be implemented
with NAND gates, then it can be saf ely assumed that any Boolean f unction can be
implemented with NAND gates. Figure-1 below shows such implementation:
Page | 6
EE-220L Digital Logic Design LAB 2
Inputs Output
Desired
A B Observed
x=A.B
0 0 0
0 1 0
1 0 0
1 1 1
Inputs Output
Desired
A B Observed
x=A+B
0 0 0
0 1 1
1 0 1
1 1 1
Page | 7
EE-220L Digital Logic Design LAB 2
Verif y NOT gate operation using NAND gates (See Fig. 2c).
Show your results to the lab instructor.
Inputs Output
Desired
A Observed
X=A'
0 1
1 0
Alternate symbols of the basic gates are given below. Find out which gate each of
these represents.
Inputs Output
A B Observed
0 0
0 1
1 0
1 1
Inputs Output
A B Observed
0 0
0 1
1 0
1 1
Page | 8
EE-220L Digital Logic Design LAB 2
Inputs Output
A Observed
0
1
LAB ASSIGNMENT
1. Implement AND, OR and NOT operation using NOR gate. Show truth
table and logic diagram.
2. Find the equivalence of the following alternate logic gate. Also show
truth table.
Page | 9
EE-220L Digital Logic Design LAB 2
Observations/Comments/Explanation of Results
(Please write in your own words the objectives and yours learning during the
experiment. Also explain the results and comment on it.)
Page | 10
EE-220L Digital Logic Design LAB 3
IMPLEMENTATION OF FULL ADDER AND 4-BIT PARALLEL ADDER USING IC
7483
APPARATUS / COMPONENTS
THEORY
Digital computers perf orm a variety of inf ormation-processing tasks. Among
the basic f unctions encountered are various arithmetic operations. The most basic
arithmetic operations are, no doubt, the addition and subtraction of binary digits
(bit).
a. Half Adder :
The possible operations, when we want to add only two bits,
would be the f ollowings:
0+ 0=0
0+ 1= 1
1+ 0= 1
1+ 1= 0 & Carry 1
Above mentioned operation could be perf ormed by a Half Adder circuit.
b. Full Adder :
We know that in practice, all addition operations must take into account the
Carry bit (or digit) f rom the previous operation. Adders in digital computers
also take into account the Carry bit f rom last operation and add it with the
Augend and Addend bits of the present operation to complete the addition
operation. The possible operations are:
0 + 0 + 0 (carry) = 0
0 + 0 + 1 (carry) = 1
0 + 1 + 0 (carry) = 1
0 + 1 + 1 (carry) = 0 & carry 1 (to be added to next higher digit)
1 + 1 + 0 (carry) = 0 & carry 1 (to be added to next higher digit)
1 + 1 + 1 (carry) = 1 & carry 1 (to be added to next higher digit)
Page | 11
EE-220L Digital Logic Design LAB 3
The adder that perf orms the addition of three bits (two signif icant bits and a
previous carry) is called a Full Adder.
Output
Input Observed
Desired
A B S Cout S Cout
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
The simplif ied Boolean f unction f or the two outputs can be written f rom this truth
table as:-
S = A'.B +A.B' or A B
Cout = A.B
The circuit diagram f or the Half Adder to implement above mentioned Boolean
f unction could be quite a f ew. We will however verif y only one.
PROCEDURE
Page | 12
EE-220L Digital Logic Design LAB 3
3. Connect +5V to pin 14 (Vcc) and Ground to pin 7 (GND) of the ICs.
4. By setting various combinations of the two switches verif y that the output of
the circuit is in accordance with the Truth Table shown above. Record your
observation.
Output Output
Input
Desired Observed
A B Cin S Cout S Cout
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Simplif ied Boolean f unction f or the two outputs can be written f rom this truth table
as:-
S =( A B) Cin
Page | 13
EE-220L Digital Logic Design LAB 3
The circuit diagram f or the Full Adder is as under:
PROCEDURE
Page | 14
EE-220L Digital Logic Design LAB 3
TASK 3: 4 BIT BINARY PARALLEL ADDER
Adders that are available in integrated circuit f orm, are parallel binary adders. A 4-
Bit parallel adder consists of f our f ull adders connected in parallel. The carry output
of each adder is internally connected to the carry input of the next higher order
adder. Fig 3 shows the internal f unctional structure of 74283 IC in which 4 f ull
adders are shown as separate entity. Figure 4 is connection diagram f or f ull adder
f unction.
Page | 15
EE-220L Digital Logic Design LAB 3
PROCEDURE
A3 A2 A1 A0 B3 B2 B1 B0 A B Co S3 S2 S1 S0 Sum Co S3 S2 S1 S0
0 0 0 1 0 0 0 1 1 1 0 0 0 1 0 2
0 0 1 1 0 0 0 1 3 1 0 0 1 0 0 4
0 1 0 0 0 0 1 0 4 2 0 0 1 1 0 6
0 1 0 0 0 1 0 0 4 4 0 1 0 0 0 8
0 1 0 1 0 1 0 0 5 4 0 1 0 0 1 9
0 1 0 1 0 1 0 1 5 5 0 1 0 1 0 10
1 0 0 0 0 1 0 0 8 4 0 1 1 0 0 12
1 0 0 1 0 1 1 0 9 6 0 1 1 1 1 15
1 0 0 1 1 0 0 0 9 8 1 0 0 0 1 17
1 0 0 1 1 0 0 1 9 9 1 0 0 1 0 18
Page | 16
EE-220L Digital Logic Design LAB 3
Observations/Comments/Explanation of Results
(Please write in your own words the objectives and yours learning during the
experiment. Also explain the results and comment on it.)
Page | 17
EE-220L Digital Logic Design LAB 4
IMPLEMENTATION OF FULL SUBTRACTOR AND 4-BIT PARALLEL
SUBTRACTOR USING IC 74283
a. Full Subtractor:
When we have borrowed a value f rom a higher position, then it must be
accounted f or when subtraction is perf ormed at that higher position. The way
it is done can be explained with the f ollowing example:-
At position 2 we borrowed a “1” f rom position 3 to carry out subtraction. When we move to position 3
f or subtraction, the position 2 should have returned the borrowed “1”, which will be added
to the Subtrahend at position 3. (Note: Minuend at Posn3 will remain 1)
We need to have two arrangement to carry out above mentioned action: first, in-
addition to the subtraction result (call it Do), the Position2 should give out another
output as high (or 1) (call it Bo- borrow out) which would indicate its obligation to return
the borrowed “1” to position 3; second, position three should have some input
arrangement (call it Bin – borrow in), which would take the “1” returned by position 2 and
add it to the Subtrahend of position 3.
Page | 18
EE-220L Digital Logic Design LAB 4
The arithmetic element that perf orms this subtraction operation is called Full
Subtractor.
TASK1.
Implement Half subtractor.
Truth Table:
Page | 19
EE-220L Digital Logic Design LAB 4
Logic Diagram:
TASK2.
Truth Table:
Page | 20
EE-220L Digital Logic Design LAB 4
Logic Diagram:
Page | 21
EE-220L Digital Logic Design LAB 4
LAB ASSIGNMENT
Task 1:
Implement 4-bit parallel SUBTRACTOR operation using combination of half
subtractor & full subtractors only.
Page | 22
EE-220L Digital Logic Design LAB 4
LAB ASSIGNMENT
Task 2:
Implement 4-bit parallel SUBTRACTOR operation using Full Adders only.
Page | 23
EE-220L Digital Logic Design LAB 4
LAB ASSIGNMENT
Task 3:
Implement 4-bit parallel Adder & Subtractor operation using IC 74283 only.
Page | 24
EE-220L Digital Logic Design LAB 4
Observations/Comments/Explanation of Results
(Please write in your own words the objectives and yours learning during the
experiment. Also explain the results and comment on it.)
Page | 25
EE-220L Digital Logic Design LAB 5
IMPLEMENTATION OF COMBINATIONAL CIRCUITS (Open Ended Lab)
Introduction:
A combinational circuit is a circuit made up by combining logic gates such that the
required logic at thorough put(s) depends only on the input logic present condition,
both completely specif ied by either a truth table or by a Boolean expression.
Relevant Theory Topics: The map method, Combinational logic Analysis, Design of
combinational logic (Refer to Article 3.1, 3.2, 3.3, 4.1-4.5 of Digital design, Edition by
Morris Mano)
Characteristics
1. An output(s) remains constant, as long input conditions do not require change
in output(s).
2. An output depends solely on the current input condition and not on any
past………………………………………………………………………………………………………………………
…………………….. input condition or past output condition.
Task 1:
Truth Table:
Page | 26
EE-220L Digital Logic Design LAB 5
Simplification using K-map:
Boolean Function:
Page | 27
EE-220L Digital Logic Design LAB 5
Logic Diagram:
Page | 28
EE-220L Digital Logic Design LAB 5
LAB ASSIGNMENT
Page | 29
EE-220L Digital Logic Design LAB 5
Observations/Comments/Explanation of Results
(Please write in your own words the objectives and yours learning during the
experiment. Also explain the results and comment on it.)
Page | 30
EE-220L Digital Logic Design LAB 6
IMPLEMENTATION OF CODE CONVERTERS USING GATES
APPARATUS / COMPONENTS
1. Digital Logic Trainer
2. IC 7447, IC 7486, AND, OR and NOT gates
3. 7-Segment Display
4. Resistors 180 Ohms
Relevant Theory Topic: Binary Codes, K-Map implementation (Refer to Article 1.7,
3.2, 3.3, of Digital design, Edition by Morris Mano)
OBJECTIVE
To learn about BCD to Seven Segment Display Code, Gray Code and Excess -3 Code
Conversion.
THEORY
The availability of large variety of codes f or the same discrete elements of
inf ormation results in the use of dif f erent codes by dif f erent digital systems.
Sometimes it becomes necessary to use output one system as input to another
system. A conversion circuit must be inserted between the two systems, if each uses
dif f erent code f or the same inf ormation. When a decimal number is decoded such
that each digit of the number is represented by a 4-bit binary number, it is called an
8421 Binary Coded Decimal Code or more simply a BCD code. Here, ten out of
sixteen possible combinations of the code are selected to represent decimal 0
through 9. Most commonly used BCD codes are given below:
Page | 31
EE-220L Digital Logic Design LAB 6
The important characteristics of the Gray code is that only one digit changes as we
count f rom top to bottom; that is why it is termed as minimum change code. The
Gray code is used f or input and output devices. Primary use is in numeric input
encoding applications, where we expect nonrandom input value change (i.e. value n
changes either to n-1 or to n+1). Another decimal code that has been used in some
old computers is Excess-3 code. Its code assignment is obtained f rom the
corresponding value of BCD af ter the addition of 3. The code is used in many
arithmetic circuits because it is self -complementing (i.e. the 9’s complement value of
the decimal number can be obtained by complementing each bit of the code).
Most Digital equipment has some means f or displaying inf ormation in a f orm that can
be understood readily by the user or operator. One of the simplest and most popular
methods f or displaying numerical digits uses a 7-segment conf iguration. To f orm
decimal characters 0 through 9 and sometimes hex characters A through F. A BCD
to 7-Segment Driver (IC 7447) is used to take f our bit BCD input and provide the
outputs that will pass current through the appropriate segment of the display to
generate desired output/ number. Truth Table f or Active High and Active Low cases
are shown below:
Output-Seven Segment Decoder
INPUT –BCD
Decimal
(Active High)
Display
So S1 S2 S3 a b C d e f g
Output
0 0 0 0 0 1 1 1 1 1 1 0 0
0 0 0 1 1 0 1 1 0 0 0 0 1
0 0 1 0 2 1 1 0 1 1 0 1 2
0 0 1 1 3 1 1 1 1 0 0 1 3
0 1 0 0 4 0 1 1 0 0 1 1 4
0 1 0 1 5 1 0 1 1 0 1 1 5
0 1 1 0 6 0 0 1 1 1 1 1 6
0 1 1 1 7 1 1 1 0 0 0 0 7
1 0 0 0 8 1 1 1 1 1 1 1 8
1 0 0 1 9 1 1 1 0 0 1 1 9
Page | 32
EE-220L Digital Logic Design LAB 6
INPUT –BCD Output- Seven Segment Decoder (Active
Decimal
Low -IC 7447) Display
Output
S0 S1 S2 S3 a b c D e f g
0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 1 1 1 0 0 1 1 1 1 1
0 0 1 0 2 0 0 1 0 0 1 0 2
0 0 1 1 3 0 0 0 0 1 1 0 3
0 1 0 0 4 1 0 0 1 1 0 0 4
0 1 0 1 5 0 1 0 0 1 0 0 5
0 1 1 0 6 1 1 0 0 0 0 0 6
0 1 1 1 7 0 0 0 1 1 1 1 7
1 0 0 0 8 0 0 0 0 0 0 0 8
1 0 0 1 9 0 0 0 1 1 0 0 9
The segments of Seven Segment display are made of LEDs. Depending on the
arrangements of the LEDs, the display could be Common Anode or Common Cathode
type. We are using common anode type of display, which would require that either
pin 3 or pin 8 is connected to Vcc and the input is active low.
Page | 33
EE-220L Digital Logic Design LAB 6
PROCEDURE
1. Wire the circuit as per f igure 1 above. Connect pin 3 or pin 8 to Vcc.
2. By setting various combinations of the switches verif y the result.
A B C D W x y Z W x y z
0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 1
0 0 1 0 0 0 1 1
0 0 1 1 0 0 1 0
0 1 0 0 0 1 1 0
0 1 0 1 0 1 1 1
0 1 1 0 0 1 0 1
0 1 1 1 0 1 0 0
1 0 0 0 1 1 0 0
1 0 0 1 1 1 0 1
With the help of K- Map, the simplif ied output can be obtained as:
w =A x=A’B+AB’=A B
Page | 34
EE-220L Digital Logic Design LAB 6
y = BC’+B’C=B C z = CD’+C’D=C D
PROCEDURE
Page | 35
EE-220L Digital Logic Design LAB 6
TASK 3: BCD TO EXCESS-3 CODE CONVERSION.
The bit combination f or the BCD and excess-3 codes is listed in the table below.
Since each code uses f our bits to represent a decimal digit, there must be f our input
and f our output variables.
Output Excess-3
Input BCD Observed Output
Code
A B C D w x y Z
0 0 0 0 0 0 1 1
0 0 0 1 0 1 0 0
0 0 1 0 0 1 0 1
0 0 1 1 0 1 1 0
0 1 0 0 0 1 1 1
0 1 0 1 1 0 0 0
0 1 1 0 1 0 0 1
0 1 1 1 1 0 1 0
1 0 0 0 1 0 1 1
1 0 0 1 1 1 0 0
With the help of K- Map, the simplif ied output can be obtained as:
Page | 36
EE-220L Digital Logic Design LAB 6
PROCEDURE
1. Wire the circuit as per above Fig. 3 and verif y the results.
Page | 37
EE-220L Digital Logic Design LAB 6
LAB ASSIGNMENT
Page | 38
EE-220L Digital Logic Design LAB 6
Page | 39
EE-220L Digital Logic Design LAB 6
2. Design a circuit which calculates 9’s complement of a BCD number.
Page | 40
EE-220L Digital Logic Design LAB 6
Page | 41
EE-220L Digital Logic Design LAB 6
Observations/Comments/Explanation of Results
(Please write in your own words the objectives and yours learning during the
experiment. Also explain the results and comment on it.)
Page | 42
EE-220L Digital Logic Design LAB 7
IMPLEMENTATION OF ENCODER AND DECODER USING IC 74138 & 74148
APPARATUS / COMPONENTS
1. Digital Logic Trainer
2. IC 74138 IC 74148
Relevant Theory Topics: Combinational logic Decoders, Encoders (Ref er Article
4.10, 4.11of Digital design, Edition by Morris Mano)
OBJECTIVE
To learn about Encoder and Decoder.
THEORY
▪ An encoder circuit has more input lines and
f ewer output lines.
▪ A decimal to BCD encoder (10 line to 4 line) will
convert (at any one time) one active input out
of ten to a BCD code output.
▪ An octal-to-binary encoder (8 line to 3 line) will
convert (at any one time) one-of -eight inputs
to a binary code output
▪ A decoder circuit f ew input lines and more
output lines.
▪ A binary-to-octal decoder converts 3 binary bits
into 8 outputs (only one which will be active at
one time)
▪ A BCD decoder converts a 4-bit BCD code on
into 10 output outputs (only one which will be
active at one time).
▪ A hexadecimal decoder converts a 4-bit binary
code on the input to a 1-of -16 output.
▪ Decoders are of ten used in microprocessor
systems to decode the address inf ormation
f rom the microprocessor in order to select the
correct memory chip.
Page | 43
EE-220L Digital Logic Design LAB 7
DECODERS:
IC 74138 has been used here as a decoder. It has 3-Select Inputs and 8- Data
Outputs. Functional block diagram of IC 74138 is attached. Note that the IC 74138
has Enable Inputs which we will not use during decoder operation, theref ore we will
keep G1 as high and G2A and G2B as low so that the output of Enable gate remains
always high and does not interf ere with our desired result. Also note that the
output of the IC is active low. Connection diagram and Truth table of the IC
74138 when used as decoder is shown below:
Note: Output of the IC 74138 is active low, so the output line having a Zero
in the Truth Table will be selected
Wire the circuit as per f igure 1 above and verif y the results.
Page | 44
EE-220L Digital Logic Design LAB 7
TASK 1: Implement a Full Adder using decoder (3 × 8) IC 74138 along
with NOT and OR gate ICs.
Page | 45
EE-220L Digital Logic Design LAB 7
TASK 2: Implement a Full Adder using decoder (3 × 8) IC 74138 along
with NAND gate ICs. Hint : You can use Dual 4-input NAND IC 7420.
Page | 46
EE-220L Digital Logic Design LAB 7
TASK 3: Implement a Full Subtractor using decoder (3 × 8) IC 74138
along with NOT and OR gate ICs.
Page | 47
EE-220L Digital Logic Design LAB 7
TASK 4: Implement a Full Subtractor using decoder (3 × 8) IC 74138
along with NAND gate ICs. Hint : You can use Dual 4-input NAND IC
7420.
Page | 48
EE-220L Digital Logic Design LAB 7
ENCODER
IC 74148 is a 8- Line-to- 3-line (octal to binary) Priority Encoder. It has 8 Inputs (0-
7), an Enable Input EI, an Enable Output EO, 3 Output (A0-A2), and a Gs Output.
Details as under:
▪ A0-A2 outputs ref lect a code that is equal to the highest valued active input.
▪ Gs output goes low any time any of the input goes low (this low signal is
used f or interrupt request to CPU, when connected f or the purpose).
▪ EI and EO are used f or cascading more than one 74148 together.
Functional block diagram of IC 74148 is attached. Connection diagram and Truth
table of is shown below:
INPUT OUTPUT
EI 0 1 2 3 4 5 6 7 A2 A1 A0 Gs Eo
0 X X x x x X X 0 0 1
0 X X x x x X 0 1 0 1
0 X X x x x 0 1 1 0 1
0 X X x x 0 1 1 1 0 1
0 X X x 0 1 1 1 1 0 1
0 X X 0 1 1 1 1 1 0 1
0 X 0 1 1 1 1 1 1 0 1
0 0 1 1 1 1 1 1 1 0 1
Wire the circuit as per f igure above and f ill in the blanks in the truth table.
Page | 49
EE-220L Digital Logic Design LAB 7
Page | 50
EE-220L Digital Logic Design LAB 7
Observations/Comments/Explanation of Results
(Please write in your own words the objectives and yours learning during the
experiment. Also explain the results and comment on it.)
Page | 51
EE-220L Digital Logic Design LAB 8
IMPLEMENTATION OF MULTIPLEXER AND DEMULTIPLEXER USING
IC74151& IC74138
APPARATUS / COMPONENTS
1. Digital Logic Trainer
2. IC 74151 & 74138
OBJECTIVE:
To learn about Multiplexer and Demultiplexer.
THEORY:
A. MULTIPLEXER:
1. The multiplexer circuit is used to place two or more digital signals (f rom two or
more sources) onto a single line, by placing them there at dif f erent time intervals
(technically it is known as time-division- multiplexing).
2. The multiplexer (also known as data selector) will select data f rom several
transmission lines to be gated to the single output transmission line.
3. The multiplexer will have a number of control inputs that are used to select the
appropriate data channel f or input.
4. The number of data inputs is equal to 2n where n is the number of control
selecting leads.
5. A multiplexer can be used to convert parallel data to serial data.
Page | 52
EE-220L Digital Logic Design LAB 8
B. DEMULTIPLEXER:
1. A demultiplexer (data distributor) will receive inf ormation f rom a single
line and selectively transmits it to several output lines/channels (one at a
time).
2. Demultiplexer has several control select lines which are used to determine
(or select) the output transmission path.
3. The number of data output lines is 2n, where N is the number of control
select leads.
4. Demultiplexers are used to convert serial data to parallel data.
TASK 1: MULTIPLEXER.
IC 74151 is a 8-to-1-Line Multiplexer. It has f ollowing f eatures:-
1. 8 Data Inputs (DO-D7).
2. Three Select Inputs (A, B, C).
3. An Enable (or Strobe) G
4. A one bit output Y (and its complement W)
Page | 53
EE-220L Digital Logic Design LAB 8
PROCEDURE
Page | 54
EE-220L Digital Logic Design LAB 8
TASK 2: Implement a Full Adder using MUX (8 × 1) IC 74151.
Hint : You need two separate ICs to implement Sum and Carry Out.
Page | 55
EE-220L Digital Logic Design LAB 8
TASK 3: Implement a Full Subtractor using MUX (8 × 1) IC 74151.
Hint : You need two separate ICs to implement Dif f erence and Borrow.
Page | 56
EE-220L Digital Logic Design LAB 8
TASK 4: DEMULTIPLEXER
A 1-Line-to-8-Line demultiplexer distributes one input to 8 output lines. IC
74138 which was used as a decoder in the last experiment will be used here
as Demultiplexer. The only dif f erence between the previous circuit and
present circuit will be addition of an INPUT (through Enable AND gate) to the
4th pin of all the 8 NAND gates. The A, B and C inputs will serve as SELECT
input (to select a particular output line).
Note that the Enable Inputs of IC 74138 was not used during decoder operation. We
will now use G2B pin of the IC f or Data/Signal Input. We theref ore need
to keep pins G1 as high and G2A as low, so that the Input Data/Signal
remains present at output of Enable gate and consequently on the 4th input
pin of all the 8 NAND gates.
Note: Output of the IC 74138 is active low , so the output line having a
Zero in the Truth Table will be selected
Page | 57
EE-220L Digital Logic Design LAB 8
Input Output
C B A O7 O6 O5 O4 O3 O2 O1 O0
0 0 0 1 1 1 1 1 1 1 0
0 0 1 1 1 1 1 1 1 0 1
0 1 0 1 1 1 1 1 0 1 1
0 1 1 1 1 1 1 0 1 1 1
1 0 0 1 1 1 0 1 1 1 1
1 0 1 1 1 0 1 1 1 1 1
1 1 0 1 0 1 1 1 1 1 1
1 1 1 0 1 1 1 1 1 1 1
Page | 58
EE-220L Digital Logic Design LAB 8
TASK 5: DATA COMMUNICATION USING MULTIPLEXER & DEMULTIPLEXER.
Multiplexer IC 74151 and Demultiplexer IC 74138 has been utilized to demonstrate
single-line data communication. The 3-bit select code will determine which data input
will be steered to the Y output of the Demultiplexer.
Observed
Applied When Clock Signal is
Signal Out
Select Signal at Data Applied At All of D
at Output
Input Pin Pins of MUX
Pin
Observed Output at
C B A D Y
Pin of DEMUX
0 0 0 D0 Y0
0 0 1 D1 Y1
0 1 0 D2 Y2
0 1 1 D3 Y3
1 0 0 D4 Y4
1 0 1 D5 Y5
1 1 0 D6 Y6
1 1 1 D7 Y7
PROCEDURE
1. Wire the circuit as per f igure above and verif y result f irst by giving clock signal to
One Input pin at a time of the IC (D0 – D1) and then to all the pins simultaneously.
Page | 59
EE-220L Digital Logic Design LAB 8
TASK 6:
Page | 60
EE-220L Digital Logic Design LAB 8
LAB ASSIGNMENT
F(x,y,z) = Σ (1,2,6,7)
Page | 61
EE-220L Digital Logic Design LAB 8
Observations/Comments/Explanation of Results
(Please write in your own words the objectives and yours learning during the
experiment. Also explain the results and comment on it.)
Page | 62
EE-220L Digital Logic Design LAB 9
VERIFICATION OF LATCH AND FLIP FLOP OPERATION USING GATES AND
FLIP FLOP’S IC
APPARATUS / COMPONENTS
1. Digital Logic Trainer.
2. IC 7402, 7400 , 7404 , 7410 , 7474 & 7475
OBJECTIVE:
To learn about various types of Latches and Flip-Flops
THEORY:
a. A Flip Flop is a logic circuit that has two stable states Low or High. Enable
input signal may be used to enable or disable a f lip f lop. Clock signal is used
to synchronize operations of f lip f lops. Most (if not all) of the system output
can change state only when the clock makes a transition.
b. Latches are a f orm of Flip Flop, which do not require clock pulse to latch or
hold data present at its input.
Page | 63
EE-220L Digital Logic Design LAB 9
TASK 1: SR (or RS or SC) Latch
The SR is the simplest f orm of Flip Flop or Latch. It can be constructed f rom NOR
gates or NAND gates. Standard logic symbol of SR f lip f lop and its truth table is given
below:-
PROCEDURE
Wire the circuit as per f igure above and verif y the result.
NOTE: NAND Gate SR Latch has active low input, hence its truth table is dif f erent
f rom the standard i.e a low at the set terminal will set the latch.
Page | 64
EE-220L Digital Logic Design LAB 9
TASK 2: GATED FLIP FLOPS
Gated SR Flip Flop :
Works only when Enable is high.
PROCEDURE
Wire the circuit as per f igure above and verif y the result.
Gated D – Flip Flop :
PROCEDURE
Wire the circuit as per f igure above and verif y the result.
Gated J-K Flip Flop
Page | 65
EE-220L Digital Logic Design LAB 9
PROCEDURE
Wire the circuit as per f igure above and verif y the result.
PROCEDURE
VERIFICATION – D LATCH:
1. Verif y that the data at the input
terminal is ref lected at the output
only when Enable (EN) input is high.
________________
Page | 66
EE-220L Digital Logic Design LAB 9
VERIFICATION – D FLIP FLOP:
1. Verif y that the data at the input terminal is
ref lected at the output only during Positive
going edge of the Clock pulse._________
Page | 67
EE-220L Digital Logic Design LAB 9
LAB ASSIGNMENT
2. What changes would you make in the NAND gate latch shown above,
so it behaves exactly like a NOR gate S-R latch.
ANS.___________________________________________________
________________________________________________________
________________________________________________________
Page | 68
EE-220L Digital Logic Design LAB 9
Observations/Comments/Explanation of Results
(Please write in your own words the objectives and yours learning during the
experiment. Also explain the results and comment on it.)
Page | 69
EE-220L Digital Logic Design LAB10
IMPLEMENTATION OF SEQUENTIAL CIRCUIT
Relevant Theory Topics: Analysis of clocked sequential circuits, State reduction and
assignment and Design procedure. (Refer Article 5.6, 5.7, Digital design, Edition by
Morris Mano)
INTRODUCTION:
In digital circuit theory, sequential logic is a type of logic circuit whose output
depends not only on the present input but also on the history of the input. This is in
contrast to combinational logic, whose output is a f unction of , and only of , the
present input. In other words, sequential logic has state (memory) while
combinational logic does not.
State diagram:
A state diagram is a type of diagram used in computer science and related f ields to
describe the behavior of systems. State diagrams require that the system described
is composed of a f inite number of states.
State table:
A state table is essentially a truth table in which some of the inputs are the current
state, and the outputs include the next state, along with other outputs.
There are two types of f inite state machine that can be built f rom sequential logic
circuits:
• Moore machine: the output depends only on the internal state. (The internal
state only changes on a clock edge; the output thus only changes on a clock
edge).
• Mealy machine: the output depends not only on the internal state, but also on
the inputs.
K-MAP:
Page | 70
EE-220L Digital Logic Design LAB10
Task 1:
Design a sequential circuit given by the lab instructor. And f ill the spaces.
1. State diagram
2. Reduced state diagram
3. State table
4. Flip f lop you are going to use and why?
5. Flip f lop input and output equations.
6. Logic diagram and simulation in PROTEOUS Sof tware.
Page | 71
EE-220L Digital Logic Design LAB10
Page | 72
EE-220L Digital Logic Design LAB10
Page | 73
EE-220L Digital Logic Design LAB10
Observations/Comments/Explanation of Results
(Please write in your own words the objectives and yours learning during the
experiment. Also explain the results and comment on it.)
Page | 74
EE-220L Digital Logic Design LAB 11
IMPLEMENTATION OF SERIES AND PARALLEL REGISTERS
APPARATUS / COMPONENTS
1. Digital Logic Trainer.
2. IC 7474 , 74166
Relevant Theory Topics: Shif t Registers (Ref er Chapter 06(6.1, 6.2), Digital
Page | 75
EE-220L Digital Logic Design LAB 11
L H X X H
H L X X L
L L X X H
H H ↑ H H
Functional Table of
H H ↑ L L
H H L X QO
IC 7474
Pin Configuration IC 7474
PROCEDURE
Wire the circuit as per f igure above and complete the table below.
Page | 76
EE-220L Digital Logic Design LAB 11
Data Out
Clock
Data In FF
Pulse
D
0 0
1(LSB) 1
1 2
1 3
1 4
0 5
0 6
1 7
1(MSB) 8
- 9
- 10
- 11
- 12
Page | 77
EE-220L Digital Logic Design LAB 11
Data
Clock Pulse Data In
Out
1 1 (LSB)
2 0
3 1
4 1 (MSB)
Af ter 4th pulse, immediately
disconnect Clock Input to see
desired output displayed (and -
latched/held indef initely) by the
LEDs
Table 2
PROCEDURE
Wire the circuit as per f igure above and write your observation.
Page | 78
EE-220L Digital Logic Design LAB 11
Data In Clock Data Out
PROCEDURE
Wire the circuit as per f igure above and write your observations.
CONNECTION:
1. Do not connect Pin 1 (it is f or serial input)
2. Connect inputs A,B,C,D,E,F,G,H to switches S0 to S7.
3. Connect Clock Inhibit Pin 6 to Ground.
4. Connect Clock Pulse to pin 7 and also to LED L8 (f or counting clock pulse)
5. Connect Output QH to LED L0
6. Connect a long wire to the IC pin 15 and keep other terminal of the wire
hanging (due to limited number of switches in the trainer, we will manually
connect this end of the wire to ground for data loading and keep it free
(or High)f or data shifting)
7. Connect Vcc and GND.
Page | 79
EE-220L Digital Logic Design LAB 11
PROCEDURE
Wire the circuit as per f igure above. Select various combination of inputs. Load the
input and then shif t it to output. Observe output (the state of the LED when data is
loaded shows state of pin H).
Page | 80
EE-220L Digital Logic Design LAB 11
LAB ASSIGNMENT
1. Can you make necessary changes so that above register becomes a Circular
Shift Register?
Page | 81
EE-220L Digital Logic Design LAB 11
Observations/Comments/Explanation of Results
(Please write in your own words the objectives and yours learning during the
experiment. Also explain the results and comment on it.)
Page | 82
EE-220L Digital Logic Design LAB 12
IMPLEMENTATION OF ASYNCHRONOUS AND SYNCHRONOU S COUNTERS
APPARATUS / COMPONENTS
1. Digital Logic Trainer
2. IC 7473, IC 74192, 7400 & 7408
OBJECTIVE:
To learn about Asynchronous and Synchronous Counters.
THEORY:
a. A sequential circuit that goes through a prescribed sequence of states upon the
application of input pulses is called a counter. They are used f or counting the
number of occurrences of an event and are usef ul f or generating timing
sequences to control operations in a digital system.
b. A counter that f ollows the binary sequence is called binary counter.
c. An N bit binary counter consists of n f lip-f lop and can count in binary f rom 0 to
2N -1.
d. In an asynchronous counter, the output of one FF (Flip-Flop) drives the CLK
(Clock) input of the next FF.
e. In a synchronous counter (or parallel counter) all the FFs are triggered
simultaneously by the clock pulse.
Page | 83
EE-220L Digital Logic Design LAB 12
PROCEDURE
Wire the circuit as per f igure above and verif y the counter is counting a binary
sequence. Also plot the timing diagram.
Page | 84
EE-220L Digital Logic Design LAB 12
PROCEDURE
Wire the circuit as per f igure above and verif y the counter is counting upto 9.
PROCEDURE
Wire the circuit as per f igure above and verif y the counter is counting upto 7.
Page | 85
EE-220L Digital Logic Design LAB 12
TASK 4: SYNCHRONOUS DECADE UP/DOWN COUNTER
IC 74192 is a Synchronous Decade up/down counter. Circuit diagram is as shown
below.
PROCEDURE
Wire the circuit as per f igure above and verif y the counter is counting up or down
as desired.
Page | 86
EE-220L Digital Logic Design LAB 12
Observations/Comments/Explanation of Results
(Please write in your own words the objectives and yours learning during the
experiment. Also explain the results and comment on it.)
Page | 87
EE-220L Digital Logic Design LAB 13
IMPLEMENTATION OF RAM AND ROM
APPARATUS / COMPONENTS
1. Digital Logic Trainer
2. 7402, 7404, 7408, and 7493.
OBJECTIVE:
To learn about various types of Memories.
THEORY:
a.A semi-conductor memory is an integrated circuit , capable of storing a binary
number. Generally speaking, memory elements can be divided into two
categories. One is called Random Access Memory (RAM), and the other is
called Read Only Memory (ROM). RAM is where we store Code and Data so
that CPU can work on it. It is Volatile memory that means that when power is
turned of f , the contents of the memory is cleared. ROM, on the other hand
retains data stored in it.
b. RAM circuits on the market have dif f erent conf iguration depending on how the
memory cell array is organized. A memory cell array organized with N by M
cells (N x M) can store N words with each word having M bits. So a 8K x 8 RAM
(IC 6116) can store 8K words, each word having 8 bits in it.
Page | 88
EE-220L Digital Logic Design LAB 13
cell and Reading data out of it.
PROCEDURE
Page | 89
EE-220L Digital Logic Design LAB 13
Observations/Comments/Explanation of Results
(Please write in your own words the objectives and yours learning during the
experiment. Also explain the results and comment on it.)
Page | 90
Digital Logic Design LAB 14
IMPLEMENTATION OF LAMP HAND BALL GAME
OBJECTIVE:
In this experiment, you will construct an electronic game of handball using a single
light to simulate the moving ball. This project demonstrates the application of bi-
directional shif t register with parallel load. It also shows the asynchronous input of
f lip-f lops. We will f irst introduce an IC that ins needed f or this experiment and then
present the logic diagram of the simulated lamp handball game.
Relevant Theory Topics: Latches and Flip f lop (Ref er Chapter 05Digital design,
Edition by Morris Mano)
IC Type 74194:
The pin assignment to the inputs and outputs is show in f ig A. The two mode control
inputs determine the type of operations as specif ied in the f unction table.
Logic Diagram:
The logic diagram of the electronic lamp handball is shown in f ig b. It consists of two
74194 IC’s, a dual D f lip f lop 7474IC,and three gate ICs:7400,7404 and 7408.The
ball is simulated by moving light that is shif ted lef t or right through the bidirectional
shif t register. The rate at which the light moves is determined by the f requency of
the clock. The circuit is f irst initialized with the reset switch. The start switch starts
the game by placing the ball (an indicator lamp) at the extreme right. The player
must press the pulser push button to start the ball moving to the lef t. The single
light shif ts to the lef t until it reaches the lef tmost position (the wall), at which the
ball returns to the player by reversing the direction of shif t of the moving light. When
the light is again at the rightmost position, the player must press the pulser again to
reverse the direction of shif t. If the player presses the pulser too soon or too late,
the ball disappears and the light goes of f . The game can be restarted by returning
the start switch on and then of f . The start switch must be open (logic -1) during the
game.
Page | 91
Digital Logic Design LAB 14
FIGURE A
Circuit Analysis:
Prior to connecting the circuit, analyze the logic diagram to ensure that you
understand how the circuit operates. In particular, try to answe r the f ollowing
questions:
1. What is the f unction of the reset switch?
2. Explain how the light in the rightmost position comes on when the start
switch is grounded. Why it is necessary to place the start switch in the logic -1
position bef ore the game starts?
3. What happens to the two mode-control inputs, S1 and S0, once the ball is set
in motion?
Page | 92
Digital Logic Design LAB 14
4. What happens to the mode-control inputs and to the ball if the pulser is
pressed while the ball is moving to the lef t? What happens if it is moving to
the right but has not reached the rightmost position yet?
5. Suppose that the ball returned to the rightmost position, but the pulser has
not been pressed yet; what is the state of the mode-control inputs if the
pulser is pressed? What happens if it is not pressed?
FIGURE B
Page | 93
Digital Logic Design LAB 14
Playing the Game:
Wire the circuit of Fig. B. Test the circuit f or proper operation by playing the game.
Note that the pulser must provide a positive-edge transition and that both the reset
and start switches must be open (be in the logic-1 state) during the game. Start with
a low clock rate and increase the clock f requency to make the handball game more
challenging.
Page | 94
Digital Logic Design LAB 14
LAB ASSIGNMENT:
Lamp Ping-Pong:
Modif y the circuit of Fig. b so as to obtain a lamp Ping-Pong game. Two players can
participate in this game, with each player having his own pulser. The player with the
right pulser returns the balls when in the extreme lef t position, and the player with
the lef t pulser returns the ball when in the extreme lef t position. The only
modif ication required f or the Ping-Pong game is a second pulser and a change of f ew
wires.
With a second start circuit, the game can be made to start (serve) by either
one of the two players. This addition is optional.
Page | 95
Digital Logic Design LAB 14
Observations/Comments/Explanation of Results
(Please write in your own words the objectives and yours learning during the
experiment. Also explain the results and comment on it.)
Page | 96