DSD Lab Manual 3 Sem
DSD Lab Manual 3 Sem
1 D/F
18ECL38
B.E -III Semester
Lab Manual 2019-20
Name : ____________________________________
USN : ____________________________________
Assistant Professors
Approved by:
Dr. Rajagopala R
Vision
Mission
12. Life-long learning: Recognise the need for, and have the preparation
and ability to engage in independent and life-long learning in the broadest
context of technological change
Channabasaveshwara Institute of Technology
(Affiliated to VTU, Belgaum & Approved by AICTE, New Delhi)
(NAAC Accredited &ISO 9001:2015 Certified Institution)
NH 206 (B.H. Road), Gubbi, Tumkur – 572 216.Karnataka.
PSO1: Specify, design, build and test analog and digital systems for signal
processing including multimedia applications, using suitable components or
simulation tools.
PSO2: Understand and architect wired and wireless analog and digital
communication systems as per specifications and determine their
performance.
Digital System Design Laboratory
[As per Choice Based Credit System (CBCS) scheme]
SEMESTER – III (EC/TC)
SubCode:18ECL38 IA Marks : 40
Hrs/ Week : 03 (01Hr Tutorial (Instructions) + 02 Hours Laboratory)
Exam Hours : 03 Exam Marks : 60
1. Verify (a) Demorgan’s Theorem for 2 variables. (b) The sum-of product
and product-of-sum expressions using universal gates.
2. Design and implement
(a) Full Adder using i) Basic logic gates ii) NAND gates.
(b) Full Subtractor using i) Basic logic gates ii)NAND gates.
3. (a) Design and implement 4-bit Parallel Adder/ Subtractor using IC
7483.
(b) BCD to Excess – 3 Code conversion and vice versa.
4. (a) Design and Implementation of 1-bit Comparator.
(b) Design and Implementation of 5-bit Magnitude Comparator using IC
7485.
5. Realize (a) Adder and Subtractor using IC 74153
(b) 4-variable function using IC 74151(8:1MUX).
6. (a) Adder & Subtractors using IC 74139
(b) Binary to Gray code Conversion & Vice Versa (74139)
7. Realize the following flip-flops using NAND Gates Master slave JK, D & T
Flip-flops.
8. Realize the following shift registers using IC7474/ IC 7495
(a) SISO (b) SIPO (c) PISO (d)PIPO (e) Ring Counter (f) Johnson Counter
9. Realize i) Design Mod N synchronous up / Down counter using IC 7476
JK Flip Flop
ii) Mod N counter using IC 7490/7476
iii) Synchronous counter using IC 74192
10. Design Pseudo Random sequence generator using IC 7495
11. Design Serial Adder with Accumulator and simulate using simulation
tool.
12. Design Binary Multiplier and simulate using simulation tool.
Channabasaveshwara Institute of Technology
(Affiliated to VTU, Belgaum & Approved by AICTE, New Delhi)
(NAAC Accredited & ISO 9001:2015 Certified Institution)
NH 206 (B.H. Road), Gubbi, Tumkur – 572 216. Karnataka.
Course Objectives
This laboratory course enables students to get practical experience in
design, realization and verification of
Demorgan’s Theorem, SOP, POS forms
Full/Parallel Adders, Subtractors and Magnitude Comparator
Multiplexer using logic gates
Demultiplexers and Decoders
Flip-Flops, Shift registers and Counters.
Course Outcomes
On the completion of this laboratory course, the students will be able to:
Demonstrate the truth table of various expressions and combinational
circuits using logic gates.
Design various combinational circuits’ such as adders, subtractors,
comparators, multiplexers and demultiplexers.
Construct flips-flops, counters and shift registers.
Simulate Serial adder and Binary Multiplier.
Table of Contents
Expt.
Contents Page No.
No.
Verify (a) Demorgan’s Theorem for 2 variables. (b) The sum-of
1. 1-6
product and product-of-sum expressions using universal gates.
Design and implement
2. (a) Full Adder using i)basic logic gates ii)NAND gates. 7-12
(b) Full Subtractor using i)basic logic gates ii)NAND gates.
(a) Design and implement 4-bit Parallel Adder/ Subtractor using IC
3. 7483. 13-20
(b) BCD to Excess – 3 Code conversion and vice versa.
(a) Design and Implementation of 1-bit Comparator.
Realize the following flip-flops using NAND Gates Master slave JK,
7. 41-44
D & T Flip-flops.
12. Design Binary Multiplier and simulate using simulation tool. 65-66
Record Marks
Date
Observation
Signature
Signature
(Student)
(Max. 10)
(Max . 20)
(Faculty)
Marks
Sl.
Name of the Experiment
No
Record
Conduction Repetition
Submission
Average
Digital System Design Laboratory (18ECL38) 2019-20
Verification:
1) A.B = A+B
7404
7404
7404
A B A.B A.B A+
A B A B
B
0 0 0 1
0 0 1 1 1
0 1 0 1
0 1 1 0 1
1 0 0 1
1 0 0 1 1
1 1 1 0
1 1 0 0 0
2) A+B = A.B
7404
7404
7404
0 0 0 1 0 0 1 1 1
0 1 1 0 0 1 1 0 0
1 0 1 0 1 0 0 1 0
1 1 1 0 1 1 0 0 0
Theory:-
Theorem 1:
The compliment of the product of two variables is equal to the sum of the
compliment of each variable. Thus according to De-Morgan’s laws or De-
Morgan's theorem if A and B are the two variables or Boolean numbers.
Then accordingly,
A.B = A+B
Theorem 2:-
The compliment of the sum of two variables is equal to the product of the
compliment of each variable. Thus according to De Morgan’s theorem if A
and B are the two variables then,
A+B = A.B
Given problem:
A B C D Y Y= f(A,B,C,D)=Σm(5,6,7,13,14,15)
0 0 0 0 0 Y= f(A,B,C,D)=ΠM(0,1,2,3,4,8,9,10,11,12)
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 1
0 1 1 0 1
0 1 1 1 1
1 0 0 0 0
1 0 0 1 0
1 0 1 0 0
1 0 1 1 0
1 1 0 0 0
1 1 0 1 1
1 1 1 0 1
1 1 1 1 1
K-map Simplification:
Procedure:
1. Verify that the gates are working.
2. Construct a truth table for the given problem.
3. Draw a Karnaugh Map corresponding to the given truth table.
4. Simplify the given Boolean expression manually using the Karnaugh Map.
A. Implementation Using Logic Gates:
5. Realize the simplified expression using logic gates.
6. Connect VCC and ground as shown in the pin diagram.
7. Make connections as per the logic gate diagram.
8. Apply the different combinations of input according to the truth tables.
Verify that the results are correct.
B. Implementation Using Universal Gates:
1. Convert the AND-OR logic into NAND-NAND and NOR-NOR logic.
2. Realize the simplified Boolean expressions using only NAND gates, and
then using only NOR gates.
3. Connect the circuits according to the circuit diagrams, apply inputs
according to the truth table and verify the results.
Result:
1. Half Adder
Truth Table:
A B S C
0 0 0 0
0 1 1 0 S =AB
C = A.B
1 0 1 0
1 1 0 1
Theory:
D =A B
Br= A’.B
2. Full Adder
Truth Table:
A B Cin S C
0 0 0 0 0
0 0 1 1 0 S = A B Cin
0 1 0 1 0
C = A.B+ Cin (A B)
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
Procedure:
3. Switch on the VCC power supply and apply the various combinations
of the inputs according to the respective truth tables.
4. Verify that the outputs are according to the expected results.
5. Repeat the procedure for the full adder circuit, the half subtractor
and full subtractor circuits.
3. Half Subtractor
Truth Table:
A B D Br
0 0 0 0 D =AB
0 1 1 1
Br = A.B
1 0 1 0
1 1 0 0
(i)
(ii) using logic gates
4. Full Subtractor
Truth Table:
A B Cin D Br
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1 D = A B Cin
1 0 0 1 0 Br= A’.B + A’.Cin + B.Cin
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
Result:
Dept. of ECE, CIT, Gubbi Page 12
Digital System Design Laboratory (18ECL38) 2019-20
Circuit:
MSB LSB
INPUTS Cin
A3 A2 A1 A0
B3 B2 B1 B0
OUTPUT Cout S3 S2 S1 S0
Theory:
The Full adder can add single-digit binary numbers and carries. The
largest sum that can be obtained using a full adder is (11)2. Parallel adders
can add multiple-digit numbers. If full adders are placed in parallel, we can
add two- or four-digit numbers or any other size desired. Figure below uses
STANDARD SYMBOLS to show a parallel adder capable of adding two digit
binary numbers. The addend would be input on the A inputs (A2 = MSD,
A1 = LSD), and the augend input on the B inputs (B2 = MSD, B1 = LSD).
To add four bits need four full adders arranged in parallel. IC 7483 is a 4-
bit parallel adder is used.
(i) 4 bit subtraction operation using 7483 for A>B and Cin=1
• 8 is realized at A3 A2 A1 A0 = 1000
Therefore Cin =1
A3 A2 A1 A0 = 1 0 0 0
B3 B2 B1 B0 = 1 1 0 0
S3 S2 S1 S0 = 0 1 0 1 Cout = 1 (Ignored)
(ii) 4 bit subtraction operation using 7483 for A<B and Cin=1
Example: 14 – 15 = -1 (1111)2
• 14 is realized at A3 A2 A1 A0 = 1110
Therefore Cin = 1
A3 A2 A1 A0 = 1 1 1 0
B3 B2 B1 B0 = 0 0 0 0
S3 S2 S1 S0 = 1 1 1 1
Since the most significant bit of the result is 1, this is a negative number, so form the two's
complement of (1111)=-(0001)2
Circuit:
Result:
1. Excess-3-code to BCD:
Truth Table:
Circuit:
Theory:
Procedure:
1. Check all the components for their working.
2. Insert the appropriate IC into the IC base.
3. Make connections as shown in the circuit diagram.
4. Apply Excess-3-code code as first operand (A) and binary 3 as second
operand (B) and Cin=1 for realizing Excess-3-code to BCD.
2. BCD to Excess-3-code:
Truth Table:
Circuit:
Procedure:
1. Check all the components for their working.
2. Insert the appropriate IC into the IC base.
3. Make connections as shown in the circuit diagram.
4 Apply BCD code as first operand (A) and binary 3 as second operand (B) and
cin=0 for Realizing BCD-to-Excess-3-code:
Result:
1-BIT COMPARATOR
Truth Table:
5-Bit Comparator
Truth Table:
IC 7485
COMPARATOR
Aim: To realize 1 Bit using basic gates & 5 Bit magnitude comparator using
IC 7485.
Theory:
Result:
A B S C
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
(ii)Full Adder:
A B Cin S C
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
Theory:
Procedure:
1. The connection is made as shown in the diagram.
2. Here, S1 and S0 are the channel selection lines,I0, I1, I2, I3 are the
respective data lines of the channels and Y is the output.
3. Based on the selection lines one of the inputs will be selected at the
output, and thus the truth table is verified.
A B D Br
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
A B Bin D Br
0 0 0 0 0
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
Result:
Y = F(A,B,C,D) = ∑m(0,1,2,7,8,9,14,15)
Truth table:
Aim: To design and set up the following circuit using 4 variable function
using IC 74151 (8:1 MUX)
Procedure:
1. For the given expression, a truth table is to be written.
2. An expression in SOP format is to be written.
3. The connection is made according to the obtained expression.
4. The truth table is verified for that particular expression.
Result:
Truth table:
Theory:
A decoder is a combinational circuit that connects the binary information
from “n” input lines to a maximum of 2n unique output lines. Decoder is
also called a min-term generator/maxterm generator. A min-term generator
is constructed using AND and NOT gates. The appropriate output is
indicated by logic 1 (positive logic). Max-term generator is constructed using
NAND gates. The appropriate output is indicated by logic 0 (Negative logic).
The IC 74139 accepts two binary inputs and when enable provides 4
individual active low outputs. The device has 2 enable inputs (Two active
low).
Procedure:
1. For the given Boolean expression, a truth table is to be written.
2. An expression in SOP format is to be written.
3. The connection is made according to the obtained expression.
4. The truth table is verified for that particular expression.
Result:
Truth Table:
B3 B2 B1 B0 G3 G2 G1 G0
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
1 0 1 0 1 1 1 1
1 0 1 1 1 1 1 0
1 1 0 0 1 0 1 0
1 1 0 1 1 0 1 1
1 1 1 0 1 0 0 1
1 1 1 1 1 0 0 0
Karaungh maps:
B1B0 00 01 11 10 B1B0 00 01 11 10
B3B2 B3B2
00 00
01 01 1 1 1 1
11 1 1 1 1 11
10 1 1 1 1 10 1 1 1 1
G3 = B3 G2 = B3 + B2
Aim: To realize:
i. Binary to Gray Converter using 74139.
ii. Gray to Binary Converter using 74139.
Theory:
(1) The M.S.B. of the gray code will be exactly equal to the first bit of the
given binary number.
(2) Now the second bit of the code will be exclusive-or of the first and second
bit of the given binary number, i.e if both the bits are same the result
will be 0 and if they are different the result will be 1.
(3) The third bit of gray code will be equal to the exclusive -or of the second
and third bit of the given binary number. Thus the Binary to gray code
conversion goes on. One example given below can make your idea clear
on this type of conversion.
Following steps can make your idea clear on this type of conversions.
(1) The M.S.B of the binary number will be equal to the M.S.B of the given
gray code.
(2) Now if the second gray bit is 0 the second binary bit will be same as the
previous or the first bit. If the gray bit is 1 the second binary bit will
alter. If it was 1 it will be 0 and if it was 0 it will be 1.
(3) This step is continued for all the bits to do Gray code to binary
conversion.
B1B0 00 01 11 10 B1B0 00 01 11 10
B3B2 B3B2
00 1 1 00 1 1
01 1 1 01 1 1
11 1 1
11 1 1
10 1 1
10 1 1
G1 = B2 + B1 G0 = B1 + B0
Procedure:
1. Verify that the gates are working.
2. Write the proper truth table for the given Binary to Gray /Gray to binary
converter
3. Draw Karnaugh maps for each bit of output. Simplify the Karnaugh
maps to get simplified Boolean Expressions.
4. Make connections on the trainer kit as shown in the circuit diagram for
the Binary to Gray /Gray to Binary converter.
5. Check the outputs for the corresponding inputs.
Karnaugh maps:
G1G0 00 01 11 10 G1G0 00 01 11 10
G3G2 G3G2
00 00
01 01 1 1 1 1
11 1 1 1 1 11
10 1 1 1 1 10 1 1 1 1
B3 = G3 B2 = G3 + G2
G1G0 00 01 11 10 G1G0 00 01 11 10
G3G2 G3G2
00 1 1 00 1 1
01 1 1 01 1 1
11 1 1 11 1 1
10 1 1 10 1 1
B1 = G3 + G2 + G1 B0 = G3 + G2 + G1 + G0
Result:
Truth Table:
Circuit:
FLIP FLOPS
Aim: To realize the following Flip-flops using NAND gates: Master slave JK,
D and T Flip-flops.
Components required: IC 7410, IC7400, Patch Cords
Theory:
A flip-flop is a circuit that has two stable states and can be used to
store state information. A flip-flop is a bistable multivibrator. The circuit
can be made to change state by signals applied to one or more control
inputs and will have one or two outputs. It is the basic storage element in
sequential logic. Flip-flops and latches are a fundamental building block of
digital electronics systems used in computers, communications, and many
other types of systems.
A flip–flop is a “bit bucket”; it holds a single binary bit .Flip flops are
actually an application of logic gates. With the help of Boolean logic we can
create memory with them. Flip flops can also be considered as the most
basic idea of a Random Access Memory [RAM].
Procedure:
2. D – FLIPFLOP:
Truth Table:
Circuit:
3. T – FLIPFLOP:
Truth Table:
Circuit:
Result:
2. Make sure the 7495 is operating in SISO mode by ensuring Pin 6 (Mode)
is set to LOW, and connect clock input to Clk 1(Pin 9).
3. The shift register is loaded with 4 bits of data one by one serially.
4. At the end of the 4thclock pulse, the first data ‘d0’ appears at QD.
5. Apply another clock pulse, to get the second data bit, ‘d1’ at QD.
Applying yet another clock pulse gets the third data bit, ‘d2’ at QD, and so
on.
Serial
CLK QA QB QC QD
I/P
1 do=0 0 X X X
2 d1=1 1 0 X X
3 d2=1 1 1 0 X
4 d3=1 1 1 1 0=do
5 X X 1 1 1=d1
6 X X X 1 1=d2
7 X X X X 1=d3
SHIFT REGISTERS
Aim: To study IC 74S95, and the realization of Shift left, Shift right, SIPO,
SISO, PISO, PIPO operations using the same.
Components required: IC 7495, patch cords etc.
Theory:
3. Apply the first data at pin 1 (SD1) and apply one clock pulse. We
observe that this data appears at pin 13 (QA).
4. Now, apply the second data at SD1. Apply a clock pulse. We now
observe that the earlier data is shifted from QA to QB, and the new
data appears at QA.
5. Repeat the earlier step to enter data, until all bits are entered one by
one.
6. At the end of the 4th clock pulse, we notice that all 4 bits are
available at the parallel output pins QA through QD.
Serial
CLK QA QB QC QD
I/P
1 1 1 X X X
2 0 0 1 X X
3 1 1 0 1 X
4 1 1 1 0 1
Serial
CLK QA QB QC QD
I/P
1 1 X X X 1
2 0 X X 1 0
3 1 X 1 0 1
4 1 1 0 1 1
Truth Table:
Circuit:
Truth Table:
Circuit:
M CLK QA QB QC QD
M CLK QA QB QC QD
1 1 1 0 0 0
1 1 1 0 0 0
0 2 1 1 0 0
0 2 0 1 0 0
0 3 1 1 1 0
0 3 0 0 1 0
0 4 1 1 1 1
0 4 0 0 0 1
0 5 0 1 1 1
0 5 1 0 0 0
0 6 0 0 1 1
0 6 0 1 0 0
0 7 0 0 0 1
0 8 0 0 0 0
0 9 1 0 0 0
0 10 1 1 0 0
Circuit:
Theory:
A ring counter is a circular shift register which is initiated such that
only one of its flip-flops is the state one while others are in their zero states.
A ring counter is a Shift Register with the output of the last one connected
to the input of the first, that is, in a ring. Typically, a pattern consisting of a
single bit is circulated so the state repeats every n clock cycles if n flip-flops
are used. It can be used as a cycle counter of n states.
Result:
Truth Table:
Aim: To design and test 3-bit binary synchronous counter using flip-flop IC
7476 for the given sequence.
Theory:
A counter in which each flip-flop is triggered by the output goes to previous
flip-flop. As all the flip-flops do not change states simultaneously in
asynchronous counter, spike occur at the output. To avoid this, strobe pulse
is required. Because of the propagation delay the operating speed of
asynchronous counter is low. This problem can be solved by triggering all
the flip-flops in synchronous with the clock signal and such counters are
called synchronous counters.
Procedure:
• Check all the components for their working.
• Insert the appropriate IC into the IC base.
• Make connections as shown in the circuit diagram.
• Verify the Truth Table and observe the outputs.
Result:
CLK QD QC QB QA
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
Waveforms:
CLK QD QC QB QA
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
Procedure:
1. Check all the components for their working.
2. Make connections as shown in the circuit diagram.
3. Clock pulses are applied one by one at the clock input and output is
observed at QA,QB ,QC and QD
4. Verify the Truth Table and observe the outputs.
Result:
Truth table:
Procedure:
1. Check all the components for their working.
2. Make connections as shown in the circuit diagram.
3. Clock pulses are applied one by one at the clock input and output is
observed at QA,QB ,QC and QD
4. Verify the Truth Table and observe the outputs.
Truth table:
Result:
Truth Table:
QAQB 00 01 11 10
QCQD
00
01 1 1 1 1
11
10 1 1 1 1
D = QCQD + QCQD
Procedure:
1. Truth table is constructed for the given sequence, and Karnaugh maps
are drawn in order to obtain a simplified Boolean expression for the circuit.
2. Connections are made as shown in the circuit diagram.
3. Mode M is set to LOW (0), and clock pulses are fed through Clk 1 (pin 9).
4. Clock pulses are applied at CLK 1 and the output values are noted, and
checked against the expected values from the truth table.
Result:
Truth Table
Result:
Circuit Diagram:
Result:
IC PIN DETAILS
VIVA QUESTIONS
8. Define Literal.
Question Bank
3. Realize and verify the truth table of full adder basic gates only.
4. Realize and verify the truth table of a full Subtractor using basic gates
only.
5. Realize and verify the truth table of full adder NAND gates only.
6. Realize and verify the truth table of a full Subtractor using NAND
gates only.
10. Realize and verify the truth table of a half & full adder using IC
74153.
11. Realize and verify the truth table of a half & full subtractor using IC
74153.
13. Realize and verify the truth table of a half & full adder using IC
74139.
14. Realize and verify the truth table of a half & full subtractor using IC
74139.
15. Realize and verify the Binary to Gray Code Conversion using IC
74139.
16. Realize and verify the Gray to Binary Code Conversion using IC
74139.
17. Realize and verify the truth Table of Master Slave JK Flip Flop using
NAND gates
18. Realize and verify the truth Table of Master Slave D Flip Flop using
NAND gates
19. Realize and verify the truth Table of Master Slave T Flip Flop using
NAND gates
20. Realize and verify Ring & Johnson counter using IC 7495
23. Design and realize Mod N up / Down counter using IC 7476 JK Flip
Flop.
----------------------------------*****------------------------------