BE03003031 FDE Practical Manual
BE03003031 FDE Practical Manual
B.E. Semester 3
(Biomedical Engineering)
Certificate
Code: ) has satisfactorily completed the Practical / Tutorial work for the subject
Place: __________
Date: __________
Preface
Main motto of any laboratory/practical/field work is for enhancing required skills as well as
creating ability amongst students to solve real time problem by developing relevant
competencies in psychomotor domain. By keeping in view, GTU has designed competency
focused outcome-based curriculum for engineering degree programs where sufficient
weightage is given to practical work. It shows importance of enhancement of skills amongst
the students and it pays attention to utilize every second of time allotted for practical amongst
students, instructors and faculty members to achieve relevant outcomes by performing the
experiments rather than having merely study type experiments. It is must for effective
implementation of competency focused outcome-based curriculum that every practical is
keenly designed to serve as a tool to develop and enhance relevant competency required by
the various industry among every student. These psychomotor skills are very difficult to
develop through traditional chalk and board content delivery method in the classroom.
Accordingly, this lab manual is designed to focus on the industry defined relevant outcomes,
rather than old practice of conducting practical to prove concept and theory.
By using this lab manual students can go through the relevant theory and procedure in
advance before the actual performance which creates an interest and students can have basic
idea prior to performance. This in turn enhances pre-determined outcomes amongst students.
Each experiment in this manual begins with competency, industry relevant skills, course
outcomes as well as practical outcomes (objectives). The students will also achieve safety
and necessary precautions to be taken while performing practical.
This manual also provides guidelines to faculty members to facilitate student centric lab
activities through each experiment by arranging and managing necessary resources in order
that the students follow the procedures with required safety and necessary precautions to
achieve the outcomes. It also gives an idea that how students will be assessed by providing
rubrics.
Fundamental of Digital Electronics course will enable the students to learn about
fundamentals and design concepts of digital circuits such as Logic operation of Gates and its
realizations for different logic families, Representations form of Boolean algebra and its
different method of minimization. It is also included design concepts of various
combinational circuits using Programmable logic devices and sequential circuits with its
state representation.
Utmost care has been taken while preparing this lab manual however always there is chances
of improvement. Therefore, we welcome constructive suggestions for improvement and
removal of errors if any.
Fundamentals of Digital Electronics (BE03003031)
Disclaimer: This lab manual includes information and content sourced from various books
and websites. The authors of these books/websites are acknowledged and credited within
the relevant sections of the manual. While every effort has been made to accurately
represent their ideas and theories, any errors are unintentional. The inclusion of these
sources does not imply endorsement or affiliation with the authors or their publishers. This
Laboratory manual is only for free education purpose without any commercial use.
1. Understand and evaluate various Number System and binary codes with their
arithmetic operations in digital design.
2. Understand the fundamental logic operations of gates and their various
implementations, the principles of Boolean Algebra, and various techniques
for minimizing switching functions.
3. Design and understand the construction and operation of various
combinational circuits and their applications, as well as utilizing
programmable logic devices such as PAL, PLA, and PROM.
4. Understand and design various sequential logic circuits, including their
operations, types of flip-flops, and applications.
5. Understand and design various types of registers and counters, including their
functions.
Sr. CO CO CO CO CO
Objective(s) of Experiment
No. 1 2 3 4 5
1. Knowledge and Understanding: This rubric assesses the student's ability to understand
and apply theoretical concepts related to the practical.
2. Programming skills: This rubric evaluates the student's ability to write a code and perform
practical tasks accurately and effectively.
4. Problem solving: This rubric evaluates the student's ability to solve/answer given quiz
correctly.
5. Time Management: This rubric evaluates the student's ability to manage their time
effectively during the practical, including setting priorities and meeting deadlines.
Fundamentals of Digital Electronics (BE03003031)
Index
(Progressive Assessment Sheet)
Practical No: 0
Institute Vision
Vision
➢ To play a pivotal role in promoting human health through the best of current
and future technologies from the field of engineering and medical science to bridge the
gap between medicine and engineering.
Mission
1. To serve the fundamental principles of engineering to human health care and well-
being for medical industries, health care providers, governmental agencies, and
academic entities.
2. To create a linkage between content generation, research in critical areas and imparting
education for integrating our knowledge with the advancements in Hospitals and
Industries.
Fundamentals of Digital Electronics (BE03003031)
3. To obtain and maintain the competitive edge in the hospitals and industries, for
identification and nurturing of talent and learning in academic entities
2. Problem analysis: Identify, formulate, review research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of mathematics,
natural sciences, and engineering sciences.
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools including prediction and modeling to complex engineering activities
with an understanding of the limitations.
6. The engineer and society: Apply reasoning informed by the contextual knowledge to assess
societal, health, safety, legal and cultural issues and the consequent responsibilities relevant to
the professional engineering practice.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
9. Individual and team work: Function effectively as an individual, and as a member or leader
in diverse teams, and in multidisciplinary settings.
11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member and
leader in a team, to manage projects and in multidisciplinary environments.
12. Life-long learning: Recognize the need for, and have the preparation and ability to engage
in independent and life-long learning in the broadest context of technological change.
PRACTICAL NO : 1
Date:
AIM: To study & implement the logic operation of AND, OR & NOT gates
and their TTL and CMOS realization.
Objectives: -
1. To understand the logic operation of Basic Gates.
2. To design AND, OR and NOT gate logic operations using TTL and CMOS
realizations.
3. To implement logic operations of Basic gates using Gate ICs.
Theory: -
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.
NOT Gate
The NOT gate is a digital logic gate with one input and one output that operates an inverter
operation of the input.The output of the NOT gate is the reverse of the input. When the input
of the NOT gate is true then the output will be false and vice versa. The symbol and truth table
of a NOT gate with one input is shown below in Fig.1.
In transistor NOT gate as shown in Fig.2. the input to the gate may be 0V or +5V. When A =
0V, the transistor T is OFF. As no current flows through R, no voltage drop occurs across R.
Hence, the output voltage A' =+5V. When the input X=+5V, T is ON and the output voltage
A' = Vce(sat) = 0V. The truth table for the NOT gate circuit is as shown below.
1
Fundamentals of Digital Electronics (BE03003031)
NMOS
NMOS is built on a p-type substrate with n-type source and drain diffused on it. In NMOS, the
majority carriers are electrons. When a high voltage is applied to the gate, the NMOS will
conduct. Similarly, when a low voltage is applied to the gate, NMOS will not conduct. NMOS
2
Fundamentals of Digital Electronics (BE03003031)
are considered to be faster than PMOS, since the carriers in NMOS, which are electrons, travel
twice as fast as the holes.
Fig.4. NMOS
PMOS
P- channel MOSFET consists P-type Source and Drain diffused on an N-type substrate.
Majority carriers are holes. When a high voltage is applied to the gate, the PMOS will not
conduct. When a low voltage is applied to the gate, the PMOS will conduct. The PMOS devices
are more immune to noise than NMOS devices.
Fig.5. PMOS
In CMOS technology, both N-type and P-type transistors are used to design logic functions.
The same signal which turns ON a transistor of one type is used to turn OFF a transistor of the
other type. This characteristic allows the design of logic devices using only simple switches,
without the need for a pull-up resistor.
In CMOS logic gates a collection of n-type MOSFETs is arranged in a pull-down
network between the output and the low voltage power supply rail (Vss or quite often ground).
Instead of the load resistor of NMOS logic gates, CMOS logic gates have a collection of p-
type MOSFETs in a pull-up network between the output and the higher-voltage rail (often
named Vdd).
Thus, if both a p-type and n-type transistor have their gates connected to the same input,
the p-type MOSFET will be ON when the n-type MOSFET is OFF, and vice-versa. The
networks are arranged such that one is ON and the other OFF for any input pattern as shown
in the figure below.
3
Fundamentals of Digital Electronics (BE03003031)
Fig. 6. CMOS
The inverter circuit as shown in the Fig. 7 below. It consists of PMOS and NMOS FET. The
input A serves as the gate voltage for both transistors.
4
Fundamentals of Digital Electronics (BE03003031)
AND Gate
The AND gate is a digital logic gate with ‘n’ i/ps one o/p, which perform logical conjunction
based on the combinations of its inputs.The output of this gate is true only when all the inputs
are true. When one or more inputs of the AND gate’s i/ps are false, then only the output of the
AND gate is false. The symbol and truth table of an AND gate with two inputs is as shown
below in Fig.8..
In the transistor AND gate as shown in Fig.9, when X=0V and Y=0V or when X=0V
and Y=+5V or when X=+5V and Y=+0V, both the transistors T1 and T2 are OFF. Transistor
T3 gets enough base drive from the supply through R3 and so, T3 will be ON. Hence, the
Table: 2 Truth table output voltage Z= Vce(sat) =0V. When both X
Inputs Outputs and Y are equal to +5V, both the transistors T1
X Y Z and T2 will be ON and, therefore, the voltage at
0V 0V 0V the collector of transistors T1 will drop. So, T3
0V 5V 0V does not get enough base drive and, therefore,
5V 0V 0V remains OFF. Hence no current flows through the
5V 5V 5V collector resistor of T3 and, therefore, no voltage
drop occurs across it. Hence output voltage,
X=5V. The truth table for the above gate circuits is as shown below.
5
Fundamentals of Digital Electronics (BE03003031)
CMOS realization of two input AND gate as show in Fig.10. If either input A or B is logic 0,
at least one of the NMOS transistors will be OFF, breaking the path from C to Ground. But at
least one of the pMOS transistors will be ON, creating a path from C to VDD. Hence, the
output C will be high.When a high voltage (~ Vdd) is given at input terminal (C) of the inverter,
the PMOS becomes open circuit and NMOS switched On so the output will be pulled down to
Vss (Low logic 0= 0V).
If both inputs are high, both of the NMOS transistors will be ON and both of the pMOS
transistors will be OFF. Hence, the output will be logic low. When a low-level voltage (<Vdd,
0V) applied to the inverter input terminal (C), the NMOS switched OFF and PMOS switched
ON. So the output becomes Vdd or the circuit is pulled up to Vdd (High logic 1=5V).
6
Fundamentals of Digital Electronics (BE03003031)
OR Gate
The OR gate is a digital logic gate with ‘n’ i/ps and one o/p, that performs a logical conjunction
based on the combinations of its inputs.The output of the OR gate is true only when one or
more inputs are true. If all the i/ps of the gate are false, then only the output of the OR gate is
false. The symbol and truth table of an OR gate with two inputs is shown belowin Fig.11.
In transistor OR gate as shown in Fig.12, when X=0V and Y=0V, both the transistors
T1 and T2 are OFF. Transistors T3 gets enough base drive from +5V through R3 and, therefore,
it will be ON. The output voltage, Z =Vce(sat)=0V. When either X=+5V or Y=+5V or when
both X and Y are equal to +5V, the corresponding transistor T1 or T2 is ON or both T1 and
T2 will be ON and, therefore, the voltage at the collector of T1 is = Vce(sat)=0V. This cannot
forward bias the base emitter junction of T3 and, therefore, it will remain OFF. Hence, the
output voltage will be Z=5V. The truth table for the above gate circuits is as shown below.
7
Fundamentals of Digital Electronics (BE03003031)
7432 OR Gate:
8
Fundamentals of Digital Electronics (BE03003031)
9
Fundamentals of Digital Electronics (BE03003031)
PROCEDURE:
10
Fundamentals of Digital Electronics (BE03003031)
OBSERVATION TABLE:
AND GATE
Input A Input B I/P A I/P B Output O/P
(Logic) (Logic) Volt(V) Volt(V) A.B(Logic) Volt(V)
R=
0(L) 0(L) 0(L)
0(L) 1(H) 0(L)
1(H) 0(L) 0(L)
1(H) 1(H) 1(H)
OR GATE
Input A Input B I/P A I/P B Output O/P
(Logic) (Logic) Volt(V) Volt(V) A+B(Logic) Volt(V)
R=
0(L) 0(L) 0(L)
0(L) 1(H) 1(H)
1(H) 0(L) 1(H)
1(H) 1(H) 1(H)
11
Fundamentals of Digital Electronics (BE03003031)
OBSERVATION TABLE:
Using Gate Ics.
NOT GATE
INPUT I/P VOLT(V) OUTPUT A' O/P
(logic) (logic) VOLT(V)
A
0(L) 1(H)
1(H) 0(L)
AND GATE
Input A Input B I/P A I/P B Output O/P Volt(V)
(Logic) (Logic) Volt(V) Volt(V) A.B(Logic)
0(L) 0(L) 0(L)
0(L) 1(H) 0(L)
1(H) 0(L) 0(L)
1(H) 1(H) 1(H)
OR GATE
Input A Input B I/P A I/P B Output O/P Volt(V)
(Logic) (Logic) Volt(V) Volt(V) A.B(Logic)
0(L) 0(L) 0(L)
0(L) 1(H) 1(H)
1(H) 0(L) 1(H)
1(H) 1(H) 1(H)
12
Fundamentals of Digital Electronics (BE03003031)
Conclusion:
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
Suggested References:
Reference Books:
1. A. Anand Kumar, '' Fundamentals of Digital Electronics'', PHI Learning Publications.
2. M. Morris Mano, " Digital Logic and Computer Design", Pearson Education India.
3. R. P. Jain, "Modern Digital Electronics", Tata McGraw-Hill Education.
4. Anil K. Maini, "Digital Electronics: Principles and Integrated Circuits", Wiley.
5. Malvino& Leach, "Digital Principles and Applications", McGraw-Hill Education.
Reference Websites:
6. https://www.tutorialspoint.com/computer_logical_organization/logic_gates.htm
7. https://www.electronics-tutorials.ws/logic/logic_4.html
8. https://www.javatpoint.com/logic-gates
9. http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/index.html
References used by the students:
Rubrics 1 2 3 4 5 Total
Marks
Faculty Sign:
13
Fundamentals of Digital Electronics (BE03003031)
PRACTICAL NO : 2
Date:
AIM: To study & implement the logic operation of Universal gates and
their realization using AOI logic.
Objectives: -
1. To understand the logic operation of Universal Gates.
2. To implement logic operations of Universal gates using AOI Gate ICs.
3. To verify the truth tables of Universal gates using breadboard and/or
Digital Lab kits.
Theory
A universal gate is a gate which can implement any Boolean function without need to use
any other gate type. The NAND and NOR gates are universal gates. In practice, this is
advantageous since NAND and NOR gates are economical and easier to fabricate and are
the basic gates used in all IC digital logic families.
NAND Gate
The NAND gate is a digital logic gate with ‘n’ i/ps and one o/p, that performs the operation
of the AND gate followed by the operation of the NOT gate.NAND gate is designed by
combining the AND and NOT gates. If the input of the NAND gate high, then the output of
the gate will be low. The symbol and truth table of the NAND gate with two inputs is shown
below Fig.1.
14
Fundamentals of Digital Electronics (BE03003031)
NOR Gate
The NOR gate is a digital logic gate with n inputs and one output, that performs the operation
of the OR gate followed by the NOT gate. NOR gate is designed by combining the OR and
NOT gate. When any one of the i/ps of the NOR gate is true, then the output of the NOR gate
will be false. The symbol and truth table of the NOR gate with truth table is shown below Fig.4.
15
Fundamentals of Digital Electronics (BE03003031)
16
Fundamentals of Digital Electronics (BE03003031)
CIRCUIT DIAGRAM:
17
Fundamentals of Digital Electronics (BE03003031)
PROCEDURE:
18
Fundamentals of Digital Electronics (BE03003031)
OBSERVATION TABLE:
NAND GATE
Input A Input B I/P A I/P B Output O/P
(Logic) (Logic) Volt(V) Volt(V) A.B(Logic) Volt(V)
0(L) 0(L) 1(H)
0(L) 1(H) 1(H)
1(H) 0(L) 1(H)
1(H) 1(H) 0(L)
NOR GATE
Input A Input B I/P A I/P B Output O/P
(Logic) (Logic) Volt(V) Volt(V) A.B(Logic) Volt(V)
0(L) 0(L) 1(H)
0(L) 1(H) 0(L)
1(H) 0(L) 0(L)
1(H) 1(H) 0(L)
19
Fundamentals of Digital Electronics (BE03003031)
Conclusion:
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
Suggested References:
Reference Books:
• A. Anand Kumar, '' Fundamentals of Digital Electronics'', PHI Learning Publications.
• M. Morris Mano, " Digital Logic and Computer Design", Pearson Education India.
• R. P. Jain, "Modern Digital Electronics", Tata McGraw-Hill Education.
• Anil K. Maini, "Digital Electronics: Principles and Integrated Circuits", Wiley.
• Malvino& Leach, "Digital Principles and Applications", McGraw-Hill Education.
Reference Websites:
• https://www.tutorialspoint.com/computer_logical_organization/logic_gates.htm
• https://www.electronics-tutorials.ws/logic/logic_4.html
• https://www.javatpoint.com/logic-gates
• http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/index.html
References used by the students:
Rubrics 1 2 3 4 5 Total
Marks
Faculty Sign:
20
Fundamentals of Digital Electronics (BE03003031)
PRACTICAL NO : 3
Date:
Objectives: -
1. To understand the logic operation of EX-OR & EX-NOR Gates.
2. To verify the truth tables of EX-OR & EX-NOR using breadboard and/or Digital
Lab kits.
Theory
EX-OR Gate
An XOR gate (sometimes referred to by its extended name, Exclusive OR gate) is a digital
logic gate with two or more inputs and one output that performs exclusive disjunction. The
output of an XOR gate is true only when exactly one of its inputs is true. If both of an XOR
gate's inputs are false, or if both of its inputs are true, then the output of the XOR gate is false.
If an XOR gate has more than two inputs, then its behavior depends on its implementation.
In the vast majority of cases, an XOR gate will output true if an odd number of its inputs
is true. However, it's important to note that this behavior differs from the strict definition of
exclusive or, which insists that exactly one input must be true for the output to be true.
Symbol: Each of the symbols below can be used to represent an XOR gate. There are multiple
international standards defined, and one may preferred over the other in your region of the
world.
There is a way to represent the Exclusive-OR function in terms of OR and AND, AB’ + A’B.
21
Fundamentals of Digital Electronics (BE03003031)
Fig:2. EX-OR Gate using NAND logic. Fig:3. EX-OR Gate using NOR logic.
XNOR gate is a special type of gate. It can be used in the half adder, full adder and subtractor.
The exclusive-NOR gate is abbreviated as EX-NOR gate or sometime as X-NOR gate. It has
n input (n >= 2) and one output. So, when both the inputs are same, then output of Ex-NOR
gate is one. When both the inputs are same, then output of Ex-NOR gate is zero.
22
Fundamentals of Digital Electronics (BE03003031)
Fig:5. EX-NOR Gate using NOR logic. Fig:6. EX-NOR Gate using NAND logic.
23
Fundamentals of Digital Electronics (BE03003031)
CIRCUIT DIAGRAM:
24
Fundamentals of Digital Electronics (BE03003031)
PROCEDURE:
25
Fundamentals of Digital Electronics (BE03003031)
OBSERVATION TABLE:
EX-OR GATE
Input A Input B I/P A I/P B Output O/P
(Logic) (Logic) Volt(V) Volt(V) A.B(Logic) Volt(V)
0(L) 0(L) 0(L)
0(L) 1(H) 1(H)
1(H) 0(L) 1(H)
1(H) 1(H) 0(L)
EX-NOR GATE
Input A Input B I/P A I/P B Output O/P
(Logic) (Logic) Volt(V) Volt(V) A.B(Logic) Volt(V)
0(L) 0(L) 1(H)
0(L) 1(H) 0(L)
1(H) 0(L) 0(L)
1(H) 1(H) 1(H)
26
Fundamentals of Digital Electronics (BE03003031)
Conclusion:
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
Suggested References:
Reference Books:
• A. Anand Kumar, '' Fundamentals of Digital Electronics'', PHI Learning Publications.
• M. Morris Mano, " Digital Logic and Computer Design", Pearson Education India.
• R. P. Jain, "Modern Digital Electronics", Tata McGraw-Hill Education.
• Anil K. Maini, "Digital Electronics: Principles and Integrated Circuits", Wiley.
• Malvino& Leach, "Digital Principles and Applications", McGraw-Hill Education.
Reference Websites:
• https://www.tutorialspoint.com/computer_logical_organization/logic_gates.htm
• https://www.electronics-tutorials.ws/logic/logic_4.html
• https://www.javatpoint.com/logic-gates
• http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/index.html
References used by the students:
Rubrics 1 2 3 4 5 Total
Marks
Faculty Sign:
27
Fundamentals of Digital Electronics (BE03003031)
PRACTICAL NO : 4
Date:
De Morgan has suggested two theorems which are extremely useful in Boolean Algebra.
The two theorems are discussed below.
Theorem 1
• The left-hand side (LHS) of this theorem represents a NAND gate with inputs A and B,
whereas the right-hand side (RHS) of the theorem represents an OR gate with inverted
inputs.
• This OR gate is called as Bubbled OR.
28
Fundamentals of Digital Electronics (BE03003031)
Theorem 2
• The LHS of this theorem represents a NOR gate with inputs A and B, whereas the RHS
represents an AND gate with inverted inputs.
• This AND gate is called as Bubbled AND.
Here the left side of the equation represents the output Y. So we can state equation
29
Fundamentals of Digital Electronics (BE03003031)
no. 1
The output will be high (1) if A = 1 or BC = 1 or both are 1. The truth table for this equation
is shown by Table (a). The number of rows in the truth table is 2n where n is the number of
input variables (n=3 for the given equation). Hence there are 23 = 8 possible input
combination of inputs.
30
Fundamentals of Digital Electronics (BE03003031)
CIRCUIT DIAGRAM:
31
Fundamentals of Digital Electronics (BE03003031)
PROCEDURE:
32
Fundamentals of Digital Electronics (BE03003031)
OBSERVATION TABLE:
33
Fundamentals of Digital Electronics (BE03003031)
Conclusion:
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
Suggested References:
Reference Books:
• A. Anand Kumar, '' Fundamentals of Digital Electronics'', PHI Learning Publications.
• M. Morris Mano, " Digital Logic and Computer Design", Pearson Education India.
• R. P. Jain, "Modern Digital Electronics", Tata McGraw-Hill Education.
• Anil K. Maini, "Digital Electronics: Principles and Integrated Circuits", Wiley.
• Malvino& Leach, "Digital Principles and Applications", McGraw-Hill Education.
Reference Websites:
• https://www.tutorialspoint.com/computer_logical_organization/logic_gates.htm
• https://www.electronics-tutorials.ws/logic/logic_4.html
• https://www.javatpoint.com/logic-gates
• http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/index.html
References used by the students:
Rubrics 1 2 3 4 5 Total
Marks
Faculty Sign:
34
Fundamentals of Digital Electronics (BE03003031)
PRACTICAL NO : 5
Date:
AIM: To study & implement Half Adder and Full Adder using AOI and
Universal logic.
Objectives: -
1. To design Half Adder and Full Adder using AOI and Universal logic.
2. To implement Half and Full Adder using Basic Gate ICs.
3. To implement and verify the truth tables of Half and Full Adder using
breadboard and/or Digital Lab kits.
Theory:
Combinational circuit is a circuit in which we combine the different gates in the circuit, for
example encoder, decoder, multiplexer and demultiplexer. Some of the characteristics of
combinational circuits are following −
• The output of combinational circuit at any instant of time, depends only on the levels
present at input terminals.
• The combinational circuit do not use any memory. The previous state of input does not
have any effect on the present state of the circuit.
• A combinational circuit can have an n number of inputs and m number of outputs.
Block diagram
Half Adder
Half adder is a combinational logic circuit with two inputs and two outputs. The half adder
circuit is designed to add two single bit binary number A and B. It is the basic building block
for addition of two single bit numbers. This circuit has two outputs carry and sum.
35
Fundamentals of Digital Electronics (BE03003031)
NAND LOGIC:
S=AB'+A'B=AB'+AA'+BB'+A'B
=A(A'+B')+B(A'+B')
=A.(AB)'+B.(AB)'
= ((A.(AB)')'.(B.(AB)')')'
C=AB=((AB)')'
Full Adder:
A full adder is an arithmatic circuit that adds two bits and a carry and outputs a sum bit and
a carry bit. When we want to add two binary numbers, each having two or more bits, the
LSBs, can be added by using a half adder. The carry resulted from the addition of the LSBs
is carried over to the next significant column and added to the two bits in that column. So,
in the second and higher columns, the two data bits of that column and the carry bit generated
from the addition in the previous column need to be added. The full adder adds the bits A
and B and carry from the previous column called the carry-in Cin and outputs the sum bit S
and the carry bit called carry -out Cout. The block diagram and truth table of a full adder are
shown below.
36
Fundamentals of Digital Electronics (BE03003031)
Fig.3. Full Adder Block diagram, truth table and AOI Logic.
The Boolean expression for a full adder is as follows.
Logical Expression for SUM:
= A’ B’ C-IN + A’ B C-IN’ + A B’ C-IN’ + A B C-IN
= C-IN (A’ B’ + A B) + C-IN’ (A’ B + A B’)
= C-IN XOR (A XOR B)
= (1,2,4,7)
Logical Expression for C-OUT:
= A’ B C-IN + A B’ C-IN + A B C-IN’ + A B C-IN
= A B + B C-IN + A C-IN
= (3,5,6,7)
Another form in which C-OUT can be implemented:
= A B + A C-IN + B C-IN (A + A’)
= A B C-IN + A B + A C-IN + A’ B C-IN
= A B (1 +C-IN) + A C-IN + A’ B C-IN
= A B + A C-IN + A’ B C-IN
= A B + A C-IN (B + B’) + A’ B C-IN
= A B C-IN + A B + A B’ C-IN + A’ B C-IN
= A B (C-IN + 1) + A B’ C-IN + A’ B C-IN
= A B + A B’ C-IN + A’ B C-IN
= AB + C-IN (A’ B + A B’)
Therefore COUT = AB + C-IN (A EX – OR B)
37
Fundamentals of Digital Electronics (BE03003031)
38
Fundamentals of Digital Electronics (BE03003031)
CIRCUIT DIAGRAM:
39
Fundamentals of Digital Electronics (BE03003031)
PROCEDURE:
40
Fundamentals of Digital Electronics (BE03003031)
OBSERVATION TABLE:
HALF ADDER:
FULL ADDER:
41
Fundamentals of Digital Electronics (BE03003031)
Conclusion:
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
Suggested References:
Reference Books:
• A. Anand Kumar, '' Fundamentals of Digital Electronics'', PHI Learning Publications.
• M. Morris Mano, " Digital Logic and Computer Design", Pearson Education India.
• R. P. Jain, "Modern Digital Electronics", Tata McGraw-Hill Education.
• Anil K. Maini, "Digital Electronics: Principles and Integrated Circuits", Wiley.
• Malvino& Leach, "Digital Principles and Applications", McGraw-Hill Education.
Reference Websites:
• https://www.tutorialspoint.com/computer_logical_organization/logic_gates.htm
• https://www.electronics-tutorials.ws/logic/logic_4.html
• https://www.javatpoint.com/logic-gates
• http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/index.html
References used by the students:
Rubrics 1 2 3 4 5 Total
Marks
Faculty Sign:
42
Fundamentals of Digital Electronics (BE03003031)
PRACTICAL NO : 6
Date:
AIM: To study & implement Half Subtractor and Full Subtractor using
AOI and Universal logic.
Objectives:-
1. To design Half Subtractor and Full Subtractor using AOI and Universal
logic.
2. To implement Half and Full Subtractor using Basic Gate ICs.
3. To implement and verify the truth tables of Half and Full Subtractor
using breadboard and/or Digital Lab kits.
Theory:
Half Subtractor
Half subtractor is a combination circuit with two inputs and two outputs (difference and borrow). It
produces the difference between the two binary bits at the input and also produces an output (Borrow)
to indicate if a 1 has been borrowed. In the subtraction (A-B), A is called as Minuend bit and B is called
as Subtrahend bit.
Fig.1. Half Subtrctor truth table and logic diagram using AOI logic.
43
Fundamentals of Digital Electronics (BE03003031)
Full Subtractor
A full subtractor is a combinational circuit that performs subtraction of two bits, one is
minuend and other is subtrahend, taking into account borrow of the previous adjacent lower
minuend bit. This circuit has three inputs and two outputs. The three inputs A, B and Bin,
denote the minuend, subtrahend, and previous borrow, respectively. The two outputs, D and
Bout represent the difference and output borrow, respectively.
44
Fundamentals of Digital Electronics (BE03003031)
45
Fundamentals of Digital Electronics (BE03003031)
46
Fundamentals of Digital Electronics (BE03003031)
CIRCUIT DIAGRAM:
47
Fundamentals of Digital Electronics (BE03003031)
PROCEDURE:
48
Fundamentals of Digital Electronics (BE03003031)
OBSERVATION TABLE:
HALF SUBTRACTOR:
FULL SUBTRACTOR:
49
Fundamentals of Digital Electronics (BE03003031)
Conclusion:
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
Suggested References:
Reference Books:
• A. Anand Kumar, '' Fundamentals of Digital Electronics'', PHI Learning Publications.
• M. Morris Mano, " Digital Logic and Computer Design", Pearson Education India.
• R. P. Jain, "Modern Digital Electronics", Tata McGraw-Hill Education.
• Anil K. Maini, "Digital Electronics: Principles and Integrated Circuits", Wiley.
• Malvino& Leach, "Digital Principles and Applications", McGraw-Hill Education.
Reference Websites:
• https://www.tutorialspoint.com/computer_logical_organization/logic_gates.htm
• https://www.electronics-tutorials.ws/logic/logic_4.html
• https://www.javatpoint.com/logic-gates
• http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/index.html
References used by the students:
Rubrics 1 2 3 4 5 Total
Marks
Faculty Sign:
50
Fundamentals of Digital Electronics (BE03003031)
PRACTICAL NO : 7
Date:
AIM: To study & implement Gray to Binary & Binary to Gray code
conversion using Gate ICs.
Objectives: -
1. To design Gray to Binary & Binary to Gray code conversion using AOI
and Universal logic.
2. To implement Gray to Binary & Binary to Gray code conversion using
Basic Gate ICs.
3. To verify the truth tables Gray to Binary & Binary to Gray code
conversion using breadboard and/or Digital Lab kits.
Theory:
This conversion can be done by applying following rules:
1 The Most Significant Bit (MSB) of the gray code is always equal to the MSB of the given
binary code.
2 Other bits of the output gray code can be obtained by XORing binary code bit at that index
and previous index.
Example of Binary to Gray Code Converter
Let assume the Binary code digits be bo, b1, b2, b3 whereas the particular Gray Code can be
attained based on the following concept.
From the above operation, finally we can get the gray values like g3 = b3, g2 = b3
XOR b2, g1= b2 XOR b1, g0 = b1 XOR b0.
For example, take the binary value b3, b2, b1, b0 = 1101 and find the gray code g3, g2, g1, g0
based on the above concept.
51
Fundamentals of Digital Electronics (BE03003031)
g3=b3=1
g2 = b3 XOR b2 = 1 XOR 1 =0
g1= b2 XOR b1= 1 XOR 0 = 1
g0= b1 XOR b0= 0 XOR 1 = 1
52
Fundamentals of Digital Electronics (BE03003031)
From the above operation, finally we can get the binary values like b3 = g3, b2 =
b3 XOR g2, b1= b2 XOR g1, b0 = b1 XOR g0.
For example, take the gray value g3, g2, g1, g0 = 0011 and find the binary code b3, b2, b1, b0
based on the above concept
b3=g3=0
b2 = b3 XOR g2 = 0 XOR 0 =0
b1= b2 XOR g1= 0 XOR 1 = 1
b0= b1 XOR g0= 1 XOR 1 = 0
The final binary code for the value of gray 0011 is 0010
53
Fundamentals of Digital Electronics (BE03003031)
54
Fundamentals of Digital Electronics (BE03003031)
CIRCUIT DIAGRAM:
55
Fundamentals of Digital Electronics (BE03003031)
PROCEDURE:
56
Fundamentals of Digital Electronics (BE03003031)
OBSERVATION TABLE:
57
Fundamentals of Digital Electronics (BE03003031)
Conclusion:
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
Suggested References:
Reference Books:
• A. Anand Kumar, '' Fundamentals of Digital Electronics'', PHI Learning Publications.
• M. Morris Mano, " Digital Logic and Computer Design", Pearson Education India.
• R. P. Jain, "Modern Digital Electronics", Tata McGraw-Hill Education.
• Anil K. Maini, "Digital Electronics: Principles and Integrated Circuits", Wiley.
• Malvino& Leach, "Digital Principles and Applications", McGraw-Hill Education.
Reference Websites:
• https://www.tutorialspoint.com/computer_logical_organization/logic_gates.htm
• https://www.electronics-tutorials.ws/logic/logic_4.html
• https://www.javatpoint.com/logic-gates
• http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/index.html
References used by the students:
Rubrics 1 2 3 4 5 Total
Marks
Faculty Sign:
58
Fundamentals of Digital Electronics (BE03003031)
PRACTICAL NO : 8
Date:
AIM: To study & implement 1-bit & 2-bit Magnitude Comparator
using Gate ICs.
Objectives: -
1. To design 1-bit & 2-bit Magnitude Comparator AOI and Universal
logic.
2. To implement 1-bit & 2-bit Magnitude Comparator using Basic Gate
ICs.
3. To verify the truth tables of 1-bit & 2-bit Magnitude Comparator using
breadboard and/or Digital Lab kits.
Theory:
59
Fundamentals of Digital Electronics (BE03003031)
By using these Boolean expressions, we can implement a logic circuit for this comparator
as given below:
• Firstly, the circuit does not distinguish between either two “0” or two “1”‘s as an
output A = B is produced when they are both equal, either A = B = “0” or A = B = “1”.
Secondly, the output condition for A = B resembles that of a commonly available logic
gate, the Exclusive-NOR or Ex-NOR function (equivalence) on each of the n-
bits giving: Q = A ⊕ B
• Digital comparators actually use Exclusive-NOR gates within their design for
comparing their respective pairs of bits. When we are comparing two binary or BCD
values or variables against each other, we are comparing the “magnitude” of these
values, a logic “0” against a logic “1” which is where the term Magnitude
Comparator comes from.
• As well as comparing individual bits, we can design larger bit comparators by cascading
together n of these and produce a n-bit comparator just as we did for the n-bit adder in
the previous tutorial. Multi-bit comparators can be constructed to compare whole binary
or BCD words to produce an output if one word is larger, equal to or less than the other.
60
Fundamentals of Digital Electronics (BE03003031)
From the above truth table K-map for each output can be drawn as follows:
61
Fundamentals of Digital Electronics (BE03003031)
From the above K-maps logical expressions for each output can be expressed as follows:
A>B:A1B1’ + A0A1B1’B0’ + A1'B1'A0B0’
A=B: A1’A0’B1’B0’ + A1’A0B1’B0 + A1A0B1B0 + A1A0’B1B0’
: A1’B1’ (A0’B0’ + A0B0) + A1B1 (A0B0 + A0’B0’)
: (A0B0 + A0’B0’) (A1B1 + A1’B1’)
: (A0 Ex-Nor B0) (A1 Ex-Nor B1)
A=B = .
A<B:A1’B1 + A1A0’B1B0 + A1’A0’B0B1'
By using these Boolean expressions, we can implement a logic circuit for this comparator
as given below:
62
Fundamentals of Digital Electronics (BE03003031)
CIRCUIT DIAGRAM:
63
Fundamentals of Digital Electronics (BE03003031)
PROCEDURE:
64
Fundamentals of Digital Electronics (BE03003031)
OBSERVATION TABLE:
65
Fundamentals of Digital Electronics (BE03003031)
Conclusion:
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
Suggested References:
Reference Books:
• A. Anand Kumar, '' Fundamentals of Digital Electronics'', PHI Learning Publications.
• M. Morris Mano, " Digital Logic and Computer Design", Pearson Education India.
• R. P. Jain, "Modern Digital Electronics", Tata McGraw-Hill Education.
• Anil K. Maini, "Digital Electronics: Principles and Integrated Circuits", Wiley.
• Malvino& Leach, "Digital Principles and Applications", McGraw-Hill Education.
Reference Websites:
• https://www.tutorialspoint.com/computer_logical_organization/logic_gates.htm
• https://www.electronics-tutorials.ws/logic/logic_4.html
• https://www.javatpoint.com/logic-gates
• http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/index.html
References used by the students:
Rubrics 1 2 3 4 5 Total
Marks
Faculty Sign:
66
Fundamentals of Digital Electronics (BE03003031)
PRACTICAL NO : 9
Date:
AIM: To study & implement Encoder and Decoder using Gate ICs.
Objectives: -
1. To design Encoder and Decoder using AOI and Universal logic.
2. To implement Encoder and Decoder using Basic Gate ICs.
Theory:
An Encoder is a combinational circuit that performs the reverse operation of Decoder. It has
maximum of 2n input lines and ‘n’ output lines. It will produce a binary code equivalent to
the input, which is active High. Therefore, the encoder encodes 2n input lines with ‘n’ bits. It
is optional to represent the enable signal in encoders.
4 to 2 Line Encoder
Let 4 to 2 Encoder has four inputs Y3, Y2, Y1 & Y0 and two outputs A1 & A0. The block
diagram of 4 to 2 Encoder is shown in the following figure.
FA1 = y2+y3
FA0 = y1+y3
We can implement the above two Boolean functions by using two input OR gates. The circuit
diagram of 4 to 2 line encoder is shown in the following figure.
67
Fundamentals of Digital Electronics (BE03003031)
Octal to binary Encoder has eight inputs, Y7 to Y0 and three outputs A2, A1 & A0. Octal to
binary encoder is nothing but 8 to 3 encoder. The block diagram of octal to binary Encoder
is shown in the following figure.
From Truth table, we can write the Boolean functions for each output as,
FA2 = Y4+Y5+Y6+Y7
FA1 = Y2+Y3+Y6+Y7
FA0 = Y1+Y3+Y5+Y7
68
Fundamentals of Digital Electronics (BE03003031)
We can implement the above Boolean functions by using four input OR gates. The circuit
diagram of octal to binary encoder is shown in the following figure.
Drawbacks of Encoder
Following are the drawbacks of normal encoder.
• There is an ambiguity, when all outputs of encoder are equal to zero. Because, it could
be the code corresponding to the inputs, when only least significant input is one or
when all inputs are zero.
• If more than one input is active High, then the encoder produces an output, which may
not be the correct code. For example, if both Y3 and Y6 are ‘1’, then the encoder
produces 111 at the output. This is neither equivalent code corresponding to Y3, when
it is ‘1’ nor the equivalent code corresponding to Y6, when it is ‘1’.
So, to overcome these difficulties, we should assign priorities to each input of encoder. Then,
the output of encoder will be the (binary) code corresponding to the active High input(s),
which has higher priority. This encoder is called as priority encoder.
Priority Encoder
A 4 to 2 priority encoder has four inputs Y3, Y2, Y1 & Y0 and two outputs A1 & A0. Here, the
input, Y3 has the highest priority, whereas the input, Y0 has the lowest priority. In this case,
even if more than one input is ‘1’ at the same time, the output will be the (binary) code
corresponding to the input, which is having higher priority.
We considered one more output, V in order to know, whether the code available at outputs is
valid or not.
• If at least one input of the encoder is ‘1’, then the code available at outputs is a valid
one. In this case, the output, V will be equal to 1.
• If all the inputs of encoder are ‘0’, then the code available at outputs is not a valid one.
In this case, the output, V will be equal to 0.
69
Fundamentals of Digital Electronics (BE03003031)
Use 4 variable K-maps for getting simplified expressions for each output.
70
Fundamentals of Digital Electronics (BE03003031)
The above circuit diagram contains two 2-input OR gates, one 4-input OR gate, one 2input
AND gate & an inverter. Here AND gate & inverter combination are used for producing a
valid code at the outputs, even when multiple inputs are equal to ‘1’ at the same time. Hence,
this circuit encodes the four inputs with two bits based on the priority assigned to each input.
Keyboard Encoder
Priority encoders can be used to reduce the number of wires needed in a particular circuits or
application that have multiple inputs. For example, assume that a microcomputer needs to read
the 104 keys of a standard QWERTY keyboard where only one key would be pressed either
“HIGH” or “LOW” at any one time.
One way would be to connect all 104 wires from the individual keys on the keyboard directly
to the computers input but this would be impractical for a small home PC. Another alternative
and better way would be to interface the keyboard to the PC using a priority encoder.
The 104 individual buttons or keys could be encoded into a standard ASCII code of only 7-bits
(0 to 127 decimal) to represent each key or character of the keyboard and then input as a much
smaller 7-bit B.C.D code directly to the computer. Keypad encoders such as the 74C923 20-
key encoder are available to do just that.
Positional Encoders
Another more common application is in magnetic positional control as used on ships navigation
or for robotic arm positioning etc. Here for example, the angular or rotary position of a compass
is converted into a digital code by a 74LS148 8-to-3 line priority encoder and input to the
systems computer to provide navigational data and an example of a simple 8 position to 3-bit
output compass encoder is shown below. Magnets and reed switches could be used at each
compass point to indicate the needles angular position.
71
Fundamentals of Digital Electronics (BE03003031)
Decoders:
The name “Decoder” means to translate or decode coded information from one format into
another, so a binary decoder transforms “n” binary input signals into an equivalent code using
2n outputs.
Binary Decoders are another type of digital logic device that has inputs of 2-bit, 3-bit or 4-bit
codes depending upon the number of data input lines, so a decoder that has a set of two or more
bits will be defined as having an n-bit code, and therefore it will be possible to represent
2n possible values. Thus, a decoder generally decodes a binary value into a non-binary one by
setting exactly one of its n outputs to logic “1”.
If a binary decoder receives n inputs (usually grouped as a single Binary or Boolean number)
it activates one and only one of its 2n outputs based on that input with all other outputs
deactivated.
So for example, an inverter ( NOT-gate ) can be classed as a 1-to-2 binary decoder as 1-input
and 2-outputs (21) is possible because with an input A it can produce two outputs A and A (not-
A) as shown.
Then we can say that a standard combinational logic decoder is an n-to-m decoder,
where m ≤ 2n, and whose output, Q is dependent only on its present input states. In other words,
a binary decoder looks at its current inputs, determines which binary code or binary number is
present at its inputs and selects the appropriate output that corresponds to that binary input.
A Binary Decoder converts coded inputs into coded outputs, where the input and output codes
are different and decoders are available to “decode” either a Binary or BCD (8421 code) input
pattern to typically a Decimal output code. Commonly available BCD-to-Decimal decoders
include the TTL 7442 or the CMOS 4028. Generally a decoders output code normally has more
bits than its input code and practical “binary decoder” circuits include, 2-to-4, 3-to-8 and 4-to-
16 line configurations.
An example of a 2-to-4 line decoder along with its truth table is given as:
72
Fundamentals of Digital Electronics (BE03003031)
This simple example above of a 2-to-4 line binary decoder consists of an array of
four AND gates. The 2 binary inputs labelled A and B are decoded into one of 4 outputs, hence
the description of 2-to-4 binary decoder. Each output represents one of the miniterms of the 2
input variables, (each output = a miniterm).
The binary inputs A and B determine which output line from Q0 to Q3 is “HIGH” at logic
level “1” while the remaining outputs are held “LOW” at logic “0” so only one output can be
active (HIGH) at any one time. Therefore, whichever output line is “HIGH” identifies the
binary code present at the input, in other words it “de-codes” the binary input.
Some binary decoders have an additional input pin labelled “Enable” that controls the outputs
from the device. This extra input allows the decoders outputs to be turned “ON” or “OFF” as
required. These types of binary decoders are commonly used as “memory address decoders”
in microprocessor memory applications.
73
Fundamentals of Digital Electronics (BE03003031)
Inputs A, B, C are used to select which output on either decoder will be at logic “1” (HIGH)
and input D is used with the enable input to select which encoder either the first or second will
output the “1”.
However, there is a limit to the number of inputs that can be used for one particular decoder,
because as n increases, the number of AND gates required to produce an output also becomes
larger resulting in the fan-out of the gates used to drive them becoming large.
This type of active-“HIGH” decoder can be implemented using just Inverters, ( NOT Gates )
and AND gates. It is convenient to use an AND gate as the basic decoding element for the
output because it produces a “HIGH” or logic “1” output only when all of its inputs are logic
“1”.
But some binary decoders are constructed using NAND gates instead of AND gates for their
decoded output, since NAND gates are cheaper to produce than AND’s as they require fewer
transistors to implement within their design.
The use of NAND gates as the decoding element, results in an active-“LOW” output while the
rest will be “HIGH”. As a NAND gate produces the AND operation with an inverted output,
the NAND decoder looks like this with its inverted truth table.
74
Fundamentals of Digital Electronics (BE03003031)
The binary decoder requires only 3 address lines, (A0 to A2) to select each one of the 8 chips
(the lower part of the address), while the remaining 8 address lines (A3 to A10) select the correct
memory location on that chip (the upper part of the address).
Having selected a memory location using the address bus, the information at the particular
internal memory location is sent to a common “Data Bus” for use by the microprocessor. This
is of course a simple example but the principals remain the same for all types of memory chips
or modules.
Binary Decoders are very useful devices for converting one digital format to another, such as
binary or BCD type data into decimal or octal etc and commonly available decoder IC’s are
the TTL 74LS138 3-to-8 line binary decoder or the 74ALS154 4-to-16 line decoder. They are
also very useful for interfacing to 7-segment displays such as the TTL 74LS47.
75
Fundamentals of Digital Electronics (BE03003031)
CIRCUIT DIAGRAM:
76
Fundamentals of Digital Electronics (BE03003031)
PROCEDURE:
77
Fundamentals of Digital Electronics (BE03003031)
OBSERVATION TABLE:
78
Fundamentals of Digital Electronics (BE03003031)
Conclusion:
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
Suggested References:
Reference Books:
• A. Anand Kumar, '' Fundamentals of Digital Electronics'', PHI Learning Publications.
• M. Morris Mano, " Digital Logic and Computer Design", Pearson Education India.
• R. P. Jain, "Modern Digital Electronics", Tata McGraw-Hill Education.
• Anil K. Maini, "Digital Electronics: Principles and Integrated Circuits", Wiley.
• Malvino& Leach, "Digital Principles and Applications", McGraw-Hill Education.
Reference Websites:
• https://www.tutorialspoint.com/computer_logical_organization/logic_gates.htm
• https://www.electronics-tutorials.ws/logic/logic_4.html
• https://www.javatpoint.com/logic-gates
• http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/index.html
References used by the students:
Rubrics 1 2 3 4 5 Total
Marks
Faculty Sign:
79
Fundamentals of Digital Electronics (BE03003031)
PRACTICAL NO : 10
Date:
Theory:
Multiplexing is the generic term used to describe the operation of sending one or more analogue
or digital signals over a common transmission line at different times or speeds and as such, the
device we use to do just that is called a Multiplexer.
The multiplexer, shortened to “MUX” or “MPX”, is a combinational logic circuit designed to
switch one of several input lines through to a single common output line by the application of
a control signal. Multiplexers operate like very fast acting multiple position rotary switches
connecting or controlling multiple input lines called “channels” one at a time to the output.
Multiplexers, or MUX’s, can be either digital circuits made from high speed logic gates used
to switch digital or binary data or they can be analogue types using transistors, MOSFET’s or
relays to switch one of the voltage or current inputs through to a single output.
The most basic type of multiplexer device is that of a one-way rotary switch as shown below.
The rotary switch, also called a wafer switch as each layer of the switch is known as a wafer,
is a mechanical device whose input is selected by rotating a shaft. In other words, the rotary
switch is a manual switch that you can use to select individual data or signal lines simply by
turning its inputs “ON” or “OFF”. So how can we select each data input automatically using a
digital device.
In digital electronics, multiplexers are also known as data selectors because they can “select”
each input line, are constructed from individual Analogue Switches encased in a single IC
package as opposed to the “mechanical” type selectors such as normal conventional switches
and relays.
80
Fundamentals of Digital Electronics (BE03003031)
They are used as one method of reducing the number of logic gates required in a circuit design
or when a single data line or data bus is required to carry two or more different digital signals.
For example, a single 8-channel multiplexer.
Generally, the selection of each input line in a multiplexer is controlled by an additional set of
inputs called control lines and according to the binary condition of these control inputs, either
“HIGH” or “LOW” the appropriate data input is connected directly to the output. Normally, a
multiplexer has an even number of 2n data input lines and a number of “control” inputs that
correspond with the number of data inputs.
Note that multiplexers are different in operation to Encoders. Encoders are able to switch an n-
bit input pattern to multiple output lines that represent the binary coded (BCD) output
equivalent of the active input.
We can build a simple 2-line to 1-line (2-to-1) multiplexer from basic logic NAND gates as
shown.
The input A of this simple 2-1 line multiplexer circuit constructed from standard NAND gates
acts to control which input ( I0 or I1 ) gets passed to the output at Q.
From the truth table above, we can see that when the data select input, A is LOW at logic 0,
input I1 passes its data through the NAND gate multiplexer circuit to the output, while input
I0 is blocked. When the data select A is HIGH at logic 1, the reverse happens and now input
I0 passes data to the output Q while input I1 is blocked.
So by the application of either a logic “0” or a logic “1” at A we can select the appropriate
input, I0 or I1 with the circuit acting a bit like a single pole double throw (SPDT) switch.
As we only have one control line, (A) then we can only switch 21 inputs and in this simple
example, the 2-input multiplexer connects one of two 1-bit sources to a common output,
producing a 2-to-1-line multiplexer. We can confirm this in the following Boolean expression.
Q = A'.I0'.I1 + A'.I0.I1 + A.I0.I1' + A.I0.I1
and for our 2-input multiplexer circuit above, this can be simplified too:
Q = A'.I1 + A.I0
81
Fundamentals of Digital Electronics (BE03003031)
We can increase the number of data inputs to be selected further simply by following the same
procedure and larger multiplexer circuits can be implemented using smaller 2-to-1 multiplexers
as their basic building blocks. So for a 4-input multiplexer we would therefore require two data
select lines as 4-inputs represents 22 data control lines give a circuit with four inputs,
I0, I1, I2, I3 and two data select lines A and B as shown.
So for this example to select input B to the output at Q, the binary input address would need to
be “a” = logic “1” and “b” = logic “0”. Thus we can show the selection of the data through the
multiplexer as a function of the data select bits as shown.
82
Fundamentals of Digital Electronics (BE03003031)
Adding more control address lines, (n) will allow the multiplexer to control more inputs as it
can switch 2n inputs but each control line configuration will connect only ONE input to the
output.
Then the implementation of the Boolean expression above using individual logic gates would
require the use of seven individual gates consisting of AND, OR and NOT gates as shown.
Multiplexers are not limited to just switching a number of different input lines or channels to
one common single output. There are also types that can switch their inputs to multiple outputs
and have arrangements or 4-to-2, 8-to-3 or even 16-to-4 etc configurations and an example of
a simple Dual channel 4 input multiplexer (4-to-2) is given below:
83
Fundamentals of Digital Electronics (BE03003031)
Here in this example the 4 input channels are switched to 2 individual output lines but larger
arrangements are also possible. This simple 4-to-2 configuration could be used for example, to
switch audio signals for stereo pre-amplifiers or mixers.
• 8x1 Multiplexer
8x1 Multiplexer
In this section, let us implement 8x1 Multiplexer using 4x1 Multiplexers and 2x1 Multiplexer.
We know that 4x1 Multiplexer has 4 data inputs, 2 selection lines and one output. Whereas,
8x1 Multiplexer has 8 data inputs, 3 selection lines and one output.
So, we require two 4x1 Multiplexers in first stage in order to get the 8 data inputs. Since,
each 4x1 Multiplexer produces one output, we require a 2x1 Multiplexer in second stage by
considering the outputs of first stage as inputs and to produce the final output.
Let the 8x1 Multiplexer has eight data inputs I7 to I0, three selection lines s2, s1 & s0 and one
output Y. The Truth table of 8x1 Multiplexer is shown below.
We can implement 8x1 Multiplexer using lower order Multiplexers easily by considering
the above Truth table. The block diagram of 8x1 Multiplexer is shown in the following
figure.
84
Fundamentals of Digital Electronics (BE03003031)
The same selection lines, s & s are applied to both 4x1 Multiplexers. The data inputs of upper
1 0
4x1 Multiplexer are I to I and the data inputs of lower 4x1 Multiplexer are I to I . Therefore,
7 4 3 0
each 4x1 Multiplexer produces an output based on the values of selection lines, s & s .1 0
The outputs of first stage 4x1 Multiplexers are applied as inputs of 2x1 Multiplexer that is
present in second stage. The other selection line, s is applied to 2x1 Multiplexer.
2
• If s2 is zero, then the output of 2x1 Multiplexer will be one of the 4 inputs I3 to I0 based
on the values of selection lines s1 & s0.
• If s2 is one, then the output of 2x1 Multiplexer will be one of the 4 inputs I7 to I4 based
on the values of selection lines s1 & s0.
Therefore, the overall combination of two 4x1 Multiplexers and one 2x1 Multiplexer performs
as one 8x1 Multiplexer.
Demultiplexer
The data distributor, known more commonly as a Demultiplexer or “Demux” for short, is the
exact opposite of the Multiplexer we saw in the previous tutorial.
The demultiplexer takes one single input data line and then switches it to any one of a number
of individual output lines one at a time. The demultiplexer converts a serial data signal at the
input to a parallel data at its output lines as shown below.
85
Fundamentals of Digital Electronics (BE03003031)
The Boolean expression for this 1-to-4 Demultiplexer above with outputs A to D and data
select lines a, b is given as:
F = a'b'A + a'bB + ab'C + abD
The function of the Demultiplexer is to switch one common data input line to any one of the
4 output data lines A to D in our example above. As with the multiplexer the individual solid
state switches are selected by the binary input address code on the output select pins “a” and
“b” as shown.
As with the previous multiplexer circuit, adding more address line inputs it is possible to switch
more outputs giving a 1-to-2n data line outputs.
Some standard demultiplexer IC´s also have an additional “enable output” pin which disables
or prevents the input from being passed to the selected output. Also some have latches built
into their outputs to maintain the output logic level after the address inputs have been changed.
However, in standard decoder type circuits the address input will determine which single data
output will have the same value as the data input with all other data outputs having the value
of logic “0”.
The implementation of the Boolean expression above using individual logic gates would
require the use of six individual gates consisting of AND and NOT gates as shown.
86
Fundamentals of Digital Electronics (BE03003031)
87
Fundamentals of Digital Electronics (BE03003031)
• 1x8 De-Multiplexer
1x8 De-Multiplexer
In this section, let us implement 1x8 De-Multiplexer using 1x4 De-Multiplexers and 1x2 De-
Multiplexer. We know that 1x4 De-Multiplexer has single input, two selection lines and four
outputs. Whereas, 1x8 De-Multiplexer has single input, three selection lines and eight outputs.
So, we require two 1x4 De-Multiplexers in second stage in order to get the final eight outputs.
Since, the number of inputs in second stage is two, we require 1x2 DeMultiplexer in first
stage so that the outputs of first stage will be the inputs of second stage. Input of this 1x2 De-
Multiplexer will be the overall input of 1x8 De-Multiplexer.
Let the 1x8 De-Multiplexer has one input I, three selection lines s , s & s and outputs Y to Y .
2 1 0 7 0
88
Fundamentals of Digital Electronics (BE03003031)
he common selection lines, s & s are applied to both 1x4 De-Multiplexers. The outputs of
1 0
upper 1x4 De-Multiplexer are Y to Y and the outputs of lower 1x4 De-Multiplexer are Y to
7 4 3
Y.0
The other selection line, s is applied to 1x2 De-Multiplexer. If s is zero, then one of the four
2 2
outputs of lower 1x4 De-Multiplexer will be equal to input, I based on the values of selection
lines s & s . Similarly, if s is one, then one of the four outputs of upper 1x4 DeMultiplexer
1 0 2
CIRCUIT DIAGRAM:
89
Fundamentals of Digital Electronics (BE03003031)
PROCEDURE:
90
Fundamentals of Digital Electronics (BE03003031)
OBSERVATION TABLE:
91
Fundamentals of Digital Electronics (BE03003031)
Conclusion:
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
Suggested References:
Reference Books:
• A. Anand Kumar, '' Fundamentals of Digital Electronics'', PHI Learning Publications.
• M. Morris Mano, " Digital Logic and Computer Design", Pearson Education India.
• R. P. Jain, "Modern Digital Electronics", Tata McGraw-Hill Education.
• Anil K. Maini, "Digital Electronics: Principles and Integrated Circuits", Wiley.
• Malvino& Leach, "Digital Principles and Applications", McGraw-Hill Education.
Reference Websites:
• https://www.tutorialspoint.com/computer_logical_organization/logic_gates.htm
• https://www.electronics-tutorials.ws/logic/logic_4.html
• https://www.javatpoint.com/logic-gates
• http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/index.html
References used by the students:
Rubrics 1 2 3 4 5 Total
Marks
Faculty Sign:
92
Fundamentals of Digital Electronics (BE03003031)
PRACTICAL NO : 11
Date:
The sequential circuit contains a set of inputs and output(s). The output(s) of sequential circuit
depends not only on the combination of present inputs but also on the previous output(s).
Previous output is nothing but the present state. Therefore, sequential circuits contain
combinational circuits along with memory (storage) elements. Some sequential circuits may
not contain combinational circuits, but only memory elements.
93
Fundamentals of Digital Electronics (BE03003031)
the above figure, square wave is considered as clock signal. This signal stays at logic High
(5V) for some time and stays at logic Low (0V) for equal amount of time. This pattern repeats
with some time period. In this case, the time period will be equal to either twice of ON time
or twice of OFF time.
We can represent the clock signal as train of pulses, when ON time and OFF time are not
same. This clock signal is shown in the following figure.
Types of Triggering
Following are the two possible types of triggering that are used in sequential circuits.
• Level triggering
• Edge triggering
Level triggering
There are two levels, namely logic High and logic Low in clock signal. Following are the
two types of level triggering.
94
Fundamentals of Digital Electronics (BE03003031)
If the sequential circuit is operated with the clock signal when it is in Logic Low, then that
type of triggering is known as Negative level triggering. It is highlighted in the following
figure.
Edge triggering
There are two types of transitions that occur in clock signal. That means, the clock signal
transitions either from Logic Low to Logic High or Logic High to Logic Low.
Following are the two types of edge triggering based on the transitions of clock signal.
If the sequential circuit is operated with the clock signal that is transitioning from Logic High
to Logic Low, then that type of triggering is known as Negative edge triggering. It is also
called as falling edge triggering. It is shown in the following figure.
There are two types of memory elements based on the type of triggering that is suitable to
operate it.
• Latches
• Flip-flops
Latches operate with enable signal, which is level sensitive. Whereas, flip-flops are edge
sensitive
Those are the basic building blocks of flip-flops. We can implement flip-flops in two methods.
In first method, cascade two latches in such a way that the first latch is enabled for every
positive clock pulse and second latch is enabled for every negative clock pulse. So that the
combination of these two latches become a flip-flop.
95
Fundamentals of Digital Electronics (BE03003031)
In second method, we can directly implement the flip-flop, which is edge sensitive. In this
chapter, let us discuss the following flip-flops using second method.
• SR Flip-Flop
• D Flip-Flop
• JK Flip-Flop
• T Flip-Flop
SR Flip-Flop
SR flip-flop operates with only positive clock transitions or negative clock transitions.
Whereas, SR latch operates with enable signal. The circuit diagram of SR flip-flop is shown
in the following figure.
This circuit has two inputs S & R and two outputs Q(t) & Q(t)’. The operation of SR flipflop
is similar to SR Latch. But, this flip-flop affects the outputs only when positive transition of
the clock signal is applied instead of active enable.
The following table shows the state table of SR flip-flop.
Here, Q(t) & Q(t + 1) are present state & next state respectively. So, SR flip-flop can be used
for one of these three functions such as Hold, Reset & Set based on the input conditions,
when positive transition of clock signal is applied. The following table shows
the characteristic table of SR flip-flop.
96
Fundamentals of Digital Electronics (BE03003031)
By using three variable K-Map, we can get the simplified expression for next state, Q(t + 1).
The three variable K-Map for next state, Q(t + 1) is shown in the following figure.
The maximum possible groupings of adjacent ones are already shown in the figure.
Therefore, the simplified expression for next state Q(t + 1) is
Q(t + 1) = S+Q(t)R'
D Flip-Flop
D flip-flop operates with only positive clock transitions or negative clock transitions.
Whereas, D latch operates with enable signal. That means, the output of D flip-flop is
insensitive to the changes in the input, D except for active transition of the clock signal.
The circuit diagram of D flip-flop is shown in the following figure.
97
Fundamentals of Digital Electronics (BE03003031)
This circuit has single input D and two outputs Q(t) & Q(t)’. The operation of D flip-flop is
similar to D Latch. But, this flip-flop affects the outputs only when positive transition of the
clock signal is applied instead of active enable.
The following table shows the state table of D flip-flop.
Therefore, D flip-flop always Hold the information, which is available on data input, D of
earlier positive transition of clock signal. From the above state table, we can directly write the
next state equation as
Q(t + 1) = D
Next state of D flip-flop is always equal to data input, D for every positive transition of the
clock signal. Hence, D flip-flops can be used in registers, shift registers and some of the
counters.
JK Flip-Flop
JK flip-flop is the modified version of SR flip-flop. It operates with only positive clock
transitions or negative clock transitions. The circuit diagram of JK flip-flop is shown in the
following figure.
98
Fundamentals of Digital Electronics (BE03003031)
This circuit has two inputs J & K and two outputs Q(t) & Q(t)’. The operation of JK flip-flop
is similar to SR flip-flop. Here, we considered the inputs of SR flip-flop as S = J Q(t)’ and R
= KQ(t) in order to utilize the modified SR flip-flop for 4 combinations of inputs.
The following table shows the state table of JK flip-flop.
Here, Q(t) & Q(t + 1) are present state & next state respectively. So, JK flip-flop can be used
for one of these four functions such as Hold, Reset, Set & Complement of present state based
on the input conditions, when positive transition of clock signal is applied. The following table
shows the characteristic table of JK flip-flop.
By using three variable K-Map, we can get the simplified expression for next state, Q(t +
1). Three variable K-Map for next state, Q(t + 1) is shown in the following figure.
99
Fundamentals of Digital Electronics (BE03003031)
The maximum possible groupings of adjacent ones are already shown in the figure. Therefore,
the simplified expression for next state Q(t+1) is,
Q(t+1) = Q(t)'J+Q(t)K'
T Flip-Flop
T flip-flop is the simplified version of JK flip-flop. It is obtained by connecting the same input
‘T’ to both inputs of JK flip-flop. It operates with only positive clock transitions or negative
clock transitions. The circuit diagram of T flip-flop is shown in the following figure.
This circuit has single input T and two outputs Q(t) & Q(t)’. The operation of T flip-flop is
same as that of JK flip-flop. Here, we considered the inputs of JK flip-flop as J = T and K =
T in order to utilize the modified JK flip-flop for 2 combinations of inputs. So, we eliminated
the other two combinations of J & K, for which those two values are complement to each other
in T flip-flop.
The following table shows the state table of T flip-flop.
Here, Q(t) & Q(t + 1) are present state & next state respectively. So, T flip-flop can be used
for one of these two functions such as Hold, & Complement of present state based on the
100
Fundamentals of Digital Electronics (BE03003031)
input conditions, when positive transition of clock signal is applied. The following table
shows the characteristic table of T flip-flop.
From the above characteristic table, we can directly write the next state equation as,
Q(t+1) = Q(t)'T+Q(t)T'
The output of T flip-flop always toggles for every positive transition of the clock signal, when
input T remains at logic High (1). Hence, T flip-flop can be used in counters.
101
Fundamentals of Digital Electronics (BE03003031)
CIRCUIT DIAGRAM:
102
Fundamentals of Digital Electronics (BE03003031)
PROCEDURE:
103
Fundamentals of Digital Electronics (BE03003031)
OBSERVATION TABLE:
104
Fundamentals of Digital Electronics (BE03003031)
Conclusion:
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
Suggested References:
Reference Books:
• A. Anand Kumar, '' Fundamentals of Digital Electronics'', PHI Learning Publications.
• M. Morris Mano, " Digital Logic and Computer Design", Pearson Education India.
• R. P. Jain, "Modern Digital Electronics", Tata McGraw-Hill Education.
• Anil K. Maini, "Digital Electronics: Principles and Integrated Circuits", Wiley.
• Malvino& Leach, "Digital Principles and Applications", McGraw-Hill Education.
Reference Websites:
• https://www.tutorialspoint.com/computer_logical_organization/logic_gates.htm
• https://www.electronics-tutorials.ws/logic/logic_4.html
• https://www.javatpoint.com/logic-gates
• http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/index.html
References used by the students:
Rubrics 1 2 3 4 5 Total
Marks
Faculty Sign
105
Fundamentals of Digital Electronics (BE03003031)
PRACTICAL NO : 12
Date:
106
Fundamentals of Digital Electronics (BE03003031)
Also, the directional movement of the data through a shift register can be either to the left, (left
shifting) to the right, (right shifting) left-in but right-out, (rotation) or both left and right shifting
within the same register thereby making it bidirectional. In this tutorial it is assumed that all
the data shifts to the right, (right shifting).
The operation is as follows. Lets assume that all the flip-flops ( FFA to FFD ) have just been
RESET ( CLEAR input ) and that all the outputs QA to QD are at logic level “0” ie, no parallel
data output.
If a logic “1” is connected to the DATA input pin of FFA then on the first clock pulse the
output of FFA and therefore the resulting QA will be set HIGH to logic “1” with all the other
outputs still remaining LOW at logic “0”. Assume now that the DATA input pin of FFA has
returned LOW again to logic “0” giving us one data pulse or 0-1-0.
The second clock pulse will change the output of FFA to logic “0” and the output
of FFB and QB HIGH to logic “1” as its input D has the logic “1” level on it from QA. The logic
“1” has now moved or been “shifted” one place along the register to the right as it is now at QA.
When the third clock pulse arrives this logic “1” value moves to the output of FFC ( QC ) and
so on until the arrival of the fifth clock pulse which sets all the outputs QA to QD back again to
logic level “0” because the input to FFA has remained constant at logic level “0”.
107
Fundamentals of Digital Electronics (BE03003031)
The effect of each clock pulse is to shift the data contents of each stage one place to the right,
and this is shown in the following table until the complete data value of 0-0-0-1 is stored in
the register. This data value can now be read directly from the outputs of QA to QD.
Then the data has been converted from a serial data input signal to a parallel data output. The
truth table and following waveforms show the propagation of the logic “1” through the register
from left to right as follows.
Note that after the fourth clock pulse has ended the 4-bits of data ( 0-0-0-1 ) are stored in the
register and will remain there provided clocking of the register has stopped. In practice the
input data to the register may consist of various combinations of logic “1” and “0”. Commonly
available SIPO IC’s include the standard 8-bit 74LS164 or the 74LS594.
108
Fundamentals of Digital Electronics (BE03003031)
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. Commonly
available IC’s include the 74HC166 8-bit Parallel-in/Serial-out Shift Registers.
The PIPO shift register is the simplest of the four configurations as it has only three
connections, the parallel input (PI) which determines what enters the flip-flop, the parallel
output (PO) and the sequencing clock signal (Clk).
Similar to the Serial-in to Serial-out shift register, this type of register also acts as a temporary
storage device or as a time delay device, with the amount of time delay being varied by the
frequency of the clock pulses. Also, in this type of register there are no interconnections
between the individual flip-flops since no serial shifting of the data is required.
109
Fundamentals of Digital Electronics (BE03003031)
Universal shift registers are very useful digital devices. They can be configured to respond
to operations that require some form of temporary memory storage or for the delay of
information such as the SISO or PIPO configuration modes or transfer data from one
point to another in either a serial or parallel format. Universal shift registers are frequently
used in arithmetic operations to shift data to the left or right for multiplication or division.
COUNTERS:
An ‘N’ bit binary counter consists of ‘N’ T flip-flops. If the counter counts from 0 to 2𝑁 − 1,
then it is called as binary up counter. Similarly, if the counter counts down from 2𝑁 − 1 to 0,
then it is called as binary down counter.
There are two types of counters based on the flip-flops that are connected in synchronous or
not.
• Asynchronous counters
• Synchronous counters
110
Fundamentals of Digital Electronics (BE03003031)
Logical Diagram
Operation
1 Initially let both the FFs be in the reset state QBQA = 00 initially
2 After 1st negative clock edge As soon as the first negative clock
edge is applied, FF-A will toggle
and QA will be equal to 1.
QA is connected to clock input of
FF-B. Since QA has changed from 0
to 1, it is treated as the positive
clock edge by FF-B. There is no
change in QB because FF-B is a
negative edge triggered FF.
QBQA = 01 after the first clock
pulse.
4 After 3rd negative clock edge On the arrival of 3rd negative clock
edge, FF-A toggles again and
QA become 1 from 0.
Since this is a positive going
change, FF-B does not respond to it
and remains inactive. So QB does
111
Fundamentals of Digital Electronics (BE03003031)
5 After 4th negative clock edge On the arrival of 4th negative clock
edge, FF-A toggles again and
QA becomes 1 from 0.
This negative change in QA acts as
clock pulse for FF-B. Hence it
toggles to change QB from 1 to 0.
QBQA = 00 after the fourth clock
pulse.
Truth Table
Synchronous counters
If the "clock" pulses are applied to all the flip-flops in a counter simultaneously, then such a
counter is called as synchronous counter.
2-bit Synchronous up counter
The JA and KA inputs of FF-A are tied to logic 1. So FF-A will work as a toggle flip-flop. The
JB and KB inputs are connected to QA.
Logical Diagram
112
Fundamentals of Digital Electronics (BE03003031)
Operation
1 Initially let both the FFs be in the reset state QBQA = 00 initially.
2 After 1st negative clock edge As soon as the first negative clock
edge is applied, FF-A will toggle
and QA will change from 0 to 1.
But at the instant of application of
negative clock edge, QA , JB = KB =
0. Hence FF-B will not change its
state. So QB will remain 0.
QBQA = 01 after the first clock
pulse.
Classification of counters
Depending on the way in which the counting progresses, the synchronous or asynchronous
counters are classified as follows −
113
Fundamentals of Digital Electronics (BE03003031)
• Up counters
• Down counters
• Up/Down counters
UP/DOWN Counter
Up counter and down counter is combined together to obtain an UP/DOWN counter. A mode
control (M) input is also provided to select either up or down mode. A combinational circuit
is required to be designed and used between each pair of flip-flop in order to achieve the
up/down operation.
In the UP/DOWN ripple counter all the FFs operate in the toggle mode. So either T flip-flops
or JK flip-flops are to be used. The LSB flip-flop receives clock directly. But the clock to
every other FF is obtained from (Q = Q bar) output of the previous FF.
• UP counting mode (M=0) − The Q output of the preceding FF is connected to the
clock of the next stage if up counting is to be achieved. For this mode, the mode select
input M is at logic 0 (M=0).
• DOWN counting mode (M=1) − If M = 1, then the Q bar output of the preceding FF
is connected to the next FF. This will operate the counter in the counting mode.
Example
3-bit binary up/down ripple counter.
• 3-bit − hence three FFs are required.
• UP/DOWN − So a mode control input is essential.
• For a ripple up counter, the Q output of preceding FF is connected to the clock input
of the next one.
• For a ripple up counter, the Q output of preceding FF is connected to the clock input
of the next one.
• For a ripple down counter, the Q bar output of preceding FF is connected to the clock
input of the next one.
• Let the selection of Q and Q bar output of the preceding FF be controlled by the mode
control input M such that, If M = 0, UP counting. So connect Q to CLK. If M = 1,
DOWN counting. So connect Q bar to CLK.
114
Fundamentals of Digital Electronics (BE03003031)
Block Diagram
Truth Table
Operation
1 Case 1 − With M = 0 (Up counting mode) If M = 0 and M bar = 1, then the AND
gates 1 and 3 in fig. will be enabled
whereas the AND gates 2 and 4 will
be disabled.
Hence QA gets connected to the clock
input of FF-B and QB gets connected
to the clock input of FF-C.
These connections are same as those
for the normal up counter. Thus with
M = 0 the circuit work as an up
counter.
115
Fundamentals of Digital Electronics (BE03003031)
Application of counters
• Frequency counters
• Digital clock
• Time measurement
• A to D converter
• Frequency divider circuits
• Digital triangular wave generator.
The synchronous Ring Counter example above, is preset so that exactly one data bit in the
register is set to logic “1” with all the other bits reset to “0”. To achieve this, a “CLEAR” signal
is firstly applied to all the flip-flops together in order to “RESET” their outputs to a logic “0”
level and then a “PRESET” pulse is applied to the input of the first flip-flop ( FFA ) before the
clock pulses are applied. This then places a single logic “1” value into the circuit of the ring
counter.
So on each successive clock pulse, the counter circulates the same data bit between the four
flip-flops over and over again around the “ring” every fourth clock cycle. But in order to cycle
the data correctly around the counter we must first “load” the counter with a suitable data
pattern as all logic “0’s” or all logic “1’s” outputted at each clock cycle would make the ring
counter invalid.
116
Fundamentals of Digital Electronics (BE03003031)
This type of data movement is called “rotation”, and like the previous shift register, the effect
of the movement of the data bit from left to right through a ring counter can be presented
graphically as follows along with its timing diagram:
Since the ring counter example shown above has four distinct states, it is also known as a
“modulo-4” or “mod-4” counter with each flip-flop output having a frequency value equal to
one-fourth or a quarter (1/4) that of the main clock frequency.
The “MODULO” or “MODULUS” of a counter is the number of states the counter counts or
sequences through before repeating itself and a ring counter can be made to output any modulo
number. A “mod-n” ring counter will require “n” number of flip-flops connected together to
circulate a single data bit providing “n” different output states.
For example, a mod-8 ring counter requires eight flip-flops and a mod-16 ring counter would
require sixteen flip-flops. However, as in our example above, only four of the possible sixteen
states are used, making ring counters very inefficient in terms of their output state usage.
117
Fundamentals of Digital Electronics (BE03003031)
Johnson counter will circulate a single data bit giving sequence of 2n different states and can
therefore be considered as a “mod-2n counter”.
This inversion of Q before it is fed back to input D causes the counter to “count” in a different
way. Instead of counting through a fixed set of patterns like the normal ring counter such as for
a 4-bit counter, “0001”(1), “0010”(2), “0100”(4), “1000”(8) and repeat, the Johnson counter
counts up and then down as the initial logic “1” passes through it to the right replacing the
preceding logic “0”.
A 4-bit Johnson ring counter passes blocks of four logic “0” and then four logic “1” thereby
producing an 8-bit pattern. As the inverted output Q is connected to the input D this 8-bit
pattern continually repeats. For example, “1000”, “1100”, “1110”, “1111”, “0111”, “0011”,
“0001”, “0000” and this is demonstrated in the following table below.
As well as counting or rotating data around a continuous loop, ring counters can also be used
to detect or recognise various patterns or number values within a set of data. By connecting
118
Fundamentals of Digital Electronics (BE03003031)
simple logic gates such as the AND or the OR gates to the outputs of the flip-flops the circuit
can be made to detect a set number or value.
Standard 2, 3 or 4-stage Johnson Ring Counters can also be used to divide the frequency of
the clock signal by varying their feedback connections and divide-by-3 or divide-by-5 outputs
are also available.
For example, a 3-stage Johnson Ring Counter could be used as a 3-phase, 120 degree phase
shift square wave generator by connecting to the data outputs at A, B and NOT-B.
The standard 5-stage Johnson counter such as the commonly available CD4017 is generally
used as a synchronous decade counter/divider circuit.
PROCEDURE:
119
Fundamentals of Digital Electronics (BE03003031)
Conclusion:
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
Suggested References:
Reference Books:
• A. Anand Kumar, '' Fundamentals of Digital Electronics'', PHI Learning Publications.
• M. Morris Mano, " Digital Logic and Computer Design", Pearson Education India.
• R. P. Jain, "Modern Digital Electronics", Tata McGraw-Hill Education.
• Anil K. Maini, "Digital Electronics: Principles and Integrated Circuits", Wiley.
• Malvino& Leach, "Digital Principles and Applications", McGraw-Hill Education.
Reference Websites:
• https://www.tutorialspoint.com/computer_logical_organization/logic_gates.htm
• https://www.electronics-tutorials.ws/logic/logic_4.html
• https://www.javatpoint.com/logic-gates
• http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/index.html
References used by the students:
Rubrics 1 2 3 4 5 Total
Marks
Faculty Sign
120
Fundamentals of Digital Electronics (BE03003031)
Bio-Medical Engineering
Lab Manual
prepared by
Assistant Professor
Biomedical Engineering,
Branch Coordinator
Associate Professor
Biomedical Engineering,
Committee Chairman
Dr. N M Bhatt
L. E. College, Morbi
121