Digital Electronics Laboratory Manual (ECE 2002L) : For 4 Semester B.Tech
Digital Electronics Laboratory Manual (ECE 2002L) : For 4 Semester B.Tech
MANUAL
(ECE 2002L)
For
4thSemester B.Tech
School of Engineering
Itagalpura, Rajanukunte, Yelahanka, Bangalore-
560064
MARCH 2022
3 Experiment No. 3:
Level 1: Construct and verify the HA/FA logic circuits by using
logical gates.
Level 2: Construct and verify the HA logic circuits by using
Universal logic gates.
4 Experiment No. 4:
Level 1: Construct and verify the Half Subtractor /Full Sub
tractor logic circuits by using logical gates.
Level 2: Construct and verify the Half Subtractor logic circuits
by using Universal logic gates.
1 Experiment No. 10: Write the HDL coding for basic sequential
0 logic circuit
Level 1: Gate level Modeling
Level 2: Behavioral Modeling
SAMPLE VIVA
COURSE PREREQUISITES:
Before attempting this course, the student should have prior knowledge of Basic concepts of number representation,
Boolean Algebra
COURSE DESCRIPTION:
The course also enhances the Design, Implementation and Programming abilities through laboratory assignments. The
associated laboratory provides an opportunity to verify the theoretic knowledge.
COURSE OUTCOMES:
On successful completion of the course the students shall be able to
i. Discuss the concepts of number systems, Boolean algebra, and logic gates.
ii. Apply minimization techniques to simplify Boolean expressions.
iii. Demonstrate the Combinational circuits for a given logic.
iv. Illustrate the Sequential and programmable logic circuits.
v. Implement various combinational logic circuits using gates.
vi. Verify the performance of various sequential logic circuits using gates and memory elements.
PO
1 2 3 4 5 10 12
CO
1 H H M H
2 H H M M H
3 H M H M L L
4 H M M L M M
Module 4: Sequential and Programmable logic circuits: Introduction to sequential circuits, Storage
elements: latches and flip flops, Characteristic tables and equations, excitation table, Analysis of clocked
sequential circuits, Mealy & Moore Models of finite state machines - Registers & Counters - HDL Models of
Sequential circuits- ROMs, PLDs & PLAs. Implementation of Digital circuits. [14 hours] [Application]
Number
of Lab
Course
Session Sessions
Sl. Task Skills to be Outcome
Number Task Level 01 Level 2 required
No. No developed to be
and Date to
developed
complete
the task
1
Program
01 1 -- -- 1 -- --
Integration
23/3/2022
Familiarization
1 Introduction to
with Lab Basic idea
02 2 Digital -- 1 1
Equipment and on kits
30/3/2022 Electronics lab
lab components
Construct
basic logic
Verify basic gates using Practical
2 Verify the Logic
logic gates on universal knowledge
03 3 Gates truth 1 1
Digital Logic gates and on basic
6/4/2022 table
Trainer kit. verify using gates
Digital Logic
Trainer kit
Construct a
circuit to
Verify the Verify basic Practical
3 verify De
Boolean Boolean laws on knowledge
04 4 Morgan’s 1 2
Function and Digital Logic on Boolean
13/4/2022 Theorem on
Rules Trainer kit. laws
Digital Logic
Trainer kit.
6 Practice of
07 7 previous -- -- 1 -- --
4/5/2022 experiments
13
14 14 -- Practice Lab -- 1 -- --
22/06/22
DELIVERY PROCEDURE (PEDAGOGY): Lectures will be conducted with aid of Microsoft meeting, or physical or
etc. Assignments based on course contents will be given to the students at the end of each unit/topic and will
be evaluated at regular interval.
REFERENCE MATERIALS:
Text Book(s)
T1: Mano, M. Morris and Ciletti Michael D., “Digital Design”, Pearson Education.
Reference Book(s)
R1: Jain, R. P., “Modern Digital Electronics”, McGraw Hill Education (India).
R2: Roth, Charles H., Jr and Kinney Larry L., “Fundamentals of logic Design”, Cengage Learning.
SL Delivery
Date Title of the Lesson Topics to be covered CO Reference
No Mode
1. Program integration Lecture T1
23/03/2022
MAKEUP POLICY:
If the student misses an evaluation component, he/she may be granted a make-up. In case of an absence that is foreseen,
make-up request should be personally made to the Instructor-in-Charge, well ahead of the scheduled evaluation
Course Completion Remarks &Self-Assessment. [This has to be filled after the completion of the course]
[Please mention about the course coverage details w.r.t. the schedule prepared and implemented. Any specific
suggestions to incorporate in the course content. Any Innovative practices followed and its experience. Any specific
suggestions from the students about the content, Delivery, Evaluation etc.]
Sl.no. Activity Scheduled Completion Date Actual Completion Date Remarks
As listed in the course Schedule
BLOOM'S TAXONOMY
Learning Outcomes Verbs at Each Bloom Taxonomy Level to be used for writing the course Outcomes.
Cognitive Level Illustrative Verbs Definitions
arrange, define, describe, duplicate, identify, label,
list, match, memorize, name, order, outline, remembering previously learned
Knowledge
recognize, relate, recall, repeat, reproduce, select, information
state
classify, convert, defend, discuss, distinguish,
estimate, explain, express, extend, generalize, give
Comprehension example(s), identify, indicate, infer, locate, grasping the meaning of information
paraphrase, predict, recognize, rewrite, report,
restate, review, select, summarize, translate
apply, change, choose, compute, demonstrate,
discover, dramatize, employ, illustrate, interpret,
applying knowledge to actual
Application manipulate, modify, operate, practice, predict,
situations
prepare, produce, relate schedule, show, sketch,
solve, use write
analyze, appraise, breakdown, calculate, categorize,
classify, compare, contrast, criticize, derive,
breaking down objects or ideas into
diagram, differentiate, discriminate, distinguish,
Analysis simpler parts and seeing how the
examine, experiment, identify, illustrate, infer,
parts relate and are organized
interpret, model, outline, point out, question,
relate, select, separate, subdivide, test
arrange, assemble, categorize, collect, combine, rearranging component ideas into a
Synthesis
comply, compose, construct, create, design, new whole
GENERAL INSTRUCTIONS
Lab is used for academic purposes. Therefore, a quiet atmosphere is required and is to
be maintained.
Maintain silence and complete your exercises on time.
Eatables are strictly prohibited inside the lab.
Use of mobile phones inside the lab is strictly prohibited.
Ask lab instructors if you are not sure about what to do with the exercises.
Always maintain awareness of the surrounding activities and walk in aisles to the
extent possible.
Maintain clean and orderly laboratory manual/data sheet.
After the class, before you leave the laboratory, log out from your account and arrange
the chairs in proper place.
Before coming to the laboratory, complete the evaluation of the previous week’s exercises
with the faculty signature on the contents page.
Prior permission is needed to bring Laptop inside the Lab
Unauthorized copying and or installing of unauthorized software are strictly prohibited.
Tampering with the hardware or software settings is strictly prohibited.
Visitors are required to take prior permission for visiting the lab.
Do not leave your personal belongings inside the Lab
Safety first
Self-Protection
Others Protection
Equipment Protection
Accident Reporting
All accidents or near misses must be reported to the administrator by those concerned
or involved immediately.
Responsibility
TOOLS REQUIRED
One of the reasons for widespread application of digital systems is use of Digital computers in
applications which provides users with flexibility as any change can be incorporated with
the change in system software thus reducing cost which also is an additional advantage.
Discrete Information used by digital systems is represented in form of signals which can be
classified as Discrete or Continuous signals and systems can be classified as Analog and digital
systems.
Discrete information is a finite set like outcome of throwing dice with the output possibilities as
1, 2,3,4,5 or 6. The discrete signals used in electronics systems have two discrete values either 0
or 1. In other words it can be said that outcome can be mapped to two outcomes either 0 or 1.
Each binary digit 0 and 1 is called as a bit and group of bits that represent the information in
digital form are called binary codes. Most of the information is in analog form and to represent it
in digital form it has to be converted and the device used for this known as Analog to Digital
converter (ADC) and at the receiver side the same information has to be converted to analog form
using Digital to Analog Converter (DAC).
5.Design is easy
The design of digital systems which require use of Boolean algebra and other digital techniques is
easier compared to analog designing.
5. Result can be reproduced easily Since the output of digital systems unlike analog systems is
independent of temperature, noise, humidity and other characteristics of components the
reproducibility of results is higher in digital systems than in analog systems.
Experiment-1
LOGIC GATES
Digital systems are said to be constructed by using logic gates. The basic gates are the AND, OR,
NOT gates. The basic operations are described below with the aid of tables in the following,
called truth tables.
The AND gate is an electronic circuit that gives a high output (1) only if all its inputs are high. A
dot (.)
is used to show the AND operation i.e. A.B. Bear in mind that this dot is sometimes omitted
i.e. AB
(ii) OR GATE
The OR gate is an electronic circuit that gives a high output (1) if one or more of its inputs are
high. A
plus (+) is used to show the OR operati
Table 3: Truth Table of AND Gate and OR Gate Fig.3: AND Gate and OR Gate switch connection
The NOT gate is an electronic circuit that produces an inverted version of the input at its
output. It is also known as an inverter. If the input variable is A, the inverted output is known
as NOT A. This is also shown as A', or A with a bar over the top, as shown at the outputs.
Another useful gate used in the digital logic circuits is EXOR gate.
(iv) EXOR GATE
The 'Exclusive-OR' gate is a circuit which will give a high output if either, but not both, of its
two inputs are high. An encircled plus sign ( ) is used to show the EOR operation.
In NOR gate, the output is true if BOTH input A and input B are NOT true, giving the Boolean Expression
of Out = NOT (A OR B) .
In NAND gate, the output Q is true if BOTH input A and input B are NOT true, giving the Boolean
Expression of Q = NOT (A AND B).
(a)TRANSFORMATION OF NOR GATE INTO BASIC LOGIC GATES:
Theory: A set of rules or Laws of Boolean Algebra expressions have been invented to help reduce the number
of logic gates needed to perform a particular logic operation resulting in a list of functions or theorems known
commonly as the Laws of Boolean Algebra. Boolean Algebra is the mathematics we use to analyse digital gates
and circuits. We can use these “Laws of Boolean” to both reduce and simplify a complex Boolean expression
in an attempt to reduce the number of logic gates required. Boolean Algebra is therefore a system of
mathematics based on logic that has its own set of rules or laws which are used to define and reduce Boolean
expressions. The variables used in Boolean Algebra only have one of two possible values, a logic “0” and a logic
“1” but an expression can have an infinite number of variables all labelled individually to represent inputs to
the expression, For example, variables A, B, C etc, giving us a logical expression of A + B = C, but each variable
can ONLY be a 0 or a 1. Examples of these individual laws of Boolean, rules and theorems for Boolean Algebra
are given in the following table.
LEVEL-1: Verify Boolean laws on trainer kit using truth table with the help of Basic Gates
Associative law (Basic gate)
(A.B).C=A.(B.C)
A+(B+C)=(A+B)+C
A.(B+C)=(A.B)+(A.C)
Associative law (Basic gate)
A B C AB (AB)C BC A(BC)
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
A+(B+C)=(A+B)+C
A.(B+C)=(A.B)+(A.C)
TRUTH TABLE:
LOGICAL CIRCUIT:
LEVEL-2
Verify De Morgan’s on trainer kit using truth table with the help of logical gates
(A.B)’ = A’+B’
(A+B+C)’=A’.B’.C’
RESULT:
Experiment No. 3:
Aim:
Level 1: Construct and verify the HA/FA logic circuits by using logical gates.
Level 2: Construct and verify the HA logic circuits by using Universal logic gates.
Theory:
A half adder is a type of adder, an electronic circuit that performs the addition of numbers. The half
adder is able to add two single binary digits and provide the output plus a carry value. It has two inputs, called A
and B, and two outputs S (sum) and C (carry).
Logical expressions:
Sum=A’B+AB’= A XOR B
Carry = AB
Circuit implementation:
FULL ADDER CIRCUIT: Full Adder is the adder which adds three inputs and produces two outputs.
The first two inputs are A and B and the third input is an input carry as C-IN. The output carry is
designated as C-OUT and the normal output is designated as S which is SUM.
LOGICAL CIRCUIT:
Level 1: Construct and verify the HA/FA logic circuits by using logical gates.
CIRCUIT:
HALF ADDER:
FULL ADDER:
Level 2: Construct and verify the HA logic circuits by using Universal logic gates.
RESULT:
Experiment No. 4
Aim:
Level 1: Construct and verify the Half Subtractor /Full Subtractor logic circuits by using logical
gates.
Level 2: Construct and verify the Half Subtractor logic circuits by using Universal logic gates.
THEORY:
Half Subtractor is a combinational logic circuit.
It is used for the purpose of subtracting two single bit numbers.
It contains 2 inputs and 2 outputs (difference and borrow).
BLOCK DIAGRAM:
TRUTH TABLE:
LOGICAL EXPRESSION:
LOGICAL CIRCUIT:
Full Subtractor-:
Full Subtractor is a combinational logic circuit.
It is used for the purpose of subtracting two single bit numbers.
It also takes into consideration borrow of the lower significant stage.
Thus, full subtractor has the ability to perform the subtraction of three bits.
Full subtractor contains 3 inputs and 2 outputs (Difference and Borrow) as shown-
BLOCK DIAGRAM:
TRUTH TABLE:
LOGICAL EXPRESSION:
FULL SUBTRACTOR:
Level 2: Construct and verify the Half Subtractor logic circuits by using Universal logic gates.
Procedure
1. Place the IC on IC Trainer Kit.
2. Connect VCC and ground to respective pins of IC Trainer Kit.
3. Implement the circuit as shown in the circuit diagram.
4. Connect the inputs to the input switches provided in the IC Trainer Kit.
5. Connect the outputs to the switches of O/P LEDs
6. Apply various combinations of inputs according to the truth table and observe the condition of LEDs.
7. Note down the corresponding output readings for various combinations of inputs.
8. Power Off Trainer Kit, disconnect all the wire connections and remove IC's from IC-Base.
RESULT:
Experiment No. 5:
AIM: Construct and verify the combinational logic circuit for given specifications.
Level 1: Specifications given in the form of Truth table. Implement using basic gates.
Level 2: Specification should be extracted from the given scenario. Implement using universal gates only.
An Engine has 4 failsafe sensors. The Engine should keep running unless any of the following conditions
arise:
If sensor 1 is activated.
If sensor 2 and sensor 3 are activated at the same time.
If sensor 4 and sensor 3 are activated at the same time.
If sensors 2, 3, 4 are activated at the same time.
0 0 0 0 1
0 0 0 1 1
0 0 1 0 1
0 0 1 1 0
0 1 0 0 1
0 1 0 1 1
0 1 1 0 0
0 1 1 1 0
1 0 0 0 0
1 0 0 1 0
1 0 1 0 0
1 0 1 1 0
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 0
II)Aim: Design of Combinational Logic Circuit based on the below mentioned Scenario
A digital system is to be designed in which the month of the year is given as input is four bit form. The
month January is represented as ‘0000’, February ‘0001’ and so on. The output of the system should be
‘1’ corresponding to the input of the month containing 31 days or otherwise it is ‘0’. Consider the excess
numbers in the input beyond ‘1011’ as don't care conditions for system of four variables (A, B, C, D).
Design and implement the simplified logic using
i. Basic gates only
ii. NAND Gates only (2 or 3 Input Gate)
SOLUTION:
a) TRUTH TABLE :
A B C D Y
0 0 0 0 1
0 0 0 1 0
0 0 1 0 1
0 0 1 1 0
0 1 0 0 1
0 1 0 1 0
0 1 1 0 1
0 1 1 1 1
1 0 0 0 0
1 0 0 1 1
1 0 1 0 0
1 0 1 1 1
1 1 0 0 X
1 1 0 1 X
1 1 1 0 X
1 1 1 1 X
b) SIMPLIFICATION USING K-MAP :
c) DESIGN OF LOGIC DIAGRAM USING NAND GATES :
THEORY: The SR flip-flop is one of the fundamental parts of the sequential circuit logic. SR flip-
flop is a memory device and a binary data of 1 – bit can be stored in it. SR flip-flop has two stable states
in which it can store data in the form of either binary zero or binary one. Like all flip-flops, an SR flip-
flop is also an edge sensitive device. SR flip–flop is one of the most vital components in digital logic
and it is also the most basic sequential circuit that is possible. The S and R in SR flip-flop means ‘SET’
and ‘RESET’ respectively. Hence it is also called Set–Reset flipflop. The symbolic representation of
the SR Flip Flop is shown below.
Working Principle: SR flip-flop works during the transition of clock pulse either from low to
high or from high to low (depending on the design) i.e. it can be either positive edge triggered or
negative edge triggered. For a positive edge triggered SR flip-flop, suppose, if S input is at high level
(logic 1) and R input is at low level (logic 0) during a low to high transition on clock pulse, then the SR
flip-flop is said to be in SET state and the output of the SR flip-flop is SET to 1. For the same clock
situation, if the R input is at high level (logic 1) and S input is at low level (logic 0), then the SR flip-
flop is said to be in RESET state and the output of the SR flip-flop is RESET to 0. The SR flip-flops
can be designed by using logic gates like NOR gates and NAND gates. S-R Flip-Flop Using NAND
Gate SR flip flop can be designed by cross coupling of two NAND gates. It is an active low input SR
flip-flop. The circuit of SR flip-flop using NAND gates is shown in below figure:
PROCEDURE:
(i) Connections are given as per circuit diagram.
(ii) Logical inputs are given as per circuit diagram.
(iii) Observe the output and verify the truth table.
RESULT: Design of S-R Flip flop using NAND & NOR gates was verified successfully.
CLK S R Q Q’ CONDITION
0 X X Q Q’ PREVIOUS STATE
1 0 0 Q Q’ PREVIOUS STATE
1 0 1 0 1 RESET
1 1 0 1 0 SET
1 1 1 Z Z’ UNDEFINED STATE
EXCITATION TABLE FOR DFF
QN QN+1 D
0 0 0
0 1 1
1 0 0
1 1 1
D=QN+1
m0 0 0 0 0 0
m1 0 0 1 1 1
m2 0 1 0 0 0
m3 0 1 1 0 0
m4 1 0 0 1 1
m5 1 0 1 1 1
m6 1 1 0 X X
m7 1 1 1 X X
RESULT:
The flip-flop is constructed in such a way that the output Q is ANDed with K and CP. This arrangement
is made so that the flip-flop is cleared during a clock pulse only if Q was previously 1. Similarly, Q’ is
ANDed with J and CP, so that the flip-flop is cleared during a clock pulse only if Q’ was previously 1.
When J = K = 0
When both J and K are 0, the clock pulse has no effect on the output and the output of the flip-flop is
the same as its previous value. This is because when both the J and K are 0, the output of their respective
AND gate becomes 0.
When J=0, K=1
ii. Master Slave Configuration: To design and verify the circuit in which 2 JK FF are connected
together in series and output of first FF is connected to input of second FF.
RESULT:
Thus, the J-K Flip flop was designed and truth table is verified.
An ‘N’ bit Asynchronous binary up counter consists of ‘N’ T flip-flops. It counts from 0 to 2𝑁 −
1. The block diagram of 3-bit Asynchronous binary up counter is shown in the following
figure.
CLK Q2 Q1 Q0
0 0 0 0
1 0 0 1
1 0 1 0
1 0 1 1
1 1 0 0
1 1 0 1
1 1 1 0
1 1 1 1
An ‘N’ bit Asynchronous binary down counter consists of ‘N’ T flip-flops. It counts from 2𝑁 −
1 to 0. The block diagram of 3-bit Asynchronous binary down counter is shown in the
following figure.
The block diagram of 3-bit Asynchronous binary down counter is similar to the block diagram
of 3-bit Asynchronous binary up counter. But, the only difference is that instead of
connecting the normal outputs of one stage flip-flop as clock signal for next stage flip-flop,
connect the complemented outputs of one stage flip-flop as clock signal for next stage flip-
flop. Complemented output goes from 1 to 0 is same as the normal output goes from 0 to 1.
TRUTH TABLE OF DOWN COUNTER:
CLK Q2 Q1 Q0
0 1 1 1
1 1 1 0
1 1 0 1
1 1 0 0
1 0 1 1
1 0 1 0
1 0 0 1
1 0 0 0
IT REQUIRES NO OF FF –3
3BIT--- (000-111)
EXCITATION TABLE:
Q2/Q1Q0 00 01 11 10
0 1
1 x x x x
J2 = Q1 Q0
K-MAP FOR K2
Q2/Q1Q0 00 01 11 10
0 X X X X
1 1
K2 =Q1 Q0
K-MAP FOR J1
Q2/Q1Q0 00 01 11 10
0 1 X X
1 1 X X
J1=Q0
K-MAP FOR K1
Q2/Q1Q0 00 01 11 10
0 X X 1
Q2/Q1Q0 00 01 11 10
0 X 1 X 1
1 1 X 1 X
JO=K0=1
OUTPUT EXPRESSION
J3 = K3 =Q2 Q1 Q0(4 BIT –SYNCHRONOUS COUNTER)
J2=K2=Q1Q0
J1=K1=Q0
J0=K0=1
LOGICAL DIGRAM OF 3BIT SYNCHRONOUS COUNTER USING JKFF
Level 1: Write verilog code for basic/universal gates and their test bench for verification .
Observe the waveform.
THEORY :
• AND GATE: The output of an AND gate is equal to 1 only if both inputs are equal to
1. An AND gate can have many inputs. In any case, no matter how many inputs it has, the
output is only equal to 1 if all the inputs are equal to 1, otherwise the output is 0.
• OR GATE: The output of an OR gate is equal to 1 if either of the input is equal to
one. If neither of the inputs is equal to 1, the output is equal to zero. An OR gate can have as
many inputs as we want. The output will be equal to 1 if any of the inputs is equal to 1.
• EX-OR GATE: The output of an XOR gate is equal to 1 if any one of the input is
equal to one and equal to zero if both inputs are equal to zero or if both inputs are equal to
1. This is the difference between an OR gate and an XOR gate, an OR gates output will equal
1 if both inputs are equal to 1.
• EX-NOR GATE: whose function is the inverse of the exclusive or (xor) gate .The
output is one when both the inputs are same .the output is zero when the inputs are
complementary to each other.
• NAND GATE:NAND gate behaves the same as an AND gate with a not (inverter)
gate connected to the output terminal. to symbolize this output signal inversion, the nand
gate symbol has a bubble on the output line. the output will be "low" (0) if and only if all
inputs are "high" (1). if any input is "low" (0), the output will go "high" (1).
• NOR GATE:NOR gate behaves the same as an or gate with a not(inverter) gate
connected to the output terminal. The output will be low(1) if and only if all inputs are low(0
and if any input is high(1),the output will go low(0).
Expected waveform: