Professional Documents
Culture Documents
This document is confidential and intended solely for the educational purpose of
RMK Group of Educational Institutions. If you have received this document
through email in error, please notify the system manager. This document
contains proprietary information and is intended only to the respective group /
learning community as intended. If you are not the addressee you should not
disseminate, distribute or copy through e-mail. Please notify the sender
immediately by e-mail if you have received this document by mistake and delete
this document from your system. If you are not the intended recipient you are
notified that disclosing, copying, distributing or taking any action in reliance on
the contents of this information is strictly prohibited.
CS8351 DIGITAL
PRINCIPLES AND SYSTEM
DESIGN
Department: COMPUTER SCIENCE AND ENGINEERING
Batch/Year: BATCH 2019-23/II
Created by:
Dr. Sandra Johnson, Professor, CSE, RMKEC
Dr. S Selvi , Professor, CSE, RMKEC
Dr. B PrathushaLaxmi , ASP, IT, RMKEC
Dr. M A Berlin , ASP, CSE, RMDEC
Ms. J Geethapriya , AP, CSE, RMDEC
Dr. V Prasanna Srinivasan , ASP, IT, RMDEC
Ms P Prem Priya , AP, CSE, RMKCET
117 Contents 5
2 Course Objectives 6
6 CO-PO/PSO Mapping 14
Lecture Plan (S.No., Topic, No. of Periods, Proposed
7 date, Actual Lecture Date, pertaining CO, Taxonomy 16
level, Mode of Delivery)
8 Activity based learning 18
Lecture Notes ( with Links to Videos, e-book reference,
9 20
PPTs, Quiz and any other learning materials )
Assignments ( For higher level learning and Evaluation
10 140
- Examples: Case study, Comprehensive design, etc.,)
11 Part A Q & A (with K level and CO) 142
OBJECTIVES:
• To design digital circuits using simplified Boolean functions
• To analyze and design combinational circuits
• To analyze and design synchronous and asynchronous sequential circuits
• To understand Programmable Logic Devices
• To write HDL code for combinational and sequential circuits
TOTAL : 60 PERIODS
Course Outcomes
Course Outcomes
Course Description Knowledge
Outcomes Level
Design Digital Circuits using simplified Boolean
CO1 K4
functions
CO2 Analyze and Design Combinational Circuits K4
K6 Evaluation
K5 Synthesis
K4 Analysis
K3 Application
K2 Comprehension
K1 Knowledge
CO – PO/PSO Mapping
CO – PO /PSO Mapping Matrix
CO PO PO PO PO PO PO PO PO PO PO PO PO PS PS PS
1 2 3 4 5 6 7 8 9 10 11 12 O1 O2 03
1 3 2 1 1 3
2 3 3 2 2 3
3 3 3 2 2 3
4 3 3 2 2 3
5 3 3 2 2 3
6 3 2 1 1 3
Lecture Plan
Unit III
Lecture Plan – Unit 3 - SYNCHRONOUS
SEQUENTIAL LOGIC
Sl. Topic Numbe Proposed Actual CO Taxo Mode
No r of Date Lecture nomy of
. Period Date Level Deliver
s y
1 Sequential 2 CO3 K4 PPT /
Circuits - Online
Storage Lecture
Elements:
Latches ,
Flip-Flops
2 Analysis of 2 CO3 K4 PPT /
Clocked Online
Sequential Lecture
Circuits -
State
Reduction
and
Assignment
3 Design 2 CO3 K4 PPT /
Procedure Online
Lecture
4 Registers 2 CO3 K4 PPT /
and Online
Counters Lecture
1 Quiz – 1 65
Shift Registers
Serial In − Serial Out shift register
Serial Addition
Serial Transfer
13 109
Register with Parallel load
Serial Adder using JK Flip Flop
The digital circuits considered thus far have been combinational—their output
depends only and immediately on their inputs—they have no memory, i.e.,
dependence on past values of their inputs.
Sequential circuits, however, act as storage elements and have memory. They can
store, retain, and then retrieve information when needed at a later time.
The output of a sequential circuit is a function of both the inputs and the present
state of the storage elements.
The binary information stored in these elements at any given time defines the
state of the sequential circuit at that time.
1. SEQUENTIAL CIRCUITS
The sequential circuit receives binary information from external inputs that,
together with the present state of the storage elements, determine the binary
value of the outputs.
These external inputs also determine the condition for changing the state in the
storage elements.
The generation of output is not governed by clock signal. The storage elements
commonly used in asynchronous sequential circuits are time-delay devices.
A Storage element is a digital circuit that can maintain a binary state indefinitely
until directed by an input signal to switch states.
1. Latches
2. Flip Flops
A clock pulse goes through two transitions: from 0 to 1 (called as positive edge)
and the return from 1 to 0 (called as negative edge)
The circuit will become operational when the signal transits from Level 0 to Level 1
The circuit will become operational when the signal transits from Level 1 to Level 0
3. LATCHES - SR LATCH WITH NOR GATES
3.1 SR LATCH
The SR latch is a circuit with two cross-coupled NOR gates or two cross-coupled
NAND gates, and two inputs labelled S for set and R for reset.
The latch has two useful states. When output Q = 1 and Q‘ = 0, the latch is said
to be in the set state . When Q = 0 and Q‘ = 1, it is in the reset state .
Initially, both inputs of this latch remain at 0, unless the state has to be changed.
The application of a ‗1‘ to the S input causes the latch to shift to the SET state
and the outputs of the latch are Q=1 and Q‘=0.
When the S input goes back to ‗0‘ , the previous state of Q and Q‘ are retained by
the latch. Here, the latch remains in the ‗Set‘ state.
After both inputs return to ‗0‘, it is then possible to shift to the RESET state by
applying a ‗1‘ to the R input.
In this case, the outputs of the latch are Q=0 and Q‘=1.
When the R input goes back to ‗0‘ , the previous state of Q and Q‘ are retained by
the latch. Here, the latch remains in ‗Reset‘ state.
Thus, when both inputs S and R are equal to 0, the latch can be in either the set
or the reset state, depending on which input (S or R) was most recently a ‗1‘.
If a ‗1‘ is applied to both the S and R inputs of the latch, both outputs go to ‗0‘.
(i.e. Q and Q‘ are not mutually complement of each other).
The latch has two useful states. When output Q = 0 and Q‘ = 1, the latch is said
to be in the set state . When Q = 1 and Q = 0, it is in the reset state .
Initially, both inputs of this latch remain at 1, unless the state has to be changed.
The application of a ‗0‘ to the S input causes the latch to shift to the SET state
and the outputs are Q=1 and Q‘=0.
3.1.2 SR LATCH WITH NAND GATES (S’R’ LATCH)
When the S input goes back to ‗1‘ , the previous state of Q and Q‘ are retained by
the latch. Here, the latch remains in ‗Set‘ state.
After both inputs return to ‗1‘, it is then possible to shift to the RESET state by
applying a ‗0‘ to the R input.
In this case, the outputs of the latch are Q=0 and Q‘=1.
When the R input goes back to ‗1‘ , the previous state of Q and Q‘ are retained by
the latch. Here, the latch remains in ‗Reset‘ state.
Thus, when both inputs S and R are equal to ‗1‘, the latch can be in either the set
or the reset state, depending on which input(S or R) was most recently a ‗0‘.
If a ‗0‘ is applied to both the S and R inputs of the latch, both outputs go to ‗1‘
(i.e. Q and Q‘ are not mutually complement of each other).
When comparing the NAND with the NOR latch, it is noted that the input signals
for the NAND require the complement of those values used for the NOR latch.
Because the NAND latch requires a 0 signal to change its state, it is sometimes
referred to as an S’R’ latch.
3.1.3 SR LATCH WITH CONTROL INPUT
An SR latch with a control input consists of the basic SR latch and two additional
NAND gates.
The control input En acts as an enable signal for the other two inputs.
The outputs of the NAND gates stay at the logic-1 level as long as the enable
signal remains at 0.
When the enable input goes to 1, information from the S or R input is allowed to
affect the latch.
When En=1,S=0, R=0, the state of the circuit does not change
Working of D Latch
The D input goes directly to the S input, and its complement is applied to the R
input.
As long as the enable input is at 0, the cross-coupled SR latch has both inputs at
the 1 level and the circuit cannot change state regardless of the value of D .
It is named as D latch because of its ability to hold data in its internal storage.
It is suited for use as a temporary storage for binary information between a unit
and its environment.
The binary information present at the data input of the D latch is transferred to
the Q output when the enable input is asserted.
As long as the enable input is asserted, the output follows changes in the data
input.
This situation provides a path from input D to the output, and for this reason, the
circuit is often called a transparent latch.
When the enable input signal is de-asserted, the binary information that was
present at the data input at the time the transition occurred is retained (i.e.,
stored) at the Q output until the enable input is asserted again.
3.2 EDGE TRIGGERED MASTER SLAVE D- FLIP FLOP
A D flip-flop is constructed with two D latches and an inverter
Graphic symbol of Edge triggered D-Flip Flop
The first latch is called the master and the second the slave. The circuit samples
the D input and changes its output Q only at the negative edge of the
synchronizing or controlling clock (designated as Clk ).
When the clock is 0, the output of the inverter is 1. The slave latch is enabled,
and its output Q is equal to the master output Y . The master latch is disabled
because Clk = 0.
When the clock is 1, the data from the external D input are transferred to the
master. The slave, however, is disabled as long as the clock remains at the 1 level,
because its enable input is equal to 0.
Any change in the input changes the master output at Y, but cannot affect the
slave output.
3.2 EDGE TRIGGERED MASTER SLAVE D- FLIP FLOP
When the clock pulse returns to 0, the master is disabled and is isolated from the
D input.
At the same time, the slave is enabled and the value of Y is transferred to the
output of the flip-flop at Q .
Thus, a change in the output of the flip-flop can be triggered only by and during
the transition of the clock from 1 to 0.
(2) A change in the output is triggered by the negative edge of the clock
(3) The change may occur only during the clock‘s negative level. The value that is
produced at the output of the flip-flop is the value that was stored in the master
stage immediately before the negative edge occurred
Two latches respond to the external D (data) and Clk (clock) inputs. The third
latch provides the outputs for the flip-flop.
Initially, the S and R inputs of the output latch are maintained at the logic-1 level
when Clk = 0. This causes the output to remain in its present state.
If D = 1 when Clk goes from 0 to 1, S changes to 0. This causes the flip flop
to go to the set state(S=0), making Q = 1. If there is any change in D input while
Clk = 1, S remains at 0. Thus, the Flip flop output is not affected.
When the clock returns from 1 to 0, the output of the Flip flop is not affected
and remains in its present state
A negative transition of the clock (1 to 0) does not affect the output, nor is the
output affected by changes in D when Clk is in the steady logic-1 level or the
logic-0 level. Hence, this type of flip-flop responds to the transition from 0 to 1
and nothing else.
4. FLIP FLOP
JK means Jack Kilby, Texas Instrument (TI) Engineer, who invented IC in 1958. JK
Flip-Flop has two inputs J(set) and K(reset). A JK Flip-Flop can be obtained from
the clocked SR Flip-Flop by augmenting two AND gates as shown below.
The data input J and the output Q‘ are applied o the first AND gate and its
output (JQ‘) is applied to the S input of SR Flip-Flop. Similarly, the data
input K and the output Q are applied to the second AND gate and its
output (KQ) is applied to the R input of SR Flip-Flop.
J= K= 0
When J=K= 0, both AND gates are disabled. Therefore clock pulse have no
effect, hence the Flip-Flop output is same as the previous output.
4.1 JK FLIP FLOP
J= 0, K= 1
Inputs Output
CLK State
J K Qn+1
No
1 0 0 Qn
Change
1 0 1 0 Reset
1 1 0 1 Set
1 1 1 Qn‘ Toggle
4.1 JK FLIP FLOP
The characteristic table for JK Flip-Flop is shown in the table below. From the
table, K-map for the next state transition (Qn+1) can be drawn and the simplified
logic expression which represents the characteristic equation of JK Flip-Flop can
be found.
Qn J K Qn+1
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
T FLIP FLOP
When T= 0, Qn+1= Qn, ie., the next state is the same as the present state and no
change occurs.
When T= 1, Qn+1= Qn‘, i.e., the next state is the complement of the present
state.
4.2 T FLIP FLOP
T Qn+1 State
0 Qn No Change
1 Qn‘ Toggle
The characteristic table for T Flip-Flop is shown below and characteristic equation is
derived using K-map.
Qn T Qn+1
0 0 0
0 1 1
1 0 1
1 1 0
K-map Simplification:
When the clock pulse has a positive edge, the master acts according to its J- K
inputs, but the slave does not respond, since it requires a negative edge at the
clock input.
When the clock input has a negative edge, the slave Flip-Flop copies the master
outputs. But the master does not respond since it requires a positive edge at its
clock input.
The clocked master-slave J-K Flip-Flop using NAND gates is shown below.
4.2 APPLICATION TABLE OR EXCITATION TABLE FOR
FLIP FLOPS
The characteristic table is useful for analysis and for defining the operation of
the Flip-Flop. It specifies the next state (Qn+1) when the inputs and present state
are known.
SR FLIP FLOP
1 1 1 x
The following table is the excitation table for SR Flip-Flop. It consists of present
state (Qn), next state (Qn+1) and a column for each input to show how the
required transition is achieved.
4.2 APPLICATION TABLE OR EXCITATION TABLE FOR
FLIP FLOPS
There are 4 possible transitions from present state to next state. The required
Input conditions for each of the four transitions are derived from the information
available in the characteristic table. The symbol ‗x‘ denotes the don‘t care
condition, it does not matter whether the input is 0 or 1.
Present Next
Inputs
State State
Qn Qn+1 S R
0 0 0 x
0 1 1 0
1 0 0 1
1 1 x 0
Similar analysis can be done for JK, D and T flip flops for obtaining the respective
excitation tables
JK FLIP FLOP
D FLIP FLOP
Qn T Qn+1 Qn Qn+1 T
0 0 0 0 0 0
0 1 1 0 1 1
1 0 1 1 0 1
1 1 0 1 1 0
5. MODELS FOR REPRESENTING SEQUENTIAL
CIRCUITS
• Mealy model: The output depends on both the present state of the Flip-Flops
and on the inputs.
Moore model
In the Moore model, the outputs are a function of the present state of the
Flip- Flops only. The output depends only on present state of Flip-Flops, it
appears only after the clock pulse is applied, i.e., it varies in synchronism
with the clock input.
Mealy model
In the Mealy model, the outputs are functions of both the present state of the
Flip-Flops and inputs.
5. MEALY & MOORE MODEL
Sl.
Moore model Mealy model
No
Its output is a function of present Its output is a function of present
1
state only. state as well as present input.
Input changes does not affect the Input changes may affect the output
2
output. of the circuit.
It requires more number of states It requires less number of states for
3
for implementing same function. implementing same function.
The behavior of a sequential circuit is determined from the inputs, outputs and
the state of its Flip-Flops. The outputs and the next state are both a function of
the inputs and the present state.
State Diagram
In the state diagram, a state is represented by a circle and the transition between
states is indicated by directed lines connecting the circles.
A directed line connecting a circle with circle with itself indicates that next state is
same as present state.
The binary number inside each circle identifies the state represented by the circle.
6. ANALYSIS OF SYNCHRONOUS SEQUENTIAL CIRCUITS
In case of Moore circuit, the directed lines are labeled with only one binary
number representing the state of the input that causes the state transition. The
output state is indicated within the circle, below the present state because output
state depends only on present state and not on the input.
State diagram for Mealy circuit State diagram for Moore circuit
State Table
State table represents relationship between input, output and Flip-Flop states.
It consists of three sections labeled present state, next state and output.
The present state designates the state of Flip-Flops before the occurrence of a
clock pulse, and the output section gives the values of the output variables during
the present state.
Both the next state and output sections have two columns representing two
possible input conditions: X= 0 and X=1.
6. ANALYSIS OF SYNCHRONOUS SEQUENTIAL CIRCUITS
In case of Moore circuit, the output section has only one column since output
does not depend on input.
State Diagram
The Flip-Flops may be of any type and the logic diagram may or may not include
combinational circuit gates.
6. ANALYSIS OF SYNCHRONOUS SEQUENTIAL CIRCUITS
Write the excitation input functions for each Flip-Flop and also write the Moore/
Substitute the excitation input functions into the bistable equations for the Flip-
Obtain the state table and reduced form of the state table.
Draw the state diagram by using the second form of the state table.
1. A sequential circuit has two JK Flip-Flops A and B, one input (x) and one
output (y). the Flip-Flop input functions are,
JA= B+ x JB= A’+ x’
K A= 1 K B= 1
and the circuit output function, Y= xA’B.
a) Draw the logic diagram of the Mealy circuit,
b) Tabulate the state table,
c) Draw the state diagram.
6. ANALYSIS OF SYNCHRONOUS SEQUENTIAL CIRCUITS
Solution
Logic Diagram
State Table
To obtain the next-state values of a sequential circuit with JK Flip-Flops, use the JK
Flip-Flop characteristics table.
Present
Input Flip-Flop Inputs Next state Output
state
A B x JA= B+ x KA= 1 JB= A’+ x’ KB= 1 A(t+1) B(t+1) Y= xA’B
0 0 0 0 1 1 1 0 1 0
0 0 1 1 1 1 1 1 1 0
0 1 0 1 1 1 1 1 0 0
0 1 1 1 1 1 1 1 0 1
1 0 0 0 1 1 1 0 1 0
1 0 1 1 1 0 1 0 0 0
1 1 0 1 1 1 1 0 0 0
1 1 1 1 1 0 1 0 0 0
6. ANALYSIS OF SYNCHRONOUS SEQUENTIAL CIRCUITS
State Diagram
2. A sequential circuit with two ‗D‘ Flip-Flops A and B, one input (x) and
one output (y). the Flip-Flop input functions are:
DA= Ax+ Bx
DB= A’x and the circuit output function is,
Y= (A+ B) x’.
(a) Draw the logic diagram of the circuit,
(b) Tabulate the state table,
(c) Draw the state diagram.
6. ANALYSIS OF SYNCHRONOUS SEQUENTIAL CIRCUITS
Solution
Logic Diagram
State Table
Present
Input Flip-Flop Inputs Next state Output
state
D A= D B= Y=
A B x A(t+1) B(t+1)
Ax+Bx A’x (A+B)x’
0 0 0 0 0 0 0 0
0 0 1 0 1 0 1 0
0 1 0 0 0 0 0 1
0 1 1 1 1 1 1 0
1 0 0 0 0 0 0 1
1 0 1 1 0 1 0 0
1 1 0 0 0 0 0 1
1 1 1 1 0 1 0 0
6. ANALYSIS OF SYNCHRONOUS SEQUENTIAL CIRCUITS
State Diagram
3. Analyze the synchronous Mealy machine and obtain its state diagram
6. ANALYSIS OF SYNCHRONOUS SEQUENTIAL CIRCUITS
Solution
The given synchronous Mealy machine consists of two D Flip-Flops, one inputs and
one output.
State Table
Present
Input Flip-Flop Inputs Next state Output
state
DA= D B= Y1 Y2 Z=
Y1 Y2 X
Y1’Y2X’ X+ Y1’Y2 (t+1) (t+1) Y1Y2X
0 0 0 0 0 0 0 0
0 0 1 0 1 0 1 0
0 1 0 1 1 1 1 0
0 1 1 0 1 0 1 0
1 0 0 0 0 0 0 0
1 0 1 0 1 0 1 0
1 1 0 0 0 0 0 0
1 1 1 0 1 0 1 1
6. ANALYSIS OF SYNCHRONOUS SEQUENTIAL CIRCUITS
0 0 0 0 0 1 0 0
0 1 1 1 0 1 0 0
1 0 0 0 0 1 0 0
1 1 0 0 0 1 0 1
State Diagram
4. A sequential circuit has two JK Flop-Flops A and B, two inputs x and y and one
output z. The Flip-Flop input equation and circuit output equations are
JB = A' x KB = A+ xy'
Solution
Logic Diagram
6. ANALYSIS OF SYNCHRONOUS SEQUENTIAL CIRCUITS
Solution
State Table
Present
Input Flip-Flop Inputs Next state Output
state
JA= KA= JB= KB=
A B x y A(t+1) B(t+1) z
Bx+B’y’ B’xy’ A’x A+xy’
0 0 0 0 1 0 0 0 1 0 0
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 1 1 1 1 1 0
0 0 1 1 0 0 1 0 0 1 0
0 1 0 0 0 0 0 0 0 0 1
0 1 0 1 0 0 0 0 0 0 0
0 1 1 0 1 0 1 1 1 1 0
0 1 1 1 1 0 1 0 1 1 0
1 0 0 0 1 0 0 1 1 0 1
1 0 0 1 0 0 0 1 1 0 0
1 0 1 0 1 1 0 1 0 0 0
1 0 1 1 0 0 0 1 1 0 0
1 1 0 0 0 0 0 1 1 0 1
1 1 0 1 0 0 0 1 1 0 0
1 1 1 0 1 0 0 1 1 0 0
1 1 1 1 1 0 0 1 1 0 0
6. ANALYSIS OF SYNCHRONOUS SEQUENTIAL CIRCUITS
State Equations
5. A sequential circuit has two JK Flip-Flop A and B. the Flip-Flop input functions are:
JA= B JB= x’
Solution
Logic Diagram
6. ANALYSIS OF SYNCHRONOUS SEQUENTIAL CIRCUITS
Solution
State Table
Present
Input Flip-Flop Inputs Next state
state
K A= K B=
A B x JA= B JB= x’ A(t+1) B(t+1)
Bx’ Ax
0 0 0 0 0 1 0 0 1
0 0 1 0 0 0 1 0 0
0 1 0 1 1 1 0 1 1
0 1 1 1 0 0 1 1 0
1 0 0 0 0 1 1 1 1
1 0 1 0 0 0 0 1 0
1 1 0 1 1 1 1 0 0
1 1 1 1 0 0 0 1 1
State Diagram
6. ANALYSIS OF SYNCHRONOUS SEQUENTIAL CIRCUITS
1. Analyze the synchronous Moore circuit and obtain its state diagram.
Solution
Using the assigned variable Y1 and Y2 for the two JK Flip-Flops, we can write
the four excitation input equations and the Moore output equation as follows:
State Table
Present state Input Flip-Flop Inputs Next state Output
JA= Y2
Y1 Y2 X KA= Y2’ JB= X KB= X’ Y1 (t+1) Z= Y1Y2’
Y2X (t+1)
0 0 0 0 1 0 1 0 0 0
0 0 1 0 1 1 0 0 1 0
0 1 0 0 0 0 1 0 0 0
0 1 1 1 0 1 0 1 1 0
1 0 0 0 1 0 1 0 0 1
1 0 1 0 1 1 0 0 1 1
1 1 0 0 0 0 1 1 0 0
1 1 1 1 0 1 0 1 1 0
6. ANALYSIS OF SYNCHRONOUS SEQUENTIAL CIRCUITS
Y1 Y2 Y1 Y2 Y1 Y2 Y
0 0 0 0 0 1 0
0 1 0 0 1 1 0
1 0 0 0 0 1 1
1 1 1 0 1 1 0
State Diagram
Here the output depends on the present state only and is independent of
the input. The two values inside each circle separated by a slash are for the
present state and output.
2. A sequential circuit has two T Flip-Flop A and B. The Flip-Flop input functions are:
TA= Bx TB= x
y= AB
a) Draw the logic diagram of the circuit,
b) Tabulate the state table,
c) Draw the state diagram.
6. ANALYSIS OF SYNCHRONOUS SEQUENTIAL CIRCUITS
Solution
Logic Diagram
State Table
Present
Input Flip-Flop Inputs Next state Output
state
B
A B x TA= Bx TB= x A (t+1) y= AB
(t+1)
0 0 0 0 0 0 0 0
0 0 1 0 1 0 1 0
0 1 0 0 0 0 1 0
0 1 1 1 1 1 0 0
1 0 0 0 0 1 0 0
1 0 1 0 1 1 1 0
1 1 0 0 0 1 1 1
1 1 1 1 1 0 0 1
6. ANALYSIS OF SYNCHRONOUS SEQUENTIAL CIRCUITS
0 0 0 0 0 1 0 0
0 1 0 1 1 0 0 0
1 0 1 0 1 1 0 0
1 1 1 1 0 0 1 1
State Diagram
State reduction is concerned with reducing the number of states in a state table,
while keeping the external input-output requirements unchanged .
The two states are said to be equivalent, if for each set of inputs, the circuits
produce exactly the same output and enable the circuit to move to the same state
or an equivalent state.
Step 1: Consider the specifications given in the state diagram. If state table is
given in the problem, then move to step 3. Otherwise, do Step 2.
Step 4: If two states are equal, replace one of the states with the other one and
remove one equal state from the table.
Solution
Steps to reduce:
3. If two states are equal, replace one of the states with the other one and remove
one equal state from the table.
From the state table, we could identify that two present states e and g go to the same
next state a and f and have the same outputs of 0 and 1 for x = 0 and x = 1,
respectively. Therefore, states g and e are equivalent, and one of these states can be
removed.
Step 3: If two states are equal, replace one of the states with the other one and remove
one equal state from the table.
Now, states d and f are equal along with its outputs. So, state f can be replaced with d
and state f can be removed from the state table.
7. STATE REDUCTION - EXAMPLES
Steps 1 and 2: The state table is given. From this, identify the equal states
1. b Ξ e
2. d Ξ h
Step 3: If two states are equal, replace one of the states with the other one and
remove one equal state from the table. Therefore, states e and h are removed
from the state table.
Now,
a Ξ c, So remove c
b)Starting from state a and input sequence 01110010011, determine the output
sequence for the given reduced state table.
Based on the input sequence, create a table with the state transition and display the
output sequence.
Let us consider the previous reduced state table. When the first input x=0 from
the input sequence, there will be a transition from state a to state f and produces
output 0. When the next input x=1, there will be a transition from state f to state b
and produces output 1.
The three possible state assignments with five states are given below.
The above state assignment is given for only 5 states, a,b,c,d, and e.
7. STATE ASSIGNMENT - EXAMPLES
1. Reduce the following state diagram and draw the reduced one.
Solution
00 ----> a
01 ----> b
10 ----> c
11 ----> d
Now,
It is noted that,
• State c is equivalent to state d
• Therefore, state d can be removed from the state table
• Therefore, the final reduced state table and the reduced state diagram are,
a) Reduced State
Table b) Reduced State
Diagram
8. DESIGN PROCEDURE
The steps needed for the design of synchronous sequential circuit is shown below
Solution
Each state contains two bits. It shows that there are two present states in the
sequential circuit.
Step1 to 4 : The state table is given below with external inputs (x) and Flip flop
inputs
0 0 0 0 0 1
0 1 1 0 0 1
1 0 1 0 1 1
1 1 1 1 0 0
9. EXAMPLES-DESIGN OF SYNCHRONOUS SEQUENTIAL
CIRCUIT
Step 5: Choose the type of flip-flops to be used and Derive the state table with external
inputs (x) and Flip flop inputs
External
input and Next State Flip Flop Inputs
Present
State
x A B A(t+1) B(t+1) JA KA JB KB
0 0 0 0 0 0 x 0 x
0 0 1 1 0 1 x x 1
0 1 0 1 0 x 0 0 x
0 1 1 1 1 x 0 x 0
1 0 0 0 1 0 x 1 x
1 0 1 0 1 0 x x 0
1 1 0 1 1 x 0 1 x
1 1 1 0 0 x 1 x 1
Step 6: Derive the simplified flip-flop input equations and output equations.
JA = x'B KA = xB
9. EXAMPLES-DESIGN OF SYNCHRONOUS SEQUENTIAL
CIRCUIT
JB = x
KB = x'A' + xA
(This is equivalent
to XNOR)
Solution
Step 1: In the problem statement, word description and specifications of the desired
operation is given. So, we need to draw the state diagram first.
If the input is 0, the circuit stays in S0, but if the input is 1, it goes to state S1 to
indicate that a 1 was detected.
If the next input is 1, the change is to state S2 to indicate the arrival of two
consecutive 1‘s, but if the input is 0, the state goes back to S0.
If more 1‘s are detected, the circuit stays in S3. Any 0 input sends the circuit back
to S0. So, S0 is a reset state.
Therefore, the circuit remains in S3 as long as there are three or more consecutive
1‘s received.
This is a Moore model sequential circuit, since the output is 1 when the circuit is
in state S3 and is 0 otherwise.
Step 2 to 4 : The state table of the sequence detector is given below with the external
inputs (x) and Flip flop inputs
External
input and Next State Output
Present
State
A B x A(t+1) B(t+1) y
0 0 0 0 0 0
0 0 1 0 1 0
0 1 0 0 0 0
0 1 1 1 0 0
1 0 0 0 0 0
1 0 1 1 1 0
1 1 0 0 0 1
1 1 1 1 1 1
The characteristic equation of the D flip-flop is Q(t + 1) = DQ and the flip-flop input
equations in sum -of-minterm form is,
Step 6: Derive the simplified flip-flop input equations and output equations.
DA = Ax + Bx DB = Ax + B’x
9. EXAMPLES-DESIGN OF SYNCHRONOUS SEQUENTIAL
CIRCUIT
2. Design a circuit that detects a sequence of three or more consecutive 1‘s in a string of bits
coming through an input line (Or) Design a sequence detector for implementing three or
more consecutive 1‘s in a string of bits coming through an input line.
K-map for y
y = AB
Q(t) Q(t+1) S R D J K T
0 0 0 x 0 0 x 0
0 1 1 0 1 1 x 1
1 0 0 1 0 x 1 1
1 1 x 0 1 x 0 0
● Get the simplified expressions for each excitation input. If necessary, use
Kmaps for simplifying.
● Draw the circuit diagram of desired flip-flop according to the simplified
expressions using given flip-flop and necessary logic gates.
Conversions among Flip-Flops are
• SR Flip-Flop to other Flip-Flop Conversions
• D Flip-Flop to other Flip-Flop Conversions
• JK Flip-Flop to other Flip-Flop Conversions
• T Flip-Flop to other Flip-Flop Conversions
10. REALIZATION OF ONE FLIP-FLOP USING OTHER
FLIP-FLOPS
SR Flip-Flop to other Flip-Flop Conversions
Following are the three possible conversions of SR flip-flop to other flip-flops.
● SR flip-flop to D flip-flop
● SR flip-flop to JK flip-flop
● SR flip-flop to T flip-flop
Given Flip-Flop
Required Flip-Flop (D)
(SR)
Present
Input Next state Flip-Flop Inputs
state
D Qn Qn+1 s R
0 0 0 0 x
0 1 0 0 1
1 0 1 1 0
1 1 1 x 0
10. REALIZATION OF ONE FLIP-FLOP USING OTHER
FLIP-FLOPS
SR flip-flop to T flip-flop conversion
• Write the characteristic table for required Flip-Flop (T Flip-Flop).
• Write the excitation table for given Flip-Flop (SR Flip-Flop).
• Determine the expression for the given Flip-Flop inputs (S and R) by using K-
map.
• Draw the Flip-Flop conversion logic diagram to obtain the required Flip- Flop
(T Flip-Flop).
The excitation table for the above conversion is
Given Flip-Flop
Required Flip-Flop (T)
(SR)
Present
Input Next state Flip-Flop Inputs
state
T Qn Qn+1 S R
0 0 0 0 x
0 1 1 x 0
1 0 1 1 0
1 1 0 0 1
REALIZATION OF ONE FLIP-FLOP USING OTHER FLIP-FLOPS
T Qn Qn+1 D
0 0 0 0
0 1 1 1
1 0 1 1
1 1 0 0
From the above table, Boolean function can directly writen as.
D=T⊕Q(t)
So, it require a two input Exclusive-OR gate along with D flip-flop. The circuit
diagram of T flip-flop is shown in the following figure.
10. REALIZATION OF ONE FLIP-FLOP USING OTHER
FLIP-FLOPS
This circuit consists of D flip-flop and an Exclusive-OR gate. This Exclusive-OR gate
produces an output, which is Ex-OR of T and Q( t). So, the overall circuit has single
input, T and two outputs Q(t) & Q(t‘). Hence, it is a T flip-flop.
Exercise
Construct Realisation of
I. D flip-flop to SR flip-flop
II. D flip-flop to JK flip-flop
JK flip-flop to T flip-flop
JK flip-flop to D flip-flop
JK flip-flop to SR flip-flop
Here, the given flip-flop is JK flip-flop and the desired flip-flop is T flip-flop.
Therefore, consider the following characteristic table of T flip-flop.
Present
Input Next state Flip-Flop Inputs
state
T Qn Qn+1 J K
0 0 0 0 x
0 1 1 x 0
1 0 1 1 x
1 1 0 x 1
REALIZATION OF ONE FLIP-FLOP USING OTHER FLIP-FLOPS
JK Flip-Flop to D Flip-Flop
Given Flip-Flop
Required Flip-Flop (T)
(JK)
Present
Input Next state Flip-Flop Inputs
state
D Qn Qn+1 J K
0 0 0 0 x
0 1 0 x 1
1 0 1 1 x
1 1 1 x 0
Exercise
Construct
Realisation of JK
to SR FLIP-FLOP
10. REALIZATION OF ONE FLIP-FLOP USING OTHER
FLIP-FLOPS
● T flip-flop to D flip-flop
● T flip-flop to SR flip-flop
● T flip-flop to JK flip-flop
Here, the given flip-flop is T flip-flop and the desired flip-flop is D flip-flop.
Therefore, consider the characteristic table of D flip-flop and write down the
excitation values of T flip-flop for each combination of present state and next state
values. The following table shows the characteristic table of D flip-flop along with
the excitation input of T flip-flop.
Given Flip-
Required Flip-Flop (D) Flop
(T)
Present
Input Next state Flip-Flop Inputs
state
D Qn Qn+1 T
0 0 0 0
0 1 0 1
1 0 1 1
1 1 1 0
From the above table, the Boolean function of T can directly written as
T=D⊕Q(t)
So, it requires a two input Exclusive-OR gate along with T flip-flop. The circuit
diagram of D flip-flop is shown in the following figure.
10. REALIZATION OF ONE FLIP-FLOP USING OTHER
FLIP-FLOPS
Exercise
Construct Realisation of
i T flip-flop to SR flip-flop
ii T flip-flop to JK flip-flop
ACTIVITY
ONLINE QUIZ
https://instrumentationtools.com/realisation-one-flip-flop-using-flip-flops-questions
12. SHIFT REGISTERS
Flip-flop is a 1 bit memory cell which can be used for storing the digital data. To
increase the storage capacity in terms of number of bits, it is required to use a
group of flip-flop. Such a group of flip-flop is known as a Register. The n-bit register
will consist of n number of flip-flop and it is capable of storing an n-bit word.
The binary data in a register can be moved within the register from one flip-flop to
another. The registers that allow such data transfers are called as shift registers.
There are four mode of operations of a shift register.
Block Diagram
D3 D2 D1 Q1 D0
Q3 Q2 Q0
Flip-Flop-1
Flip-Flop-3 Flip-Flop-2 Flip-Flop-0
12. SHIFT REGISTERS
D3 D2 Q2 D1 Q1 D0 Q0
Q3
Flip-Flop-2 Flip-Flop-1 Flip-Flop-0
Flip-Flop-3
Load mode
When the shift/load bar line is low (0), the AND gate 2, 4 and 6 become active they
will pass B1, B2, B3 bits to the corresponding flip-flops. On the low going edge of
clock, the binary input B0, B1, B2, B3 will get loaded into the corresponding flip-
flops. Thus parallel loading takes place.
Shift mode
When the shift/load bar line is low (1), the AND gate 2, 4 and 6 become inactive.
Hence the parallel loading of the data becomes impossible. But the AND gate 1,3
and 5 become active. Therefore the shifting of data from left to right bit by bit on
application of clock pulses. Thus the parallel in serial out operation takes place.
Block Diagram
D3 D2 Q2 D1 Q1 D0 Q0
Q3
Flip-Flop-2 Flip-Flop-1 Flip-Flop-0
Flip-Flop-3
12. SHIFT REGISTERS
In this mode, the 4 bit binary input B0, B1, B2, B3 is applied to the data inputs D0,
D1, D2, D3 respectively of the four flip-flops. As soon as a negative clock edge is
applied, the input binary bits will be loaded into the flip-flops simultaneously. The
loaded bits will appear simultaneously to the output side. Only clock pulse is
essential to load all the bits.
Block Diagram
D3 D2 D1 Q1 D0
Q3 Q2 Q0
Flip-Flop-1
Flip-Flop-3 Flip-Flop-2 Flip-Flop-0
12. SHIFT REGISTERS
Before application of clock signal, let Q3 Q2 Q1 Q0 = 0000 and apply LSB bit of the
number to be entered to Din. So Din = D3 = 1. Apply the clock. On the first falling
edge of clock, the FF-3 is set, and stored word in the register is Q3 Q2 Q1 Q0 =
1000.
D3 D2 D1 Q1 D0
Q3 Q2 Q0
Flip-Flop-1
Flip-Flop-3 Flip-Flop-2 Flip-Flop-0
Apply the next bit to Din. So Din = 1. As soon as the next negative edge of the
clock hits, FF-2 will set and the stored word change to Q3 Q2 Q1 Q0 = 1100.
D3 D2 Q2 D1 Q1 D0
Q3 Q0
Flip-Flop-2 Flip-Flop-1
Flip-Flop-3 Flip-Flop-0
Apply the next bit to be stored i.e. 1 to Din. Apply the clock pulse. As soon as the
third negative clock edge hits, FF-1 will be set and output will be modified to Q3 Q2
Q1 Q0 = 1110.
D3 D2 D1 Q1 D0
Q3 Q2 Q0
Flip-Flop-1
Flip-Flop-3 Flip-Flop-2 Flip-Flop-0
12. SHIFT REGISTERS
Truth Table
Waveforms
The simplest register is a 1-bit register. A 1-bit register is simply a single D flip-flop.
It holds a logical value of exactly one bit in length. Larger registers can hold longer
strings of bits. For example, an 8-bit register holds an 8-bit logical value (i.e.
10110110), and it is formed by a collection of eight D flip-flops. In order to form a
register form a collection of flip-flops, the flip-flops must all run on the same clock
signal.
In general, there are two major types of registers:
Parallel-Load Registers
Shift Registers.
12. SHIFT REGISTERS
Parallel-Load Registers
Parallel-load registers are a type of register where the individual bit values in the
register are loaded simultaneously. More specifically, every flip-flop within the
register takes an external data input, and these inputs are loaded into the flip-flops
on the same edge in a clock cycle.
D D D D
Q Q Q Q
It is a simple 4-bit parallel-load register where D0, D1, D2, and D3 are the individual
data bits; Q0, Q1, Q2, and Q3 form the output value (as a 4-bit word Q3Q2Q1Q0);
and Clk is the single clock signal.
Load Signal
Many commonly used parallel-load registers, however, also implement a load signal.
A load signal is used to synchronize the loading of a register's flip-flops in cases
where the individual data inputs are not provided simultaneously. When the load
signal is set, all the flip-flops in the register are loaded with the provided data inputs
during the next clock cycle. When the load signal is clear, all the flip-flops retain
their current value. This functionality is often implemented using multiplexers, or
muxes.
D D Q D D
Q Q Q
FF3
FF3 FF3 FF3
12. SHIFT REGISTER
Shift Register
As one flip-flop can store one-bit of information. In order to store multiple bits of
information, its is required to use multiple flip-flops. The group of flip-flops, which
are used to hold store the binary data is known as register.
If the register is capable of shifting bits either towards right hand side or towards
left hand side is known as shift register. An ‗N‘ bit shift register contains ‗N‘ flip-
flops. Following are the four types of shift registers based on applying inputs and
accessing of outputs.
The shift register, which allows serial input and produces serial output is known as
Serial In – Serial Out SISO shift register. The block diagram of 3-bit SISO shift
register is shown in the following figure.
D2 Q2 D1 Q1 D0 Q0
D D D
Flip-Flop Flip-Flop Flip-Flop
The block diagram consists of three D flip-flops, which are cascaded. That means,
output of one D flip-flop is connected as the input of next D flip-flop. All these flip-
flops are synchronous with each other since, the same clock signal is applied to each
one.
12. SHIFT REGISTER
In SISO shift register, bits can send serially from the input of left most D flip-flop.
Hence, this input is also called as serial input. For every positive edge triggering of
clock signal, the data shifts from one stage to the next. So, bits can receive serially
from the output of right most D flip-flop. Hence, this output is also called as serial
output.
Example
Let us see the working of 3-bit SISO shift register by sending the binary information
―011‖ from LSB to MSB serially at the input.
Assume, initial status of the D flip-flops from leftmost to rightmost is
Q2Q1Q0=000. The working of 3-bit SISO shift register is illustrated in table below.
0 - 0 0 0
1 1 1 0 0
2 1 1 1 0
3 0 1 1 1
4 - - 0 1
5 - - - 0
The initial status of the D flip-flops in the absence of clock signal is Q2Q1Q0=000.
Here, the serial output is coming from Q0. So, the LSB 1 is received at 3rd
positive edge of clock and the MSB 0 is received at 5th positive edge of clock.
Therefore, the 3-bit SISO shift register requires five clock pulses in order to
produce the valid output. Similarly, the N-bit SISO shift register requires 2N-1 clock
pulses in order to shift ‗N‘ bit information.
12. SHIFT REGISTER
The shift register, which allows serial input and produces parallel output is known as
Serial In – Parallel Out SIPO shift register. The block diagram of 3-bit SIPO shift
register is shown in the following figure.
D2 D1 Q1 D0
Q2 Q0
D
D Flip-Flop D
Flip-Flop Flip-Flop
This circuit consists of three D flip-flops, which are cascaded. In this shift register,
bits are send serially from the input of left most D flip-flop. Hence, this input is also
called as serial input. For every positive edge triggering of clock signal, the data
shifts from one stage to the next. In this case, the outputs of each D flip-flop in
parallel. So, it generates parallel outputs from this shift register.
Example
Let us see the working of 3-bit SIPO shift register by sending the binary information
―011‖ from LSB to MSB serially at the input.
The shift register, which allows parallel input and produces serial output is known as
Parallel In − Serial Out PISO shift register. The block diagram of 3-bit PISO shift
register is shown in the following figure.
D2 Pr Q2 D1 Pr Q1 D0 Pr Q0
D D D
Flip-Flop Flip-Flop Flip-Flop
This circuit consists of three D flip-flops, which are cascaded. In this shift register,
inputs can apply parallel to each D flip-flop by making Preset Enable to 1. For every
positive edge triggering of clock signal, the data shifts from one stage to the next.
So, it generates serial output from the right most D flip-flop.
12. SHIFT REGISTER
Let us see the working of 3-bit PISO shift register by applying the binary information
―011‖ in parallel through preset inputs.
Since the preset inputs are applied before positive edge of Clock, the initial status of
the D flip-flops from leftmost to rightmost will be Q2Q1Q0=011. The working of 3-
bit PISO shift register is illustrated in table.
No of positive edge
Serial Input Q2 Q1 Q0
of Clock
0 - 0 1 1
1 1 - 0 1
2 1 - - 0
Here, the serial output is coming from Q0. So, the LSB 1 is received before
applying positive edge of clock and the MSB 0 is received at 2nd positive edge of
clock.
Therefore, the 3-bit PISO shift register requires two clock pulses in order to produce
the valid output. Similarly, the N-bit PISO shift register requires N-1 clock pulses in
order to shift ‗N‘ bit information.
12. SHIFT REGISTER
The shift register, which allows parallel input and produces parallel output is known
as Parallel In − Parallel Out PIPO shift register. The block diagram of 3-bit PIPO shift
register is shown in the following figure.
D2 Pr Q2 D1 Pr Q1 D0 Pr Q0
D D D
Flip-Flop Flip-Flop Flip-Flop
In this shift register, inputs are apply parallel to each D flip-flop by making Preset
Enable to 1. The parallel inputs are applied through preset or clear. These two are
asynchronous inputs. That means, the flip-flops produce the corresponding outputs,
based on the values of asynchronous inputs. In this case, the effect of outputs is
independent of clock transition. So, it generates parallel outputs from each D flip-
flop.
12. SHIFT REGISTER
The working of 3-bit PIPO shift register by applying the binary information ―011‖ in
parallel through preset inputs.
Since the preset inputs are applied before positive edge of Clock, the initial status of
the D flip-flops from leftmost to rightmost will be
Q2Q1Q0=011. So, the binary information ―011‖ is obtained in parallel at the outputs
of D flip-flops before applying positive edge of clock.
Therefore, the 3-bit PIPO shift register requires zero clock pulses in order to produce
the valid output. Similarly, the N-bit PIPO shift register doesn‘t require any clock
pulse in order to shift ‗N‘ bit information.
● Shift register is used as Parallel to serial converter, which converts the parallel
data into serial data. It is utilized at the transmitter section after Analog to
Digital Converter ADC block.
● Shift register is used as Serial to parallel converter, which converts the serial
data into parallel data. It is utilized at the receiver section before Digital to
Analog Converter DAC block.
● Shift register along with some additional gate s generate the sequence of
zeros and ones. Hence, it is used as sequence generator.
● Shift registers are also used as counters. There are two types of counters
based on the type of output from right most D flip-flop is connected to the
serial input. Those are Ring counter and Johnson Ring counter.
12. SHIFT REGISTER
Serial Transfer
D3 D2 Q2 D1 Q1 D0 Q0
Q3
FF-2 FF-3 FF-3
FF-3
Operation
With M = 1 ; Shift right operation
If M = 1, then the AND gates 1, 3, 5 and 7 are enabled whereas the remaining AND
gates 2, 4, 6 and 8 will be disabled.The data at DR is shifted to right bit by bit from
FF-3 to FF-0 on the application of clock pulses. Thus with M = 1 enables the serial
right shift operation.
With M = 0 ; Shift left operation
When the mode control M is connected to 0 then the AND gates 2, 4, 6 and 8 are
enabled while 1, 3, 5 and 7 are disabled.
The data at DL is shifted left bit by bit from FF-0 to FF-3 on the application of clock
pulses. Thus with M = 0 enables the serial right shift operation.
12. SHIFT REGISTER
R R R R
CK FF-4 CK FF-3 CK FF-2 CK FF-1
S Q S Q S Q S Q
12. SHIFT REGISTER
● The shift registers are also used for data transfer and data manipulation.
● The serial-in serial-out and parallel-in parallel-out shift registers are used to
produce time delay to digital circuits.
● The serial-in parallel-out shift register is used to convert serial data into
parallel data thus they are used in communication lines where demultiplexing
of a data line into several parallel line is required.
● A Parallel in Serial out shift register is used to convert parallel data to serial
data.
You can refer to the following video to get a clearer understanding of the working
principle of shift registers.
https://www.youtube.com/watch?v=6fVbJbNPrEU
Games of shift
https://www.yad.com/Type-Shift
13. SERIAL ADDER
Serial binary adder is a combinational logic circuit that performs the addition of two
binary numbers in serial form. Serial binary adder performs bit by bit addition. Two
shift registers are used to store the binary numbers that are to be added.
A single full adder is used to add one pair of bits at a time along with the carry. The
carry output from the full adder is applied to a D flip-flop. After that output is used
as carry for next significant bits. The sum bit from the output of the full adder can
be transferred into a third shift register.
Shift Register
Shift Register is a group of flip flops used to store multiple bits of data. There are
two shift registers used in the serial binary adder. In one shift register augend is
stored and in other shift register addend is stored.
Full Adder
Full adder is the combinational circuit which takes three inputs and gives two
outputs as sum and carry. The circuit adds one pair at a time with the help of it.
D Flip-flop
the carry output from the full adder is applied on the D flip-flop. Further, the output
of D flip-flop is used as a carry input for the next pair of significant bits.
Working Process
Following is the procedure of addition using serial binary adder:
● Step-1:The two shift registers A and B are used to store the numbers to be
added.
● Step-2:A single full adder is used to add one pair of bits at a time along with
the carry.
● Step-3:
The contents of the shift registers shift from left to right and their output
starting from a and b are fed into a single full adder along with the output of
the carry flip-flop upon application of each clock pulse.
● Step-4:The sum output of the full adder is fed to the most significant bit of
the sum register.
● Step-5:The content of sum register is also shifted to right when clock pulse
is applied.
● Step-6:
After applying four clock pulse the addition of two registers (A & B) contents
are stored in sum register.
13. SERIAL ADDER
Serial binary adder is a combinational logic circuit that performs the addition of two
binary numbers in serial form. Serial binary adder performs bit by bit addition. Two
shift registers are used to store the binary numbers that are to be added.
A single full adder is used to add one pair of bits at a time along with the carry. The
carry output from the full adder is applied to a JK flip-flop. After that output is used
as carry for next significant bits. The sum bit from the output of the full adder can
be transferred into a third shift register.
SI SO
Shift Register
A
SI SO J
Shift Register
B
C
K
13. SERIAL ADDER
Shift Register
Shift Register is a group of flip flops used to store multiple bits of data. There are
two shift registers used in the serial binary adder. In one shift register augend is
stored and in other shift register addend is stored.
Full Adder
Full adder is the combinational circuit which takes three inputs and gives two
outputs as sum and carry. The circuit adds one pair at a time with the help of it.
JK Flip-flop
the carry output from the full adder is applied on the JK flip-flop. Further, the output
of JK flip-flop is used as a carry input for the next pair of significant bits.
Working Process
Following is the procedure of addition using serial binary adder:
● Step-1:The two shift registers A and B are used to store the numbers to be
added.
● Step-2:A single full adder is used to add one pair of bits at a time along with
the carry.
● Step-3:The contents of the shift registers shift from left to right and their
output starting from a and b are fed into a single full adder along with the
output of the carry flip-flop upon application of each clock pulse.
JQ=xy
KQ=x’y’
● Step-4:The sum output of the full adder is fed to the most significant bit of
the sum register.
S=x⊕ y ⊕Q
● Step-5:The content of sum register is also shifted to right when clock pulse
is applied.
● Step-6:After applying four clock pulse the addition of two registers (A & B)
contents are stored in sum register.
13. SERIAL ADDER
Given Flip-
Required Flip-Flop (T) Flop
(JK)
Present Next
Inputs Output Flip-Flop Inputs
state state
Q x y Qn+1 S J K
0 0 0 0 0 0 x
0 0 1 0 1 0 x
0 1 0 0 1 0 x
0 1 1 1 0 1 x
1 0 0 0 1 x 1
1 0 1 1 0 x 0
1 1 0 1 0 x 0
1 1 1 1 1 x 0
EXERCISE
FUNCTION TABLE
COUNTERS
• A register that goes through a prescribed sequence of states upon the application
of input pulses is called a counter.
• A counter that follows the binary number sequence is called a binary counter.
• An n-bit binary counter consists of n flip-flops and can count in binary from 0
through 2n-1.
• Two categories of counters:
1. Asynchronous counters (or Ripple counters)
2. Synchronous counters
• In a ripple counter, a flip-flop outputs transition serves as a source for triggering
other flip flops. (i.e) the ‗c‘ input of some or all flip-flops are triggered, not by the
common clock pulses, but rather by the transition that occurs in other flip-flop
outputs.
• In a synchronous counter, the ‗c‘ inputs of all flip-flops receive the common clock.
Clock Pulse A3 A2 A1 A0
Initially 0 0 0 0
Q8 Q4 Q2 Q1 Rule for Q1
0 0 0 0 Q1 complements for every clock pulse
0 0 0 1 Rule for Q2
Q2 complements when there is a negative transition
0 0 1 0 of 1 to 0 in Q1 and when Q8 = 0.
0 0 1 1 When Q8 = 1 => Q2 = 0
0 1 0 0 Rule for Q4
Q4 complements when there is a –ve transition from 1
0 1 0 1 to 0 in Q2.
0 1 1 0 Rule for Q8
0 1 1 1 Q8 = 0, as long as Q4 or Q2 = 0
When Q4=Q2=1, Q8 complements, when Q1 goes
1 0 0 0 from 1 to 0
1 0 0 1 Q8 is cleared in the next transition of Q1 from 1 to 0
(i.e) Q2 and Q4 = 0
0 0 0 0
15 COUNTERS
Q(t) Q(t+1) J K
0 0 0 X
0 1 1 X
1 0 X 1
1 1 X 0
15 COUNTERS
CD 00 01 11 10 CD 00 01 11 10
AB AB
00 00 X X X X
01 1 01 X X X X
X X X X 1
11 11
X X X X
10 10
JA = BCD KA = BCD
CD 00 01 11 10 CD 00
AB 01 11 10
AB
00 1 00 X X X X
01 X X X X 01 1
11 X X X X 1
11
1 X X X X
10 10
JB = CD
KB = CD
15 COUNTERS
CD CD 00 01 11 10
00 01 11 10 AB
AB
00 1 X X 00 X X 1
01 1 X X 01 X X 1
1 X X X X 1
11 11
1 X X X X 1
10 10
JC = D KC = D
CD 00 01 11 10 CD 00
AB 01 11 10
AB
00 00
01 1 01 1
11 X X X X X X X X
11
X X X X X X X X
10 10
J= BCD JA = BCD
15 COUNTERS
CD CD 00 01 11 10
00 01 11 10 AB
AB
00 1 X X 00 X X 1
01 1 X X 01 X X 1
1 X X X X 1
11 11
1 X X X X 1
10 10
JC = D KC = D
CD 00 01 11 10 CD 00
AB 01 11 10
AB
00 1 X X 1 00
1 X X 1
01 1 X X 1 01 1 X X 1
11 1 X X 1 11 1 X X 1
1 X X 1 1 X X 1
10 10
JD= 1 KD = 1
15 COUNTERS
For example, if the present state of a four‐bit counter is ABCD = 0011, the next
count is 0100. D is always complemented. C is complemented because the present
state of D = 1. B is complemented because the present state of CD = 11. However,
A is not complemented, because the present state of BCD = 011, which does not
give an all‐1‘s condition
16 SYNCHRONOUS COUNTERS
II) Design a Synchronous 3 bit Binary Down Counter
State Diagram
State Table
Q(t) Q(t+1) T
Q(t) Q(t+1) J K
0 0 0
0 0 0 X
0 1 1
0 1 1 X
1 0 1
1 0 X 1
1 1 0
1 1 X 0
16 SYNCHRONOUS COUNTERS
BC BC
00 01 11 10 00 01 11 10
A A
0 1 0 X X X X
1 X X X X 1 1
JA = B’C' BC KA = B’C
BC
00 01 11 10 00 01 11 10
A A
0 1 X X 0 X X 1
1 1 X X 1 X X 1
JB = C’ KB = C’
BC BC
00 01 11 10 00 01 11 10
A A
0 X 1 1 X 0 1 X X 1
1 X 1 1 X 1 1 X X 1
JC = 1 KC = 1
16 SYNCHRONOUS COUNTERS
3 bit Binary Down Counter
UP DOWN Operation
0 0 No Change
0 1 Counts down
1 0 Counts up
1 1 Counts up
TQ1 = 1
TQ2 = Q8Q1
TQ4 = Q2Q1
TQ8 = Q8Q1 + Q4Q2Q1
y = Q8Q
16 SYNCHRONOUS COUNTERS
V) DESIGN A BINARY COUNTER WITH PARALLEL LOAD
Parallel Load capability for transferring an initial binary number into the counter
prior to the count operation.
The input load control disables the count operation and causes a transfer of
data from the four data inputs into the four flip‐flops.
Function Table
A non binary counter is a circuit that consists of flip-flops which along with
combinational elements are used for generation of control signals.
The counter with ‗n‘ Flip-Flops has a maximum MOD number 2n.
We can find the number of Flip-Flops (n) required for the desired MOD number
(N) using the equation, 2n ≥ N
For example, a 3 bit binary counter is a MOD 8 counter. The basic counter can be
modified to produce MOD numbers less than 2n by allowing the counter to skin
those are normally part of counting sequence.
n= 3
N= 8
2n = 23= 8= N
Example : To construct a MOD 10 Counter: 2n= N= 10 i.e 23= 8 less than N.
24= 16 > N(10).
So we need 4 Flip Flips to construct a MOD 10 counter
Steps to construct any MOD-N counter
1. Find the number of Flip-Flops (n) required for the desired MOD number (N)
using the equation, 2n ≥ N.
2. Connect all the Flip-Flops as a required counter.
3. . Find the binary number for N.
4. Connect all Flip-Flop outputs for which Q= 1 when the count is N, as inputs
to NAND gate.
5. Connect the NAND gate output to the CLR input of each Flip-Flop.
When the counter reaches Nth state, the output of the NAND gate goes LOW,
resetting all Flip-Flops to 0. Therefore the counter counts from 0 through N-1.
14. NON BINARY COUNTERS
The basic operation is the same as that of the 2-bit counter except that the
3-bit counter has eight states, due to its three Flip-Flops. A timing diagram is
shown below for eight clock pulses. Notice that the counter progresses through a
binary count of zero through seven and then recycles to the zero state. This
counter can be easily expanded for higher count, by connecting additional toggle
Flip-Flops.
Timing diagram
18. RING COUNTER
SHIFT REGISTER COUNTERS:
A shift register counter is basically a shift register with the serial output
connected back to the serial input to produce special sequences. Two of the most
common types of shift register counters are:
Ring counter
Johnson counter (Shift Counter)
The ring counter utilizes one Flip-Flop for each state in its sequence. It
has the advantage that decoding gates are not required. In the case of a l0-bit
ring counter, there is a unique output for each decimal digit.
Ring Counter
The output Q0 sets D1 input, Q1 sets D2, Q2 sets D3 and Q3 is fed back to D0.
Because of these conditions, bits are shifted left one position per positive clock
edge and fed back to the input. All the Flip-Flops are clocked together. When CLR
goes low then back to high, the output is 0000.
•The output of a sequential circuit is a function of both the inputs and the present state
of the storage elements.
•A synchronous sequential circuit is a system whose behaviour can be defined from the
knowledge of its signals at discrete instants of time.
6) State the differences between Latches and Flip flops. (CO3, K1)
Part-A Questions and Answers (JK FF,TF F and Analysis)
When J input is high and K input is low, the Q output of the flip flop is set
When J input is low and K input is high, the Q output of the flip flop is reset
When both the inputs K and J are low, the output does not change
When both the inputs K and J are high, the flip flop toggles between set and reset
states for every clock pulse
In JK flip flop, if both the inputs K and J are high, the flip flop toggles continuously
between set and reset states for every clock pulse. This condition is called as race
around condition
A master slave flip flop consist of two flip flops, where one flip flop serves as a
master and another as a salve. The race around problem is solved using the master
slave flip flop.
T flip flop is also known as toggle flip flop. When T=0, there is no change in the
output. When T=1, the flip flop toggles between set and reset states for every clock
pulse.
15. Mention the two types of models used to represent clocked sequential
circuits. [CO3,K2]
a) Moore Model
b) Mealy Model
Part-A Questions and Answers (JK FF,TF F and Analysis)
When the output of the sequential circuit depends only on the present state of the
flip flops then it is referred as Moore circuit. Moore circuit requires more number of
states.
When the output of the sequential circuit depends both on the present state of the
flip flops and on the inputs then it is referred as Mealy circuit. It requires lesser
number of states.
The information stored in the memory elements at any given time defines the
present state of the sequential circuit.
Part-A Questions and Answers (JK FF,TF F and Analysis)
The present state and the external inputs determines the output and next state of
the sequential circuit.
A state table represents the relationship between input, output and flip flop states.
It consists of four sections labelled as present state, input, next state and output.
d) Data transfer
The process of eliminating the equivalent or redundant states from a state table
or state diagram of sequential circuit is known as state reduction.
Reduction to the minimum number of states reduces the number of flip flops and logic
gates needed to design the sequential circuit. This highly reduces the cost required to
design the circuit.
The steps needed for the design of synchronous sequential circuit is shown below
1. If word description and specifications of the desired operation is given in the
problem statement, then first draw the state diagram. If the state diagram is
given in the problem statement, then start from step 2.
2. Reduce the number of states.
3. Assign binary values to the states. Do steps 2 and 3 if necessary.
4. Obtain the binary-coded state table. Derive the state table with external inputs
(x) and Flip flop inputs.
5. Choose the type of flip-flops to be used.
6. Derive the simplified flip-flop input equations and output equations.
7. Draw the logic diagram using the given flip flop.
Part A Q & A (with K level and CO)
There are five types. They are, Serial In Serial Out Shift Register Serial In
Parallel Out Shift Register Parallel In Serial Out Shift Register Parallel In Parallel
Out Shift Register & Bidirectional Shift Register
0→ 0 transition: This can happen either when R=S=0 or when R=1 and S=0.
1 →1 transition: This can happen either when S=1 and R=0 or S=0 and R=0.
The present state and the external inputs determine the outputs and
the next state of the sequential circuit.
Johnson counter.
Reset -- 0000
38. In the given figure shows a 4 bit serial in parallel out right shift
register. The initial contents as shown are 0110. After 3 clock pulses
the contents will be?[CO3,K3]
All the flip-flops are Not All the flip-flops are clocked
clocked simultaneously simultaneously
Speed of operation is low. Speed of operation is high
COUNTERS
SHIFT REGISTERS
FREQUENCY DIVIDER
DATA TRANSFER
Content Beyond Syllabus
Applications of Ring Counter
Applications of Ring counters
They are also used to detect the various numbers values or various patterns
within a set of information, by connecting AND & OR logic gates to the ring
counter circuits.
2 stage, 3 stage and 4 stage ring counters are used in frequency divider circuits
as divide by 2 and divide by 3 and divide by 4 circuits, respectively.
The 3 stage Johnson counter is used as a 3 phase square wave generator which
produces 1200 phase shift.
The 2 stage Johnson counters are also known as ―Quadrature oscillator‖ which is
used to produce 4 level individual outputs which are out of phase with 900 with
each other. This quadrature generator is used to produce 4 phase timing signal.
Assessment Schedule
(Proposed Date & Actual
Date)
Assessment Schedule (Proposed Date &
Actual Date)
Prescribed Text Books &
Reference
Prescribed Text Books & Reference
TEXT BOOK:
M. Morris R. Mano, Michael D. Ciletti, “Digital Design: With an Introduction to the Verilog
HDL, VHDL, and System Verilog” , 6th Edition, Pearson Education, 2017.
REFERENCES:
1. G. K. Kharate, Digital Electronics, Oxford University Press, 2010
2. John F. Wakerly, Digital Design Principles and Practices, Fifth Edition, Pearson Education,
2017.
3. Charles H. Roth Jr, Larry L. Kinney, Fundamentals of Logic Design, Sixth Edition, CENGAGE
Learning, 2013
4. Donald D. Givone, Digital Principles and Design‖, Tata Mc Graw Hill, 2003.
Mini Project Suggestions
Mini Project Suggestions
1) Car Alarm :
A fairly simple circuit can be designed that could operate a car alarm. The circuit has
one input Y which would be connected to the car's door switch to determine if the car
door is open or shut. When the door is shut Y = 0, and when the door is open Y = 1.
The circuit has one output Z which is used to operate a relay that honks the horn by
shorting the wires that go to the horn switch in the steering wheel. When Z = 1, the
relay is activated and the horn honks. The circuit would be asynchronously reset by
the accessories power line that is high when the ignition is turned on or is in
accessory-only mode, both of which require the key to the car.
2) 12-Hour Clock
Digital clocks are usually set up to start at 12:00, and they count 12:01, 12:02, 12:03,
12:04, 12:05, 12:06, 12:07, 12:08, 12:09, 12:10, and eventually the clock gets to
12:58, 12:59, 1:00, and so on. The one's place of the minutes (the right-most digit)
counts 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and then repeats, and a circuit that counts in this
way is called a mod-10 counter. The ten's place of the minutes (second digit from the
right) counts 0, 1, 2, 3, 4, 5, and then repeats, which is called a mod-6 counter. The
hour counter counts 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, and repeats. The output from
each counter is a binary coded decimal (BCD) number that represents one of the
digits in the time, and BCD-to-Seven segment decoders are used to drive the seven
segment displays.
Thank you
Disclaimer:
This document is confidential and intended solely for the educational purpose of RMK Group of
Educational Institutions. If you have received this document through email in error, please notify the
system manager. This document contains proprietary information and is intended only to the
respective group / learning community as intended. If you are not the addressee you should not
disseminate, distribute or copy through e-mail. Please notify the sender immediately by e-mail if you
have received this document by mistake and delete this document from your system. If you are not
the intended recipient you are notified that disclosing, copying, distributing or taking any action in
reliance on the contents of this information is strictly prohibited.