PAKISTAN NAVY ENGINEERING COLLEGE
NATIONAL UNIVERSITY OF SCIENCES AND TECHNOLOGY
PNEC-NUST
LAB MANUAL
DIGITAL LOGIC DESIGN
EE-221
Unified Curricula 2012
DEPARTMENT OF ELECTRONICS & POWER ENGINEERING
LIST OF EXPERIMENTS: DIGITAL LOGIC DESIGN EE-221
PAKISTAN NAVY ENGINEERING COLLEGE NUST
S NO PRACTICALS LAB HOURS
1 Introduction to ICs’ Testing & Recognition 3
2 Logic Gates 3
3 Verification of De Morgan’s Law 3
4 Multiplexer 3
5 Decoder 3
6 Latches & Flip Flop 6
7 Shift Register 3
8 Ring Counter 3
9 Binary And Decade Counter 3
10 Half And Full Adder 3
11 Adder/Subtractor 3
12 BCD to Decimal Decoder Driver 3
13 Introduction to Software Based Designing Of Digital Circuits 3
14 Mini Project 6
15 Lab Exam 2
LAB # 01
DIGITAL LOGIC DESIGN 2
PAKISTAN NAVY ENGINEERING COLLEGE NUST
Introduction to I.Cs’ Testing & Recognition
OBJECTIVE: To learn and perform computer based I.C testing
To learn the recognition of different ICs
EQUIPMENT: I.C Tester, PC
I.Cs 7400, 7404, 7408, 7432
DESCRIPTION:
Now a days large number of I.Cs are being manufactured by different manufacturers. The I.Cs contain
different circuits, they are recognized by the numbers printed on top of their surface.
The I.Cs can be tested by different ways, including P.C Based I.C Testing.
PROCEDURE:
a. Recognition of I.Cs:
1. Pick an I.C.
2. Keep the ‘notch’ (i.e. cut mark on I.C surface on left side)
3. Read the I.C number printed on top of the I.C surface.
4. Use TTL book to find out that each of the given I.C contains which logic circuit.
b. P.C Based I.C Testing:
1. Insert the I.C in ZIF socket of the I.C Tester such that keeping the Notch upward and lower side
of I.C must align with the lower holes of the socket.
2. Activate the program for “Top Max Universal I.C Tester /Programmer or Top Max Loader”.
3. Click the “Test” button on top of the window.
4. Select the “I.C Test” Button
DIGITAL LOGIC DESIGN 3
PAKISTAN NAVY ENGINEERING COLLEGE NUST
5. Click the “Select” button on right side of the window.
6. Select the I.C number to be tested from the “Library” and click the “Load” button.
DIGITAL LOGIC DESIGN 4
PAKISTAN NAVY ENGINEERING COLLEGE NUST
7. Finally click the “Test” button & observe the resulting message.
8. IC can also be identified using option ‘Auto Find’ as shown below:
DIGITAL LOGIC DESIGN 5
PAKISTAN NAVY ENGINEERING COLLEGE NUST
OBSERVATIONS:
I.C # Type of Gate No of Gates No of Inputs of a Gate
7400
7404
7408
7432
QUESTIONS:
1. What messages appear if the I.C is found to be fully functional or non functional?
2. To test an I.C which button of the I.C Tester Software program should be used if the I.C number
is not known?
LAB # 02
DIGITAL LOGIC DESIGN 6
PAKISTAN NAVY ENGINEERING COLLEGE NUST
Logic Gates
OBJECTIVE: To verify the truth table of logic gates
EQUIPMENT: Bread board
Power supply
LEDs
ICs: 7404, 7408 & 7432
DESCRIPTION:
Gates are the building blocks of all the digital circuits. Gates can be constructed by using switches,
relays, transistors, diodes etc. but now they are commonly available in the form of I.Cs (Integrated
Circuits). Generally more than one gate is present in a Gate I.C. Each I.C contains sets of input and
output pins.
NOT Gate:
It is also called as Logic Inverter because it inverts the logic applied to its input and gives the inverted
logic on the output. It is the only gate with one input.
A Y
OR Gate:
If logic 1 is applied to any one or more inputs of an OR gate, it produces a high output. It produces a low
output only when all of its inputs receive low logic.
A
Y
B
AND Gate:
If logic 0 is applied to any one or more inputs of an AND gate it produces a low logic. It produces a high
output only when all of its inputs receive high logic .
A
Y
PROCEDURE: B
1. Insert the IC on the bread board.
2. Connect +5V and Ground pins of the I.C with the respective leads of the power supply.
3. Connect the output pin with the LED.
4. Apply different combinations of Logic 1 & Logic 0 to the input pins.
5. Observe the response of LED on each input combination and verify it with the Truth Table.
DIGITAL LOGIC DESIGN 7
PAKISTAN NAVY ENGINEERING COLLEGE NUST
OBSERVATIONS:
Write down (separately) the truth tables of 7404, 7432 and 7408 as observed by you. (Use extra sheet, if
required)
ANALYSIS:
1. On the basis of your observations conclude that which IC contains which type of Gates.
2. Analyze the function of NOT, OR and AND gates in your words (use extra sheet, if required).
LAB # 03
DIGITAL LOGIC DESIGN 8
PAKISTAN NAVY ENGINEERING COLLEGE NUST
De Morgan’s Theorems
OBJECTIVE: To practically verify the De Morgan’s Theorems.
EQUIPMENT: Bread Board
Power Supply,
I.Cs 7400,7404,7408,7432
LEDs
DESCRIPTION: De Morgan’s Theorems can be expressed/stated below:
1- A . B = A + B i.e. Compliment of a product is equal to the sum of the compliments
2- A + B = A . B i.e. Complement of a sum equals the product of complements
CIRCUIT DIAGRAMS:
Using separate sheet draw the following:
(i) Logic diagrams for the R.H.S of the two De-Morgan’s Theorems’ expressions
(ii) Symbols of the Gates whose functions are expressed by the L.H.S of the theorems
(iii) Symbols of equivalent “Bubbled Gates”
PROCEDURE:
1. Construct the two circuits, by using Gate I.Cs: 7404 and 7432 (for first theorem) and 7404 and
7408 (for second theorem).
2. Connect LEDs to observe the outputs of the circuits.
OBSERVATIONS:
DIGITAL LOGIC DESIGN 9
PAKISTAN NAVY ENGINEERING COLLEGE NUST
Write down the Truth Tables of the two circuits as observed by you.
TRUTH TABLE CIRCUIT # 1
A B Y
TRUTH TABLE CIRCUIT #2
A B Y
ANALYSIS:
Q.1 Circuit # 1 is equivalent to which single Logic Gate?
Q.2 Circuit # 2 is equivalent to which single Logic Gate?
LAB # 04
DIGITAL LOGIC DESIGN 10
PAKISTAN NAVY ENGINEERING COLLEGE NUST
Multiplexer
OBJECTIVE: To understand the use of a MULTIPLEXER.
EQUIPMENT:
Bread Board
Power Supply
I.C 74150
DESCRIPTION:
Multiplexer is a circuit with many data inputs but only one data output, it also contains control inputs.
By using control inputs any one data input can be selected and the logic value present on it can be
directed to the output. Multiplexer is also called as “Data Selector”. It is an easy way to solve logic
problems.
DIAGRAM :
(16 x 1 MUX)
Pin Diagram of 74150 MUX
For the given Boolean expression write down the truth table, connect the MUX I.C’s data input pins with
the logic levels, in accordance to the logic levels in output-column(i.e for D0 apply logic level of Y0, for
D1 logic level of Y1 and so on), and apply one input combination ,at a time, on the control inputs.
Observe the outputs.
DIGITAL LOGIC DESIGN 11
PAKISTAN NAVY ENGINEERING COLLEGE NUST
____ _ _ __ _ _ _ _ __
Y= DCBA + DCBA + DCBA + DCBA + DCBA + DCBA + DCBA
OBSERVATIONS:
Observe and verify the outputs of the Truth Table from the circuit:
S.No. Control Inputs Outputs
D C B A Y
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
ANALYSIS: Analyze the use of Multiplexer for solving logic problems?
LAB # 05
DIGITAL LOGIC DESIGN 12
PAKISTAN NAVY ENGINEERING COLLEGE NUST
Decoder
OBJECTIVE: To learn the use of a Decoder.
EQUIPMENT:
Bread Board
Power Supply
IC 74138
LED
DESCRIPTION:
Decoder is similar to a De-multiplexer, with one exception, that, there is no data input. The Inputs are
only the control inputs which produce one active output. The active/selected output contains logic 0
while remaining outputs contain logic 1.
DIAGRAM:
Pin Diagram of 3x8 Line Decoder I.C 74138
DIGITAL LOGIC DESIGN 13
PAKISTAN NAVY ENGINEERING COLLEGE NUST
OBSERVATION:
Construct the circuit to observe the function of the decoder by connecting LEDs on the Y
outputs. Activate the outputs one by one by applying appropriate control input combinations.
Note down the selected ‘Y’ output against each input combination.
Control Inputs Selected
C B A Y
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
LAB # 06
DIGITAL LOGIC DESIGN 14
PAKISTAN NAVY ENGINEERING COLLEGE NUST
RS-Latch
OBJECTIVE: To construct “Clocked R-S Latch” and verify its truth table.
EQUIPMENT: Bread Board,
Power Supply,
7404 (Hex Inverter I.C.)
7400 (Quad 2 i/p NAND gate I.C)
DESCRIPTION:
Latch is a type of temporary storage device that has two stable states, called as ‘Set’ and
‘Reset’ states; it can retain either of these states. It is used to store a bit.
SYMBOL:
Draw the symbols of Active low and Active High Clocked RS Latches (use extra sheet).
CIRCUIT DIAGRAM:
Draw the circuit diagrams of Active low and Active High Clocked RS Latches by using NAND Gates
(use extra sheet).
OBSERVATIONS:
Construct the circuit of Active High Clocked S-R Latch (made by NAND Gates) and write down its
truth table as observed by you.
_
CLK S R Q Q Remarks
0 X X
1 0 0
1 0 1
1 1 0
1 1 1
QUESTION: Describe the function of Clocked S R Latch in your words.
(use extra sheet if required).
LAB # 07
DIGITAL LOGIC DESIGN 15
PAKISTAN NAVY ENGINEERING COLLEGE NUST
D-Flip-Flop
OBJECTIVE: To observe the function of D-Flip flop.
EQUIPMENT: Bread Board
Power Supply
Function Generator
7474 I.C
LEDs
DESCRIPTION:
A D-Flip flop has only one data input and a clock input, when the required ‘edge’ (+ve or–ve) of
the clock pulse arrives on the clock input, the data at ‘D’ input is transferred to the ‘Q’ output.
Two asynchronous inputs are also provided in the I.C, they are independent of the clock input.
These inputs are ‘CLEAR or RESET’ and ‘SET or PRESET’ inputs, the first one brings the flip flop in
the Reset state, while the second one brings it in the Set state.
SYMBOLS:
Draw the symbols of D flip flop (positive & negative edge triggered)
DIAGRAM:
Pin Diagram of I.C 7474
DIGITAL LOGIC DESIGN 16
PAKISTAN NAVY ENGINEERING COLLEGE NUST
Hook up the necessary connections to see the function of D flip flop.
OBSERVATIONS:
Write down the truth table on the basis of your observations.
CLR PR CLK D Q Q’ Remarks
ANALYSIS:
Q.1 Analyze the function of the I.C 7474.
Q.2 Analyze the difference between Latches and Flip flops with respect to Edge triggering and Level
triggering.
L AB # 08
DIGITAL LOGIC DESIGN 17
PAKISTAN NAVY ENGINEERING COLLEGE NUST
Shift Register
OBJECTIVE: To construct a Shift Register circuit.
EQUIPMENT: Bread Board, Power Supply, I.Cs 7474 or 7494.
DESCRIPTION:
A “Register” is a group of memory elements (flip flops) that work together as a unit. A simple register
can only store a binary word. A register capable of shifting its binary information either to the right or
left is called a shift register.
A shift register can store a binary word, as well as it can shift the bits of its stored word. This bit shifting
is essential for different arithmetic and logic operations in digital systems.
DIAGRAM:
I/P D1 Q1 D2 Q2 D3 Q3 O/P
Clk
Note: Use TTL Data book/internet to get the pin diagram of the I.C 7494 and draw it.
OBSERVATION:
Observe the logics on all the D inputs and Q outputs and enter the values in the following table.
Clk # I/p Data at D i/p s Data at Q o/p s
(Data) D1(i/p) D2 D3 Q1 Q2 Q3(o/p)
0
1
2
3
4
5
ANALYSIS:
DIGITAL LOGIC DESIGN 18
PAKISTAN NAVY ENGINEERING COLLEGE NUST
Q.1 The constructed Shift register is of how many bits?
Q.2 What is the type of the Shift register?
DIGITAL LOGIC DESIGN 19
PAKISTAN NAVY ENGINEERING COLLEGE NUST
LAB # 09
Ring Counter
OBJECTIVE: To construct a Ring Counter
EQUIPMENT: Bread Board
Power Supply
I.C. 7476 or any other ‘Ring Counter’ I.C.
DESCRIPTION:
It is the modified form of a Counter in which among all the outputs there is a unique output (normally
high output) while rest of the outputs are same (normally low).This high output shifts to the next flip
flops on every clock pulse and finally it returns back to the first flip flop.
.
PIN DIAGRAM:
Pin Diagram of 7476
CIRCUIT DIAGRAM:
Draw the complete diagram of a 3 bit Ring counter (using J K Flip Flops, negative edge triggered).
3 bit Ring Counter
Note: Use TTL Data book/internet to get the pin diagram of the Ring Counter I.C to be used and draw it.
DIGITAL LOGIC DESIGN 20
PAKISTAN NAVY ENGINEERING COLLEGE NUST
OBSERVATIONS:
Write down the Truth Table as you observed.
Clk # Q1 Q2 Q3
DIGITAL LOGIC DESIGN 21
PAKISTAN NAVY ENGINEERING COLLEGE NUST
LAB # 10
Binary Up-Counter
OBJECTIVE: To construct a 4-bit Binary Up-Counter.
EQUIPMENT: Bread Board, Power Supply, Function Generator, I.C 7476 or 7493.
DESCRIPTION:
‘Counter’ is a circuit which counts the number of clock pulses that arrive at its clockinput. Counters are
of different types, those which count upward are called “Up- Counters”. A 4-bit Counter can count from
binary number0000 to binary number 1111 i.e. in decimal from 0 to 15.
DIAGRAMS:
Pin Diagram of 7476
CIRCUIT:
+5V
PR PR PR PR
Q4 Q3 Q2 Q1
Q J Q J Q J Q J
4 3 2 1 CLK
’ ’
Q K Q K Q’ K Q’ K
R R R R
Rst
4-bit Binary Up-Counter
DIGITAL LOGIC DESIGN 22
PAKISTAN NAVY ENGINEERING COLLEGE NUST
Note: Use TTL Data book/internet to get the pin diagram of the I.C 7493 and draw it.
OBSERVATIONS:
Write down the observed Outputs of the Up counter.
CLK# Q4 Q3 Q2 Q1
0
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
ANALYSIS:
Q.1 How a four bit Up counter can be converted into a MOD 10 (Decade) counter?
Q.2 What frequency of signals you observe if the outputs of the Counter are viewed by using
Oscilloscope?
Q.3 Analyze the difference of frequencies of Counter’s outputs with respect to ‘Frequency Division’.
LAB # 11
Half & Full Adders
DIGITAL LOGIC DESIGN 23
PAKISTAN NAVY ENGINEERING COLLEGE NUST
OBJECTIVE: To use an Adder I.C to perform binary addition
EQUIPMENT: Bread Board
Power Supply
I.C 7483
DESCRIPTION:
The basic digital circuits used to perform arithmetic operations are Half Adder and Full Adder. Half
Adder circuit contains two inputs and two outputs. It adds two bits at a time, producing outputs of
“sum” and “carry”.
Full adder circuit contains three inputs and two outputs. It adds three bits at a time and gives two
outputs of “sum” and “carry”. A Full adder can be made by combining two Half Adders. I.C. 7483
contains four full adders.
PIN DIAGRAM:
Pin Diagram of 7483
CIRCUIT DIAGRAM:
DIGITAL LOGIC DESIGN 24
PAKISTAN NAVY ENGINEERING COLLEGE NUST
Full Adder Using Two Half Adder
OBSERVATION:
Add the numbers and observe the results.
(i) 5 + 5 (ii) 10 + 10 (iii) 15 + 15 (iv) 12 + 3
A4 A3 A2 A1 B4 B3 B2 B1 C0 S4 S3 S2 S1
0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0
1 1 1 1 1 1 1 1
1 1 0 0 0 0 1 1
CALCULATIONS:
LAB # 12
DIGITAL LOGIC DESIGN 25
PAKISTAN NAVY ENGINEERING COLLEGE NUST
Adder/Subtractor
OBJECTIVE: To use a Full adder I.C with necessary circuit to perform binary subtraction
EQUIPMENT: Bread Board
Power Supply
I.C 7483
I.C 7486
DESCRIPTION:
In order to simplify circuitry in a calculating machine, it is convenient to have a device which can
perform Addition as well as Subtraction.
I.C 7483 I.C. can be used as an ‘Adder’ as well as a ‘Subtractor’ with appropriate arrangements i.e. by
connecting it with an X-OR gate I.C. This can be done by using the mathematical technique called as “2’s
Complement Method”.
CIRCUIT DIAGRAM:
Pin Diagram of IC 7483
OBSERVATION:
DIGITAL LOGIC DESIGN 26
PAKISTAN NAVY ENGINEERING COLLEGE NUST
Subtract the numbers and observe the results.
(i) 5 - 5 (ii) 10 -5 (iii) 15 -10 (iv) 12 – 3
Convert the given numbers in Binary and fill the table as per your observations.
A4 A3 A2 A1 B4 B3 B2 B1 Brw D4 D3 D2 D1
CALCULATIONS:
DIGITAL LOGIC DESIGN 27
PAKISTAN NAVY ENGINEERING COLLEGE NUST
LAB # 13
BCD To Decimal Decoder Driver & 7 Segment Display
OBJECTIVE: To learn the use of Seven Segment Display and Decoder Driver.
EQUIPMENT: Bread Board
Power Supply
7 Segment Display
I.C 7447
DESCRIPTION:
Seven segment display along with decoder driver are used to show the binary numbers in the form of
decimal numbers. These displays are of two types that are Common Anode and Common Cathode types.
CIRCUIT DIAGRAM:
7447 I.C
Pins 1,2,6,7 are the input pins BCDA or in sorted format (MSB to LSB) DCBA is equal to pins 6,2,1,7. Not
only inputs from 0000 to 1001 are converted to decimal and displayed on the 7 segment display as 0 to
DIGITAL LOGIC DESIGN 28
PAKISTAN NAVY ENGINEERING COLLEGE NUST
9, but also 1010 (10) to 1111 (15) are displayed on the display, observe those patterns and show them
on the following diagrams by using different colors.
10 = 11 = 12 =
13 = 14 = 15 =
QUESTIONS:
Q.1 What is the function of ‘LT’ Pin in the I.C 7447?
Q.2 What happens if all the inputs, applied to the I.C, are high?
DIGITAL LOGIC DESIGN 29
PAKISTAN NAVY ENGINEERING COLLEGE NUST
LAB # 14
Introduction to Software Designing of Digital Circuits
OBJECTIVE: Introduction to Software designing plus verification of basic Logic Gates (7404, 7408,
7432) truth tables with the help of simulation.
EQUIPMENT: PC, Multisim
DESCRIPTION:
Multisim is an industry-standard simulation and circuit design software which gives the advanced
analysis and design capabilities to optimize performance, reduce design errors, and shorten time to
prototype. The steps how to get started with Multisim are as follows:
PROCEDURE:
1. Open Multisim from the Start menu and click on ‘Evaluate’.
DIGITAL LOGIC DESIGN 30
PAKISTAN NAVY ENGINEERING COLLEGE NUST
2. Click the option Place source to add 5V VCC and Ground, then click on TTL to insert
7404 NOT gate. After clicking on the component press OK to have the parts placed on the
workspace.
3. Similarly click the option Place basic and then option Switches to insert a SPDT switch that
will act as an input for the logic gate. After placing all the components on the workspace,
connect them using cursor. The final schematic should be as followed:
DIGITAL LOGIC DESIGN 31
PAKISTAN NAVY ENGINEERING COLLEGE NUST
4. Now click the Play button to run the simulation and press the Space Bar to change the
state of the input logic gate.
5. Observe the response of L.E.D at the output and verify the truth table.
Note: Use Digital Ground instead of normal ground.
OBSERVATIONS:
Use above mentioned example to design a Counter/Shift Register/Adder circuit.
Include the Screen shot of the circuit you made and simulated.
ANALYSIS:
Analyze how simulation is useful for the design & development of logic circuits.
DIGITAL LOGIC DESIGN 32