4ME3-21 - Digital Electronics Lab
4ME3-21 - Digital Electronics Lab
4ME3-21 - Digital Electronics Lab
A
Course File
on
(Digital Electronics Lab: 4ME3-21)
Programme: Mechanical Engineering
Semester: IV
Session: 2021-2022
Pramod Jain
Assistant Professor
Mechanical Engineering Department
Institute Vision
"To promote higher learning in advanced technology and industrial research to make our country a
global player."
Mission
"To promote quality education, training and research in the field of Engineering by establishing
effective interface with industry and to encourage faculty to undertake industry sponsored projects
for students. "
Quality Policy
o All its endeavors like admissions, teaching- learning processes, examinations, extra
and co-curricular activities, industry institution interaction, research & development,
continuing education, and consultancy.
o Functional areas like teaching departments, Training & Placement Cell, library,
administrative office, accounts office, hostels, canteen, security services, transport,
maintenance section and all other services.”
Departmental Vision/Mission
Vision
To become a nationally visible mechanical engineering department with excellence in teaching-
learning, research and development, entrepreneurship and industry outreach activities.
Mission
M1. To provide facilities and environment conducive to high quality education and research and
development in the field of mechanical engineering.
M2. To inculcate technical, professional and communication skills in students, staff and faculty
members.
M3. To instill innovative skills, critical thinking, leadership & team work in students through various
teaching-learning activities and industry linkages.
M4. To inculcate strong ethical qualities in the students and faculty for realizing lifelong learning and
serving the society and nation at large.
7 Design & Realize a combinational circuit that will accept a 2421 BCD code and
drive a TIL -3 I 2 seven-segment display.
8 Using basic logic gates, realize the R-S, J-K and D-flip flops with and without
clock signal and verify their truth table.
9 Construct a divide by 2, 4 & 8 asynchronous counter. Construct a 4-bit binary
counter and ring counter for a particular output pattern using D flip flop.
10 Perform input/output operations on parallel in/parallel out and Serial
in/Serial out registers using clock. Also exercise loading only one of multiple values into
the register using multiplexer.
Note: As far as possible, the experiments shall be performed on bread board. However
experiment Nos. l-4 are to be performed on bread board only
Prerequisite of Course
Mechatronics requires knowledge of the following subjects:
Text Book
S.No. Title of Book Author(S) Publication
Modern Digital
1 R P Jain TMH
Electronics
Reference Books
S.No. Title of Book Author(s) Publication
Time Table
PO/PSO-Indicator-Competency
PO 1: Engineering knowledge: Apply the knowledge of mathematics, science, engineering
fundamentals, and an engineering specialization for the solution of complex engineering
problems.
Competency Indicators
2.1 Demonstrate an ability to identify 2.1.2. Identify the parametric dependence of the target
and formulate complex engineering solution to the problem
problem
2.1.3. Identify the required knowledge in physical
science, or mathematical knowledge needed to handle
the defined engineering problem
2.4. Demonstrate an ability to execute a 2.4.3. Measure the certainty factor of the proposed
solution process and analyze results model, identify the error in the solution process, or the
inherited limitations of the solution
PO 5: Modern tool usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modelling to complex engineering
activities with an understanding of the limitations.
Teaching-Learning Methodology
Experiments
Demonstrations
Concept Maps
Models
Charts
Animation
Virtual Lab
Faculty sign………………….
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Experiment No: 1
Aim: To verify the truth tables of basic logic gates: AND, OR, NOR, NAND, NOR. Also to
verify the truth table of Ex-OR, Ex-NOR (For 2, 3 & 4 inputs using gates with 2, 3, & 4
inputs).
Theory:
LOGIC GATES: Logic gates are the basic building blocks of any digital system. It is
an electronic circuit having one or more than one input and only one output. The
relationship between the input and the output is based on a certain logic. Based on
this, logic gates are named as AND gate, OR gate, NOT gate etc.
The Digital Logic "AND" Gate
A Logic AND Gate is a type of digital logic gate that has an output which is normally
at logic level "0" and only goes "HIGH" to a logic level "1" when ALL of its inputs
are at logic level "1". The output of a Logic AND Gate only returns "LOW" again
when ANY of its inputs are at a logic level "0". The logic or Boolean expression
given for a logic AND gate is that for Logical Multiplication which is denoted by a
single dot or full stop symbol, (.) giving us the Boolean expression of: A.B = Q.
Page 1
Page 1
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Then we can define the operation of a 2-input logic AND gate as being:
"If both A and B are true, then Q is true"
2-input AND Gate
Symbol Truth Table
B A Q
0 0 0
0 1 0
2-input AND Gate 1 0 0
1 1 1
Boolean Expression Q = A.B Read as A AND B gives Q
Page 2
Page 2
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
A Logic OR Gate or Inclusive-OR gate is a type of digital logic gate that has an
output which is normally at logic level "0" and only goes "HIGH" to a logic level "1"
when ANY of its inputs are at logic level "1". The output of a Logic OR Gate only
returns "LOW" again when ALL of its inputs are at a logic level "0". The logic or
Boolean expression given for a logic OR gate is that for Logical Addition which is
denoted by a plus sign, (+) giving us the Boolean expression of: A+B = Q.
2-input OR Gate
2-input OR Gate 1 0 1
1 1 1
Boolean Expression Q = A+B Read as A OR B gives Q
Page 3
Page 3
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
The digital Logic NOT Gate is the most basic of all the logical gates and is sometimes
referred to as an Inverting Buffer or simply a Digital Inverter. It is a single input
device which has an output level that is normally at logic level "1" and goes "LOW"
to a logic level "0" when its single input is at logic level "1", in other words it
"inverts" (complements) its input signal. The output from a NOT gate only returns
"HIGH" again when its input is at logic level "0" giving us the Boolean expression
of: A = Q.
Then we can define the operation of a single input logic NOT gate as being:
"If A is NOT true, then Q is true"
Then, with an input voltage at "A" HIGH, the output at "Q" will be LOW and an input
voltage at "A" LOW the Resulting output voltage at "Q" is HIGH producing the
complement of the input signal.
Page 4
Page 4
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
UNIVERSAL GATES:
The Logic NAND Gate is a combination of the digital logic AND gate with that of an
inverter or NOT gate connected together in series. The NAND (Not - AND) gate has
an output that is normally at logic level "1" and only goes "LOW" to logic level "0"
when ALL of its inputs are at logic level "1". The Logic NAND Gate is the reverse or
"Complementary" form of the AND gate we have seen previously.
The logic or Boolean expression given for a logic NAND gate is that for Logical
Addition, which is the opposite to the AND gate, and which it performs on the
complements of the inputs. The Boolean expression for a logic NAND gate is denoted
by a single dot or full stop symbol, (.) with a line or Overline, ( ‾‾ ) over the
expression to signify the NOT or logical negation of the NAND gate giving us the
Boolean expression of: A.B = Q. Then we can define the operation of a 2-input logic
NAND gate as being:
Page 5
Page 5
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Page 6
Page 6
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
The Logic NOR Gate or Inclusive-NOR gate is a combination of the digital logic OR
gate with that of an inverter or NOT gate connected together in series. The NOR
(Not - OR) gate has an output that is normally at logic level "1" and only goes "LOW"
to logic level "0" when ANY of its inputs are at logic level "1". The Logic NOR Gate
is the reverse or "Complementary" form of the OR gate we have seen previously.
The logic or Boolean expression given for a logic NOR gate is that for Logical
Multiplication which it performs on the complements of the inputs. The Boolean
expression for a logic NOR gate is denoted by a plus sign, (+) with a line or Over line,
( ‾‾ ) over the expression to signify the NOT or logical negation of the NOR gate
giving us the Boolean expression of: A+B = Q.
Then we can define the operation of a 2-input logic NOR gate as being:
"If both A and B are NOT true, then Q is true"
Page 7
Page 7
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Page 8
Page 8
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
The output of an Exclusive-OR gate ONLY goes "HIGH" when its two input
terminals are at "DIFFERENT" logic levels with respect to each other and they can
both be at logic level "1" or both at logic level "0" giving us the Boolean expression
of: Q = A’B + AB’. The Exclusive-OR Gate function is achieved is achieved by
combining standard gates together to form more complex gate functions. An example
of a 2-input Exclusive-OR gate is given below.
2-input Ex-OR Gate
Page 9
Page 9
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
The output of an Exclusive-NOR gate ONLY goes "HIGH" when its two input
terminals, A and B are at the "SAME" logic level which can be either at a logic level
"1" or at a logic level "0". Then this type of gate gives and output "1" when its inputs
are "logically equal" or "equivalent" to each other, which is why an Exclusive-NOR
gate is sometimes called an Equivalence Gate.
In general, an Exclusive-NOR gate will give an output value of logic "1" ONLY when
there are an EVEN number of 1's on the inputs to the gate (the inverse of the Ex-OR
gate) except when all its inputs are "LOW". Commonly available Exclusive-NOR
gate IC's include:
TTL Logic Types CMOS Logic Types
74LS266 Quad 2-input CD4077 Quad 2-input
Page 10
Page 10
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Procedure:
Result: The truth tables of logic gates: AND, OR, NOT, NAND, NOR Ex-OR and
Ex-NOR are verified using their ICs.
Conclusion: In conclusion, each basic gate works in unique way, which is proved
during this experiment. We used the truth table to examine the operation of the basic
logic gate. It is proved from experiment that logic gates work in basis of Boolean
algebra. AND Gate, OR Gate and NOT Gate are the basic gates. All the
combinational logic gates are made of these three basic gates. Output from one logic
gate can be used as input for another logic gate to form combinational logic gate. So,
we have studied how logic gates work on the basis of Boolean algebra.
Discussion:
Page 11
Page 11
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Experiment No.2
Aim: To verify the truth table of OR, AND, NOR, Ex-OR. Ex-NOR realized using
NAND & NOR gates.
Theory:
Y = (A.A)’
=> Y = (A)’
2. One NAND input pin is connected to the input signal A while all other input pins
are connected to logic 1. The output will be A’.
Page 12
Page 12
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Y = ((A.B)’)’
=> Y = (A.B)
Thus, the NAND gate is a universal gate since it can implement the AND, OR
and NOT functions.
The output of a two input X-OR gate is shown by: Y = A’B + AB’. This can be
achieved with the logic diagram shown.
Page 13
Page 13
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Now the output from gate no. 4 is the overall output of the configuration.
X-NOR gate is actually X-OR gate followed by NOT gate. So give the output of X-
OR gate to a NOT gate, overall output is that of an X-NOR gate.
Y = AB+ A’B’
Page 14
Page 14
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
1. All NOR input pins connect to the input signal A gives an output A’.
Y = (A+A)’
=> Y = (A)’
2. One NOR input pin is connected to the input signal A while all other input pins are
connected to logic 0. The output will be A’.
Y = ((A+B)’)’
=> Y = (A+B)
An AND gate can be replaced by NOR gates as shown in the figure (The AND gate is
replaced by a NOR gate with all its inputs complemented by NOR gate inverters)
Page 15
Page 15
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Thus, the NOR gate is a universal gate since it can implement the AND, OR and
NOT functions.
Now the output from gate no. 4is the overall output of the configuration.
Y = ((A + (A+B)’)’ (B +( A+B)’)’)’
= (A+(A+B)’)’’.(B+(A+B)’)’’
= (A+(A+B)’).(B+(A+B)’)
= (A+A’B’).(B+A’B’)
= (A + A’).(A + B’).(B+A’)(B+B’)
= 1.(A+B’).(B+A’).1
= (A+B’).(B+A’)
= A.(B + A’) +B’.(B+A’)
= AB + AA’ +B’B+B’A’
= AB + 0 + 0 + B’A’
= AB + B’A’
=> Y = AB + A’B’
X-OR gate is actually X-NOR gate followed by NOT gate. So give the output of X-
NOR gate to a NOT gate, overall output is that of an X-OR gate.
Y = A’B+ AB’
Page 16
Page 16
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Procedure:
Test the digital ICs (7400, 7402) with the help of IC tester.
Make the connections on breadboard as per the pin diagram. Connect the
inputs of the logic gate to the logic sources and its output to the logic
indicator.
Apply various input combinations and observe output for each one.
Verify the truth table for each input/ output combination.
Result: The truth tables of logic gates: AND, OR, NOT, NAND, NOR Ex-OR and
Ex-NOR are verified using the universal gate ICs 7400 and IC 7402.
Conclusion: The universal gates are the gates which can implement any Boolean
function without need to use any other gate type. Hence all the gates are realized using
Universal gates. In practice, this is advantageous since NAND and NOR gates are
economical and easier to fabricate and are the mostly used gates in digital logic families.
Discussion:
Page 17
Page 17
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Page 18
Page 18
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Experiment No.3
Theory:
The sum-of-products (SOP) form is a method (or form) of simplifying the Boolean
expressions of logic gates. In this SOP form of Boolean function representation, the
variables are operated by AND (product) to form a product term and all these product
terms are ORed (summed or added) together to get the final function. Here the
product terms are defined by using the AND operation and the sum term is defined by
using OR operation.
SOP form representation is most suitable to use them in FPGA (Field Programmable
Gate Arrays).
Here the sum terms are defined by using the OR operation and the product term is
defined by using AND operation.
Page 19
Page 19
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Page 20
Page 20
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Procedure:
Result: We have implemented the given Boolean function using logic gates in both SOP
and POS forms.
Conclusion: In the experiment, De-Morgan’s theorem and postulate of Boolean
algebra are verified. Also the Sum of products and product of sum expressions are
realized using the basic gates and the universal gates.
Discussion:
Page 21
Page 21
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Experiment No: 4
Aim: To realize half adder/ Subtractor & Full Adder/ Subtractor using NAND &
NOR gates and to verify their truth table.
Theory: A very useful combinational logic circuit which can be constructed using
just a few basic logic gates and adds together binary numbers is the Binary Adder
circuit. The Binary Adder is made up from standard AND and Ex-OR gates and allow
us to "add" together single bit binary numbers, a and b to produce two outputs, the
SUM of the addition and a CARRY. One of the main uses for the Binary Adder is in
arithmetic and counting circuits.
From the truth table we can see that the SUM (S) output is the Result of the Ex-OR
gate and the Carry-out (CARRY) is the Result of the AND gate. One major
disadvantage of the Half Adder circuit when used as a binary adder, is that there is no
provision for a "Carry-in" from the previous circuit when adding together multiple
data bits.
Page 22
Page 22
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
The Full Adder Circuit: The main difference between the Full Adder and the
previous seen Half Adder is that a full adder has three inputs, the same two single bit
binary inputs A and B as before plus an additional Carry-In (C) input as shown
below.
Page 23
Page 23
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
A half-subtractor has two inputs and two outputs. Let the input variables minuend and
subtrahend be designated as X and Y respectively, and output functions be designated
as D for difference and B for borrow. The truth table of the functions is as follows.
Truth Table
Half Subtractor
X Y D B
0 0 0 0
0 1 1 1
1 0 0 1
1 1 0 0
Boolean Expression: DIFF = A ⊕ B BORROW = A’. B
Page 24
Page 24
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Page 25
Page 25
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Procedure:
1. Insert the IC chips into the breadboard. Point all the chips in the same direction
with pin 1 at the upper-left corner. (Pin 1 is often identified by a dot or a notch next
to it on the chip package).
2. Connect +5V and GND pins of each IC chips to the power and ground bus strips
on the breadboard.
3. Make the connections as per the circuit diagram.
4. Switch on VCC and apply various combinations of input according to truth table.
5. Note down the output readings for half/full adder and sum and the carry bit for
different combinations of inputs. Where 5V indicating logic 1 and 0V indicating
logic 0.
Page 26
Page 26
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Result: The truth table for Half adder/Subtractor and Full Adder/Subtractor has been
verified.
Conclusion: By using various logic gate ICs we can design full or half adder and
subtractor. Half adders/subtractors perform their operation on two bits and gives a two bit
output. Full adder/subtractor perform their operation on three bit inputs and gives a two
bit output.
Discussion:
Page 27
Page 27
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Experiment No: 5
Aim: To realize a 4-bit ripple adder/Subtractor using basic half adder/ Subtractor and
basic full adder/ Subtractor.
Apparatus / Component Required: IC tester, Digital trainer kit, Digital ICs (7483,
7486, 7404, 7408, and 7432)
Theory:
Page 28
Page 28
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Page 29
Page 29
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
LOGIC DIAGRAM:
Page 30
Page 30
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Procedure:
1. Test the digital ICs with the help of IC tester.
2. Make the connections as per the circuit diagram.
3. Connect the output pin on LED through Resistor.
4. Switch on VCC and apply various combinations of input according to truth table.
5. Observe the logical output and verify with the truth tables.
Page 31
Page 31
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Result: Thus the 4-bit adder and subtractor using IC 7483 was designed and
implemented.
Conclusion: A four bit ripple carry adder/subtractor can be designed by using four
full adders/subtractors. They can also be designed by using IC 7483 by using
appropriate selection mode (M).
Precautions:
1. All ICs should be checked before starting the experiment.
2. All the connection should be tight.
3. Always connect ground first and then connect Vcc.
Discussions:
Page 32
Page 32
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Experiment No: 6
Aim: To verify the truth table of 4-to-l multiplexer and l-to-4 demultiplexer. Realize the
multiplexer using basic gates only. Also to construct and 8-to-1 multiplexer and l-to-8
demultiplexer using blocks of 4-to-1 multiplexer and 1-to-4 demultiplexer.
Apparatus / Component Required: IC tester, Digital trainer kit, Digital ICs (74153,
74151, 7408, 7432, 7404, 7411, 74155)
Theory:
(a) MULTIPLEXER:
Combinational logic switching devices that operate like a very fast acting multiple
position rotary A data selector, more commonly called a Multiplexer, shortened to
"Mux" or "MPX", are switch. They connect or control, multiple input lines called
"channels" consisting of 2, 4, 8 or 16 individual inputs, one at a time to an output.
Then the job of a multiplexer is to allow multiple signals to share a single common
output.
Multiplexer means transmitting a large number of information units over a smaller
number of channels or lines. A digital multiplexer is a combinational circuit that
selects binary information from one of many input lines and directs it to a single
output line. The selection of a particular input line is controlled by a set of selection
lines. Normally there are 2n input line and n selection lines whose bit combination
determine which input is selected.
TRUTH TABLE:
S1 S0 Y = OUTPUT
0 0 D0
0 1 D1
1 0 D2
1 1 D3
Page 33
Page 33
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
FUNCTION TABLE:
S1 S0 INPUT
0 0 X → D0 = X S1’ S0’
0 1 X → D1 = X S1’ S0
1 0 X → D2 = X S1 S0’
1 1 X → D3 = X S1 S0
Page 34
Page 34
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Page 35
Page 35
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Page 36
Page 36
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Page 37
Page 37
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
(b) DEMULTIPLEXER:
TRUTH TABLE:
OUTPUT
INPUT
S1 S0 I/P D0 D1 D2 D3
0 0 0 0 0 0 0
0 0 1 1 0 0 0
0 1 0 0 0 0 0
0 1 1 0 1 0 0
1 0 0 0 0 0 0
1 0 1 0 0 1 0
1 1 0 0 0 0 0
1 1 1 0 0 0 1
Page 38
Page 38
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Input(Channel A) Output
Ea S0 S1 D0 D1 D2 D3
1 × × 1 1 1 1
0 0 0 0 1 1 1
0 0 1 1 0 1 1
0 1 0 1 1 0 1
0 1 1 1 1 1 0
Page 39
Page 39
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Page 40
Page 40
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Procedure:
Result: Hence the 4:1mux and 1:4 demux is designed with basic gate as given in the
figure and verified with the truth table. 8:1 mux are designed with 4:1mux and 1:8
demux are designed with 1:4 demux as given in circuit.
Conclusion: 4:1 multiplexer and 8:1 multiplexer and 1:4 demultiplexer and 1:8
demultiplexer can be realized using basic logic gates, they can also be designed by using
IC 74153 (multiplexer), IC 74155 (demultiplexer) and IC 74151 (multiplexer).
Precautions:
Discussions:
8.
Page 41
Page 41
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Experiment No: 7
Aim: Design and realize a combinational circuit that will accept the 2421 BCD code
and drive a TIL-312 to 7-Segment Display
Apparatus / Component Required: IC tester, Digital trainer kit, Digital ICs (7447),
register (200 Ω / 330 Ω), seven segment display
Theory:
The Binary Coded Decimal (BCD) to 7-Segment Display Decoder. 7-segment LED
(Light Emitting Diode) or LCD (Liquid Crystal) displays, provide a very convenient
way of displaying information or digital data in the form of numbers, letters or even
alpha-numerical characters and they consist of 7 individual LED's (the segments),
within from 0 to 9 and A to F respectively, on the display the correct combination of
LED segments need to be illuminated and BCD to 7-segment Display Decoders such
as the 74LS47 do just that. A standard 7-segment LED display generally has 8 input
connections, one for each LED segment and one that acts as a common terminal or
connection for all the internal segments.
Page 42
Page 42
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
It can be seen that to display any single digit number from 0 to 9 or letter from A to F,
we would need 7 separate segment connections plus one additional connection for the
LED's "common" connection. Also as the segments are basically a standard light
emitting diode, the driving circuit would need to produce up to 20mA of current to
illuminate each individual segment and to display the number 8, all 7 segments would
need to be lit resulting a total current of nearly 140mA, (8 x 20mA). Obviously, the
use of so many connections and power consumption is impractical for some electronic
or microprocessor based circuits and so in order to reduce the number of signal lines
required to drive just one single display, display decoders such as the BCD to 7-
Segment Display Decoder and Driver IC's are used instead.
Combinational circuit for converting 2421 BCD code to seven segment number
Both the 2421 code and BCD code are 4-bit codes and represent the decimal
equivalents 0 to 9. To design the converter circuit for the above, first the truth table is
prepared with the input variables W, X, Y, and Z of 2421 code, and the output
variables A, B, C, and D. Karnaugh maps to obtain the simplified expressions of the
output functions are shown in Figure. Unused combinations are considered as don’t-
care condition.
Page 43
Page 43
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
a = F1 (A, B, C, D) = ∑m (0, 2, 3, 5, 7, 8, 9)
b = F2 (A, B, C, D) = ∑m (0, 1, 2, 3, 4, 7, 8, 9)
c = F3 (A, B, C, D) = ∑m (0, 1, 3, 4, 5, 6, 7, 8, 9)
d = F4 (A, B, C, D) = ∑m (0, 2, 3, 5, 6, 8)
e = F5 (A, B, C, D) = ∑m (0, 2, 6, 8)
f = F6 (A, B, C, D) = ∑m (0, 4, 5, 6, 8, 9)
g = F7 (A, B, C, D) = ∑m (2, 3, 4, 5, 6, 8, 9)
Page 44
Page 44
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Page 45
Page 45
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Procedure:
1. Test the digital ICs with the help of IC tester.
2. Make the connections as per the circuit diagram on the digital trainer kit.
3. Connect the output pins to the seven segment pins.
4. Switch on VCC and apply various combinations of input according to the truth
table.
5. Observe the logical output and verify with the truth tables.
A binary coded decimal (BCD) to 7-segment display decoder such as the TTL
74LS47 or 74LS48, have 4 BCD inputs and 7 output lines, one for each LED
segment. This allows a smaller 4-bit binary number (half a byte) to be used to display
all the denary numbers from 0 to 9 and by adding two displays together, a full range
of numbers from 00 to 99 can be displayed with just a single byte of 8 data bits.
The use of packed BCD allows two BCD digits to be stored within a single byte (8-
bits) of data, allowing a single data byte to hold a BCD number in the range of 00 to
99.
Page 46
Page 46
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Result: Hence the BCD to seven segment display is designed using basic gates and
with a BCD to seven segment display IC as given in the figure and verified with the
truth table.
Page 47
Page 47
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
a BCD decoder. However, this method will allow displaying only digits from 0 to 9.
In the case of the decoder circuit, any binary number between 1010 through 1111 (A
to F) is an invalid input and would provide distorted shapes on the LCD display. The
usage of a 7-segment display paired with a BCD decoder is opening the door for an
application using digital computation requiring a human-readable that application can
be for instance: “a clock, a timer, a calculator, counter…” Thus we had concluded that
7 segment display can be implemented using IC, s and we had seen different numbers
0-9.
Precautions:
• All connections should be made neat and tight.
• Digital Lab kits and ICs should be handled with utmost care.
• While making connections main voltage should be kept switched off.
Discussions
Page 48
Page 48
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Experiment No: 8
Aim: Using basic logic gates realize the R-S, J-K and D flip flops with and without
clock pulse and verify truth table.
Theory:
Sequential Logic circuits have some form of inherent "Memory" built in to them as
they are able to take into account their previous input state as well as those actually
present, a sort of "before" and "after" is involved with sequential circuits.
In other words, the output state of a sequential logic circuit is a function of the
following three states, the "present input", the "past input" and/or the "past output".
Sequential Logic circuits remember these conditions and stay fixed in their current
state until the next clock signal changes one of the states, giving sequential logic
circuits "Memory".
Sequential logic circuits are generally termed as two state or Bistable devices which
can have their output or outputs set in one of two basic states, a logic level "1" or a
logic level "0" and will remain "latched" (hence the name latch) indefinitely in this
current state or condition until some other input trigger pulse or signal is applied
which will cause the bistable to change its state once again.
The word "Sequential" means that things happen in a "sequence", one after another
and in Sequential Logic circuits, the actual clock signal determines when things will
Page 49
Page 49
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
happen next. Simple sequential logic circuits can be constructed from standard
Bistable circuits such as Flip-flops, Latches and Counters and which themselves can
be made by simply connecting together universal NAND Gates and/or NOR Gates in
a particular combinational way to produce the required sequential circuit.
FLIP-FLOP:-
"Flip-flop" is the common name given to two-state devices which offer basic memory
for sequential logic operations. Flip-flops are heavily used for digital data storage and
transfer and are commonly used in banks called "register" for the storage of binary
numerical data.
S-R Flip Flop
The SR flip-flop can be considered as a 1-bit memory, since it stores the input pulse
even after it has passed. Flip-flops (or bi-stables) of different types can be made from
logic gates and, as with other combinations of logic gates, the NAND and NOR gates
are the most versatile, the NAND being most widely used. This is because, as well as
being universal, i.e. it can be made to mimic any of the other standard logic functions,
it is also cheaper to construct. The SET-RESET flip flop is designed with the help of
two NOR gates and also two NAND gates. These flip flops are also called S-R Latch.
The design of such a flip flop includes two inputs, called the SET [S] and RESET [R].
There are also two outputs, Q and Q’. The diagram and truth table is shown below.
Page 50
Page 50
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
The circuit of the S-R flip flop using NAND Gate and its truth table is shown below.
Page 51
Page 51
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
D Flip Flop
D flip flop is actually a slight modification of the above explained clocked SR flip-
flop. From the figure you can see that the D input is connected to the S input and the
complement of the D input is connected to the R input.
D Flip Flop without clock
The circuit diagram of D latch with NAND gates:
Page 52
Page 52
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
IC 7474 (D FF)
Page 53
Page 53
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
JK flip-flop is basically an SR flip flop with feedback which enables only one of its
two input terminals, either SET or RESET to be active at any one time thereby
eliminating the invalid condition seen previously in the SR flip flop circuit. The only
difference is that the intermediate state is more refined and precise than that of an S-R
flip flop.
JK Flip Flop without clock
JK latch is similar to RS latch. This latch consists of 2 inputs J and K as shown in the
below figure 6. The ambiguous state has been eliminated here: when the inputs of J-K
latch are high, then output toggles. The output feedback to inputs is the only
difference, which is not there in the RS latch.
When both the inputs J and K have a HIGH state, the flip-flop switches to the
complement state. So, for a value of Q = 1, it switches to Q=0 and for a value of Q =
0, it switches to Q=1.
Page 54
Page 54
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
letter K is for clear). When logic 1 inputs are applied to both J and K
simultaneously, the flip-flop switches to its complement state, ie., if Q=1, it
switches to Q=0 and vice versa
The circuit diagram and truth-table of a J-K flip flop is shown below.
The output may be repeated in transitions once they have been complimented for
J=K=1 because of the feedback connection in the JK flip-flop. This can be avoided by
setting a time duration lesser than the propagation delay through the flip-flop. The
restriction on the pulse width can be eliminated with a master-slave or edge-triggered
construction.
IC 7476 (JK FF)
Procedure:
Page 55
Page 55
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Observations:
Result: Hence the S-R, J-K, D flip flops with and without clocks are designed with
basic gates IC and verified with the truth table.
Conclusion:
Precautions:
Discussions:
Page 56
Page 56
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Experiment No: 9
Page 57
Page 57
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Page 58
Page 58
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Since the Q output of the first flip flop changes every time the clock input goes low, it
effectively divides the input frequency by 2. The other output of the flip flop
becomes the clock input to the next stage, so the output of the second flip flop divides
the original input frequency by 4. Hence the term "divide-by-4" or "modulo-4".
We can chain as many ripple counters together as we like. A three bit ripple counter
will count 23=8 numbers, and an n-bit ripple counter will count 2n numbers.
The problem with ripple counters is that each new stage put on the counter adds a
delay. This propagation delay is seen when we look at a less idealized timing
diagram:
Page 59
Page 59
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Page 60
Page 60
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Ring Counter
A ring counter is a Shift Register (a cascade connection of flip-flops) with the output
of the last flip flop connected to the input of the first. It is initialized such that only
one of the flip flop output is 1 while the remainder is 0. The 1 bit is circulated so the
state repeats every n clock cycles if n flip-flops are used. The "MOD" or
"MODULUS" of a counter is the number of unique states. The MOD of the n flip flop
ring counter is n.
The following is a 4-bit ring counter constructed from D flip-flops. The output of
each stage is shifted into the next stage on the positive edge of a clock pulse. If the
CLEAR signal is high, all the flip-flops except the first one FF0 are reset to 0. FF0 is
preset to 1 instead.
Since the count sequence has 4 distinct states, the counter can be considered as a mod-
4 counter. Only 4 of the maximum 16 states are used, making ring counters very
inefficient in terms of state usage. But the major advantage of a ring counter over a
binary counter is that it is self-decoding. No extra decoding circuit is needed to
determine what state the counter is in.
Page 61
Page 61
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Procedure:
1. Make the connections as per the circuit diagram.
2. Connect the output pin on LED through Resistor.
3. Switch on VCC and apply various combinations of input according to truth table.
4. Observe the logical output and verify with the truth tables.
Result: counters are designed with the help of trainer kit and verified with the truth
table.
Precautions:
Discussions:
1. What is the difference between synchronous and asynchronous counter?
2. What is up and down counter?
3. How many flip flops are required for designing the decade counter.
4. How the synchronous counters eliminate the delay problems encountered in
asynchronous counters.
5. Design Mod 5 counter in synchronous mode.
Page 62
Page 62
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Experiment No: 10
Aim: Perform input/output operations on parallel in/parallel out and Serial in/Serial out
registers using clock. Also exercise loading only one of multiple values into the register using
multiplexer.
Apparatus / Component Required: IC tester, Digital trainer kit, Digital ICs 7474
Theory:
The register in figure shifts its contents with every clock pulse during the positive
edge of the pulse transition. If we want to control the shift so that it occurs only with
certain pulses but not with others, we must control CLK input of the register.
Page 63
Page 63
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Shift registers can be used for converting serial data to parallel, and vice versa. If we
have access to all the flip-flop outputs of a shift register, then information entered
serially by shifting can be taken out in parallel from the outputs of the flip-flops. If a
parallel-load capability is added to a shift register, then data entered in parallel can be
taken out in serial fashion by shifting the data stored in the register.
The operation of the serial-in Serial-out shift register can be easily explained.
Consider the circuit shown. On each clock edge (rising in this case) we can say the
following about the outputs of each stage of the register (i.e. each D-type flip-flop in
the register):
Page 64
Page 64
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Waveforms
Truth Table
Page 65
Page 65
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Clock Pulse No QA QB QC QD
0 0 0 0 0
1 1 0 0 0
2 0 1 0 0
3 0 0 1 0
4 0 0 0 1
5 0 0 0 0
The Parallel-in to Serial-out shift register acts in the opposite way to the serial-in to
parallel-out one above. The data is loaded into the register in a parallel format i.e. all
the data bits enter their inputs simultaneously, to the parallel input pins P A to PD of the
register. The data is then read out sequentially in the normal shift-right mode from the
register at Q representing the data present at P A to PD. This data is outputted one bit at
a time on each clock cycle in a serial format. It is important to note that with this
system a clock pulse is not required to parallel load the register as it is already
present, but four clock pulses are required to unload the data.
Truth Table
CLK Q3 Q2 Q1 Q0 O/P
0 1 0 0 1 1
1 0 0 0 0 0
2 0 0 0 0 0
3 0 0 0 0 1
As this type of shift register converts parallel data, such as an 8-bit data word into
serial format, it can be used to multiplex many different input lines into a single serial
DATA stream which can be sent directly to a computer or transmitted over a
communications line.
Page 66
Page 66
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
The final mode of operation is the Parallel-in to Parallel-out Shift Register. This type
of register also acts as a temporary storage device or as a time delay device similar to
the SISO configuration above. The data is presented in a parallel format to the parallel
input pins PA to PD and then transferred together directly to their respective output
pins QA to QA by the same clock pulse. Then one clock pulse loads and unloads the
register. This arrangement for parallel loading and unloading is shown below.
TRUTH TABLE:
1 1 0 0 1 1 0 0 1
2 1 0 1 0 1 0 1 0
Page 67
Page 67
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Page 68
Page 68
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
PISO
Page 69
Page 69
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
PROCEDURE:
Result: Thus the Serial in serial out, Serial in parallel out, Parallel in serial out and
Parallel in parallel out shift registers were implemented using IC 7495.
Conclusion: Shift registers using IC 7495 in all its modes i.e.SIPO/SISO, PISO/PIPO
are verified by their truth table. When the value of output voltage is greater than 2.4V
then it will be represented by logic 1 and if output voltage is less than 0.4 volt it will
be represented by logic 0.
Page 70
Page 70
SWAMI KESHVANAND INSTITUTE OF TECHNOLOGY
MANAGEMENT & GRAMOTHAN
Precautions:
Discussions:
Page 71
Page 71