Sequential Circuits
Sequential Circuits
3
18CSS201J – ANALOG AND DIGITAL
ELECTRONICS
(Regulations 2018)
UNIT 4- Session-1
Introduction to Sequential circuits, Latch and Flip-Flops
Sequential Circuits
2
Synchronous Clocked Sequential Circuit
3
Latches --SR Latch
The SR latch is a circuit with two cross-coupled NOR gates or
two cross-coupled NAND gates. It has two inputs labeled S
for set and R for reset.
4
SR Latch with NAND Gates
5
SR Latch with Control Input
6
D Latch
7
Graphic Symbols for latches
A latch is designated by a rectangular block with inputs on
the left and outputs on the right. One output designates the
normal output, and the other designates the complement
output.
8
Flip-Flops
9
Clock Response in Latch
10
Clock Response in Flip-Flop
11
S-R Flip Flop
• The SET-RESET flip flop is designed with the help of two NOR gates and
also two NAND gates. These flip flops are also called S-R Latch.
• S-R Flip Flop using NOR Gate The design of such a flip flop includes two
inputs, called the SET [S] and RESET [R].
• There are also two outputs, Q and Q’.
• From the diagram it is evident that the flip flop has mainly four
states. They are S=1, R=0—Q=1, Q’=0 This state is also called the SET
state.
• S=0, R=1—Q=0, Q’=1 This state is known as the RESET state. In both
the states you can see that the outputs are just compliments of each
other and that the value of Q follows the value of S.
• S=0, R=0—Q & Q’ = Remember If both the values of S and R are
switched to 0, then the circuit remembers the value of S and R in
their previous state.
• S=1, R=1—Q=0, Q’=0 [Invalid] This is an invalid state because the
values of both Q and Q’ are 0. They are supposed to be compliments
of each other. Normally, this state must be avoided.
S-R Flip Flop using NAND Gate
• Like the NOR Gate S-R flip flop, this one also has four states. They are S=1,
R=0—Q=0, Q’=1 This state is also called the SET state.
• S=0, R=1—Q=1, Q’=0 This state is known as the RESET state. In both the
states you can see that the outputs are just compliments of each other
and that the value of Q follows the compliment value of S.
• S=0, R=0—Q=1, & Q’ =1 [Invalid] If both the values of S and R are switched
to 0 it is an invalid state because the values of both Q and Q’ are 1. They
are supposed to be compliments of each other. Normally, this state must
be avoided.
• S=1, R=1—Q & Q’= Remember If both the values of S and R are switched
to 1, then the circuit remembers the value of S and R in their previous
state.
B.Tech – CSE – Sem. 3
18CSS201J – ANALOG AND DIGITAL
ELECTRONICS
(Regulations 2018)
UNIT 4
Session-2 ( Gated SR Flip Flops, Edge Triggered RS Fip-flop)
Session-3(Edge Triggered D Fip-flops, Edge Triggered T Fip-flops)
Gated SR Latch
• The basic latch changes its state when the input signals
change
S
Q
Clk
Q
R
S
Q
Clk
Q
R
• This is a much simpler version of the J-K flip flop. Both the J and K inputs
are connected together and thus are also called a single input J-K flip flop.
• When clock pulse is given to the flip flop, the output begins to toggle.
Here also the restriction on the pulse width can be eliminated with a
masterslave or edge-triggered construction.
Flip-Flop Solution
• Formed by
adding inverter
to clock input
• Q changes to the value on D applied at the positive clock edge within timing constraints to be
specified
• Our choice as the standard flip-flop for most sequential circuits
25
Edge-Triggered FF Operation
26
Edge-Triggered FF Operation
27
Edge-Triggered FF Operation
28
Edge-Triggered FF Operation
29
B.Tech – CSE – Sem. 3
18CSS201J – ANALOG AND DIGITAL ELECTRONICS
(Regulations 2018)
UNIT 4
Session-6(Edge Triggered J-K Fip-flop, Edge
Triggered Master Slave Fip-flop)
J-K FLIP-FLOP
• Case 4. When the clock is applied and J = 1 and K = 1 and the previous
state of the flip-flop is reset (i.e., Qn = 0 and Q'n = 1), then S = 0 and R
= 1. Since S = 0 and R = 1, the basic flip-flop changes its state and goes
to the set state. But if the flip-flop is already in set condition (i.e., Qn =
1 and Q'n = 0), then S = 1 and R = 0. Since S = 1 and R = 0, the basic
flip-flop changes its state and goes to the reset state. So we find that for
J = 1 and K = 1, the flip-flop toggles its state from set to reset and vice
versa. Toggle means to switch to the opposite state.
Master-Slave Flip-Flops
(Pulse Triggered Flip-Flops)
• Aside from latches, two categories of flip-flops.
– Master-slave flip-flops (pulse-triggered flip-flops)
– Edge-triggered flip-flops
• Latches have immediate output response (known as
transparency)
• May be undesirable:
– May be necessary to sense the current state of a flip-flop
while allowing new state information to be entered.
Master-Slave SR Flip-Flop
• Two sections, each capable of storing a binary symbol.
• First section is referred to as the master and the second
section as the slave.
• Information is entered into the master on one edge or level of
a control signal and is transferred to the slave on the next
edge or level of the control signal.
• Each section is a latch.
Master-Slave SR Flip-Flop
• C = 0:
– Master is disabled. Any changes to S,R ignored.
– Slave is enabled. Is in the same state as the master.
• C = 1:
– Slave is disabled (retains state of master)
– Master is enabled, responds to inputs. Changes in state of master are not reflected in disabled
slave.
• C = 0:
– Master is disabled.
– Slave is enabled and takes on new state of the master.
• Important: For short periods during rising and falling edges, both master and slave are
disabled.
Master-Slave SR Flip-Flop
• Assume in 1-state, C = 0, J = K = 1.
– Due to feedback, the output of the J-gate is 0, output of K-gate is 1.
– If clock is changed to C = 1 then master is reset.
• Assume in 0-state, C = 0, J = K = 1.
– Due to feedback, the output of the J-gate is 1, output of K-gate is 0.
– If clock is changed to C = 1 then master is set.
• 1 on J input line, 0 on K input line sets the flip-flop.
– If in 1-state, unchanged b/c S,R set to 0.
– If in 0-state, S set to 1, R set to 0.
• 0 on J input, 1 on K input line resets the flip-flop. Why?
Master-Slave JK Flip-Flop
Timing Diagram for
Master-Slave JK Flip-Flop
B.Tech – CSE – Sem. 3
18CSS201J – ANALOG AND DIGITAL
ELECTRONICS
(Regulations 2018)
UNIT 4
Session-7( Analysis of synchronous sequential circuits: State Equation,
State Table, State Diagram)
Analysis of Clocked Sequential Circuits
2
State Equations
3
Fig.5-15 Example of Sequential Circuit
4
State Equation
A(t+1) = A(t) x(t) + B(t) x(t)
5
State Table
6
State Diagram
7
Flip-Flop Input Equations
The part of the combinational circuit that generates
external outputs is descirbed algebraically by a set of
Boolean functions called output equations. The part of the
circuit that generates the inputs to flip-flops is described
algebraically by a set of Boolean functions called flip-flop
input equations. The sequential circuit of consists of two D
flip-flops A and B, an input x, and an output y. The logic
diagram of the circuit can be expressed algebraically with
two flip-flop input equations and an output equation:
DA = Ax + Bx
DB = A`x
y = (A + B)x`
8
Analysis with D Flip-Flop
9
Analysis with D Flip-Flop
The binary numbers under Axy are listed from 000 through
111 as shown in Fig. 5-17(b). The next state values are
obtained from the state equation A(t+1) = A x y
10
Analysis with JK Flip-Flops
11
Analysis with JK Flip-Flop
12
Analysis with JK Flip-Flops
A(t + 1) = JA` + K`A
B(t + 1) = JB` + K`B
Substituting the values of JA and KA from the input
equations, we obtain the state equation for A:
The state equation provides the bit values for the column
under next state of A in the state table. Similarly, the state
equation for flip-flop B can be derived from the characteristic
equation by substituting the values of JB and KB:
14
Analysis With T Flip-Flops
Characteristic equation
Q(t + 1) = T Q = T`Q + TQ`
00/0 : means
state is 00
output is 0
15
Analysis With T Flip-Flops
Consider the sequential circuit shown in Fig. 5-20. It has
two flip-flops A and B, one input x, and one output y. It
can be described algebraically by two input equations and
an output equation: Use present state
as inputs
TA = Bx
TB = x
y = AB
A(t+1)=(Bx)’A+(Bx)A’
=AB’+Ax’+A’Bx
B(t+1)=xB
16
B.Tech – CSE – Sem. 3
18CSS201J – ANALOG AND DIGITAL
ELECTRONICS
(Regulations 2018)
UNIT 4
Session-8 ( Synthesis of Sequential Circuits, Problem Session)
Synthesis Sequential Circuits:
Design Procedure
3
Synthesis Using D Flip-Flops
A(t + 1) = DA(A, B, x) = ∑ (3, 5, 7)
B(t + 1) = DB(A, B, x) = ∑ (1, 5, 7)
y(A, B, x) = ∑ (6, 7)
4
Synthesis Using D Flip-Flops
DA = Ax +Bx
DB = Ax + B`x
y = AB
5
Synthesis Using D Flip-Flops
6
Synthesis Using JK Flip-Flops
7
Synthesis Using JK Flip-Flops
8
Synthesis Using JK Flip-Flops
9
Synthesis Using T Flip-Flops
The synthesis using T flip-flops will be demonstrated by
designing a binary counter. An n-bit binary counter consists
of n flip-flops that can count in binary from 0 to 2n-1. The
state diagram of a 3-bit counter is shown in Fig. 5-29.
11
Synthesis Using T Flip-Flops
12
Synthesis Using T Flip-Flops
13
State Reduction and Assignment
State Reduction and Assignment (Contd.)
State Reduction and Assignment (Contd.)
State Reduction and Assignment (Contd.)
State Reduction and Assignment
(Contd.)
State Assignment
JK Flip-Flop T Flip-Flop
Present Next
State Input State Flip-Flop Inputs
A B x A B JA KA JB KB
0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 1 0 1
0 1 0 1 0 1 0 1 0
0 1 0 0 1 0 1 0 1
1 0 1 1 0 1 0 1 0
1 0 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1 0 0 0 0 0 0
Maps for J and K Input Equations
JK Flip-Flop Sequence Detector
B.Tech – CSE – Sem. 3
18CSS201J – ANALOG AND DIGITAL
ELECTRONICS
(Regulations 2018)
UNIT 4
Session-11( Asynchronous Sequential Circuits, Transition Table)
Session-12( State Table, Flow Table)
Definitions:
State Table:
The relationship that exists among the inputs, outputs, present states and next states can be
specified by either the state table or the state diagram
Transition Table:
Transition table is table of states and transition, useful to analyze an asynchronous circuit from the
circuit diagram
Flow Table:
In a flow table the states are named by letter symbols
B.Tech – CSE – Sem. 3
18CSS201J – ANALOG AND DIGITAL
ELECTRONICS
(Regulations 2018)
UNIT 4
Session-13( Asynchronous Sequential Circuits Analysis and Problem
Solving Session)
Asynchronous Sequential Circuits
Asynchronous sequential circuits basics
✓No clock signal is required
✓Internal states can change at any instant of time when there is
a change in the input variables
✓Have better performance but hard to design due to timing
problems
Why Asynchronous Circuits?
✓Accelerate the speed of the machine (no need to wait for the
next clock pulse).
✓Simplify the circuit in the small independent gates.
✓Necessary when having multi circuits each having its own
clock.
Analysis Procedure
✓The analysis consists of obtaining a table or a diagram that
describes the sequence of internal states and outputs as a
function of changes in the input variables.
Example Circuit
✓ Construction of Asynchronous
Circuits:
• using only gates
• with feedback paths
✓ Analysis:
• Lump all of the delay associated
with each feedback path into a
“delay” box
• Associate a state variable with
each delay output
• Construct the flow table
✓ Network equations
Q1+ = X1X2’+ X1’X2Q2+X2Q1Q2’
Q2+ = X1’X2Q1’+ X1Q2+ X2Q2
Z = X1⊕Q1⊕Q2
Example Circuit: Output Table
✓ 1.Starting in total state X X Q Q =0000
1 2 1 2
✓ 2.Input changes to 01
• Internal state changes to 01 and then
to 11.
✓ 3.Input changes to 11.
• Go to unstable total state 1111 and
then to 1101.
✓ 4.Input changes to 10.
• Go to unstable total state 1001 and
then to 1011.
✓ The output sequence:
0 (0) (1) 0 (1) 0 (0) 1
CUT
Transition Table
✓ Combine the internal state with input
variables
• Stable total states:
y1y2x = 000, 011, 110 and 101
Transition Table
✓ In an asynchronous sequential circuit, the
internal state can change immediately after
a change in the input.
✓ It is sometimes convenient to combine the
internal state with input value together and
call it the Total State of the circuit.
(Total state = Internal state + Inputs)
✓ In the example , the circuit has
• 4 stable total states: (y1y2x=
000, 011, 110, and 101)
• 4 unstable total states: (y1y2x=
001, 010, 111, and 100)
Transition Table
✓ If y=00 and x=0 Y=00 (Stable state)
✓ If x changes from 0 to 1 while y=00,
the circuit changes Y to 01 which is
temporary unstable condition (Yy)
✓ As soon as the signal propagates to
make Y=01, the feedback path
causes a change in y to 01.
(transition form the first row to the
second row)
✓ If the input alternates between 0
and 1, the circuit will repeat the
sequence of states
Flow Table
✓ A flow table is similar to a transition table except that the internal
state are symbolized with letters rather than binary numbers.
✓ It also includes the output values of the circuit for each stable
state.
Flow Table