Unit III Sequential Sync
Unit III Sequential Sync
CIRCUITS
Latches, Flip flops – SR, JK, T, D, Master/Slave FF, Triggering of FF, Analysis and
design of clocked sequential circuits – Design - Moore/Mealy models, state
minimization, state assignment,lock - out condition circuit implementation - Counters,
Ripple Counters, Ring Counters, Shift registers, Universal Shift Register. Model
Development: Designing of rolling display/real time clock
100
Sequential Circuits
Combinational
◼ The outputs depend only on the current input values
◼ It uses only logic gates
Sequential
◼ The outputs depend on the current and past input values
◼ It uses logic gates and storage elements
◼ Example
Vending machine
◼ They are referred as finite state machines since they have
a finite number of states
Sequential Circuits
101
Block Diagram
Sequential Circuits
102
Sequential Circuit Types
Synchronous
◼ The circuit behavior is determined by the signals at
discrete instants of time
◼ The memory elements are affected only at discrete
instants of time
◼ A clock is used for synchronization
Memory elements are affected only with the arrival of a
clock pulse
If memory elements use clock pulses in their inputs, the
circuit is called
◼ Clocked sequential circuit
Sequential Circuits
103
Sequential Circuit Types
ASynchronous
◼ The circuit behavior is determined by the signals at
any instant of time
◼ It is also affected by the order the inputs change
Sequential Circuits
104
Clock
Sequential Circuits
105
Flip-Flops
Sequential Circuits
106
Flip-Flops
Sequential Circuits
107
Latches
Sequential Circuits
108
SR Latch with NOR
Sequential Circuits
109
SR Latch with NOR
S = set
R = reset
Q = 1, Q' = 0 = set state
Q = 0, Q' = 1 = reset state
S = 1, R = 1 = undefined,Q and Q' are set to 0
In normalconditions, avoid S = 1, R = 1
Sequential Circuits
110
SR Latch with NAND
Sequential Circuits
111
SR Latch with NAND
S = set
R = reset
Q = 0, Q' = 1 = set state
Q = 1, Q' = 0 = reset state
S = 0, R = 0 = undefined,Q and Q' are set to1
In normalconditions, avoid S = 0, R = 0
Sequential Circuits
112
SR Latch with Control Input
Sequential Circuits
113
D Latch
Sequential Circuits
114
Symbols for Latches
Sequential Circuits
115
Edge-Triggered J-K Flip-Flop
Sequential Circuits
116
Excitation Table
Sequential Circuits
117
Edge-Triggered T Flip-Flop
T Q(t + 1)
0 Q(t )
Q(t + 1) = T Q = TQ '+T ' Q
1 Q' (t )
Sequential Circuits
118
Excitation Table
Sequential Circuits
119
Master-Slave J-K Flip-Flop
7-Oct-24
PJF - 120
Chapter 9: Sequential
Flip-Flop Problem
7-Oct-24
PJF - 121
Chapter 9: Sequential
Flip-Flop Solution
Use edge-triggering instead of master-slave
An edge-triggered flip-flop ignores the pulse while it is at a constant level and
triggers only during a transition of the clock signal
Edge-triggered flip-flops can be built directly at the electronic circuit level, or
A master-slave D flip-flop which also exhibits edge-triggered behavior can be
used.
7-Oct-24
PJF - 122
Chapter 9: Sequential
Edge-triggered Flip-Flops
7-Oct-24
PJF - 123
Chapter 9: Sequential
Introduction: Counters
▪ Counters are circuits that cycle through a
specified number of states.
▪ Two types of counters:
❖ synchronous (parallel) counters
❖ asynchronous (ripple) counters
Sequential Circuits
125
Synchronous (Parallel) Counters
▪ Synchronous (parallel) counters: the flip-flops are
clocked at the same time by a common clock pulse.
▪ We can design these counters using the sequential logic
design process
▪ Example: 2-bit synchronous binary counter (using T
flip-flops, or JK flip-flops with identical J,K inputs).
A0 A1
J J
TA1 = A0 Q Q
TA0 = 1 C C
Q' Q'
K K
CLK
129
Synchronous (Parallel) Counters
1 1 1 1 1 1 1
A2 1 A2 1 1 A2 1 1 1 1
A0 A0 A0
TA2 = A1.A0 TA1 = A0 TA0 = 1
A2 A1 A0
Q Q Q
J K J K J K
CP
1
A0 A1 A2 A3
J J J J
Q Q Q Q
C C C C
Q' Q' Q' Q'
K K K K
CLK
134
Synchronous Binary Counters
J-K Flip Flop Design of a Binary Up Counter (cont.)
135
Synchronous Binary Counters
J-K Flip Flop Design of a Binary Up Counter (cont.)
136
Synchronous Binary Counters
J-K Flip Flop Design of a Binary Up Counter (cont.)
137
Synchronous Binary Counters
J-K Flip Flop Design of a Binary Up Counter (cont.)
logic 1 JQ0 = 1
J Q0
KQ0 = 1
C
K
JQ1 = Q0
Q1 KQ1 = Q0
J
C
K
JQ2 = Q0 Q1
J Q2 KQ2 = Q0 Q1
C
K
JQ3 = Q0 Q1 Q2
J Q3 KQ3 = Q0 Q1 Q2
C
K
20
CLK
Synchronous (Parallel) Counters
Q0
1 T T Q1 T Q2 T Q3
Q Q Q Q
C C C C
Q' Q' Q' Q'
CLK
Q0 Q1
1 T T T Q2
Q Q Q
Up C C C
Q Q Q
' ' '
CLK
111 010
110
Present Next Flip-flop
state state inputs
Q2 Q1 Q0 Q2 Q1+
+
Q0+ JQ2 KQ2 JQ1 KQ1 JQ0 KQ0
0 0 0 0 0 1 0 X 0 X 1 X
0 0 1 0 1 1 0 X 1 X X 0
0 1 0 1 1 0 1 X X 0 0 X
0 1 1 0 1 0 0 X X 0 X 1
1 0 0 0 0 0 X 1 0 X 0 X
1 0 1 1 0 0 X 0 0 X X 1
1 1 0 1 1 1 X 0 X 0 1 X
1 1 1 1 0 1 X 0 X 1 X 0
Q0 Q1 Q2
J Q J Q J Q
C C C
Q1' Q2'
K Q' K Q' K Q'
Q0'
CLK
Q0 Q1
Q2
1 T Q T Q T Q
Up C C C
Q' Q' Q'
CLK
J Q0 J Q1
CLK C C
Q0
K K
FF0 FF1
CLK 1 2 3 4
Q0 Timing diagram
00 → 01 → 10 → 11 → 00 ...
Q0 0 1 0 1 0
Q1 0 0 1 1 0
J Q0 J Q1 J Q2
CLK C C C
Q0 Q1
K K K
CLK 1 2 3 4 5 6 7 8
Q0 0 1 0 1 0 1 0 1 0
Q1 0 0 1 1 0 0 1 1 0
Q2 0 0 0 0 1 1 1 1 0
Recycles back to 0
CLK 1 2 3 4
Q0
Q1
Q2
tPHL (CLK to Q0) tPHL (CLK to Q0)
tPLH (Q0 to Q1) tPHL (Q0 to Q1)
tPLH
(CLK to Q0) tPLH (Q1 to Q2)
Q0 Q1 Q2 Q3
J J J J
CLK C C C C
K K K K
CLK
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Q0
Q1
Q2
Q3
C B A
Q J Q J Q J
B
C
▪ Example (cont’d):
C B A
Q J Q J Q J
All J, K CLK CLK CLK
inputs Q K Q K Q K
CLR CLR CLR
are 1
(HIGH). B
C
1 2 3 4 5 6 7 8 9 10 11 12
Clock MOD-6 counter
A produced by
clearing (a MOD-8
B
binary counter)
C when count of six
NAND 1 (110) occurs.
Output 0
111 000
Temporary 001
state
Counter is a MOD-6
110 010 counter.
101 011
100
HIGH
D C B A
J Q J Q J Q J Q
CLK C C C C
K K K K
CLR CLR CLR CLR
CLK C C C C
K K K K
CLR CLR CLR CLR
1 2 3 4 5 6 7 8 9 10 11
Clock
D 0 1 0 1 0 1 0 1 0 1 0
C 0 0 1 1 0 0 1 1 0 0 0
B 0 0 0 0 1 1 1 1 0 0 0
A 0 0 0 0 0 0 0 0 1 1 0
NAND
output
Q0 Q1 Q2
J J J
Q Q Q
CLK C C C 3-bit binary
Q' Q' Q' up counter
K K K
Q0 Q1 Q2
J Q
J
Q
J
Q
3-bit binary
CLK C C C
down counter
Q' Q' Q'
K K K
Ring Counters
160
Ring Counters
▪ Example: A 6-bit (MOD-6) ring counter.
PRE
Q0 Q1 Q2 Q3 Q4 Q5
D Q D Q D Q D Q D Q D Q
CLR
CLK
Clock Q0 Q1 Q2 Q3 Q4 Q5 100000
0 1 0 0 0 0 0
000001 010000
1 0 1 0 0 0 0
2 0 0 1 0 0 0
3 0 0 0 1 0 0 000010 001000
4 0 0 0 0 1 0
5 0 0 0 0 0 1 000100
Ring Counters
161
Johnson Counters
Johnson Counters
162
Johnson Counters
▪ Example: A 4-bit (MOD-8) Johnson counter.
Q0 Q1 Q2
D Q D Q D Q D Q
Q'
Q3'
CLR
CLK
Clock Q0 Q1 Q2 Q3 0000
0 0 0 0 0
0001 1000
1 1 0 0 0
2 1 1 0 0
3 1 1 1 0 0011 1100
4 1 1 1 1
5 0 1 1 1 0111 1110
6 0 0 1 1
7 0 0 0 1 1111
Johnson Counters
163
Shift Registers
Shift Registers
164
Shift Registers
(a) Serial in/shift right/serial out (b) Serial in/shift left/serial out
Data in Data in
Data in
Data out
Data out
(c) Parallel in/serial out (d) Serial in/parallel out
Data out
(e) Parallel in /
parallel out
Shift Registers
165
Serial In/Serial Out Shift Registers
CLK
Clock CP
Shift control
Clock
Shift Wordtime
control
CP
T1 T2 T3 T4
▪ Serial-transfer example.
Timing Pulse Shift register A Shift register B Serial output of B
Initial value 1 0 1 1 0 0 1 0 0
After T1 1 1 0 1 1 0 0 1 1
After T2 1 1 1 0 1 1 0 0 0
After T3 0 1 1 1 0 1 1 0 0
After T4 1 0 1 1 1 0 1 1 1
Data input D Q D Q D Q D Q
C C C C
CLK
Q0 Q1 Q2 Q3
Q0 Q1 Q2 Q3
D0 D1 D2 D3
SHIFT/LOAD
Serial
D Q D Q D Q D Q data
Q0 Q1 Q2 Q3 out
C C C C
SHIFT.Q0 + SHIFT'.D1
CLK
D0 D1 D2 D3
SHIFT/LOAD SRG 4
Serial data out
CLK C
Logic symbol
D0 D1 D2 D3
D Q D Q D Q D Q
C C C C
CLK
Q0 Q1 Q2 Q3
Serial
data in
RIGHT.Q0 +
RIGHT'.Q2 D Q D Q D Q D Q Q3
Q1 Q2
C C C C
Q0
CLK
Bidirectional Shift Registers
173
Bidirectional Shift Registers
▪ 4-bit bidirectional shift register with parallel load.
Parallel outputs
A4 A3 A2 A1
Q Q Q Q
Clear
D D D D
CLK
Serial input
for shift- Serial input
right for shift-left
I4 I3 I2 I1
Parallel inputs
Bidirectional Shift Registers
174
Bidirectional Shift Registers
Mode Control
s1 s0 Register Operation
0 0 No change
0 1 Shift right
1 0 Shift left
1 1 Parallel load
Mealy Machine
10/0
A B
00/1
00 10
10 01
Moore Machine A0/0 B/0
10
01 00
00
A1/1
01
State Equations
A(t + 1) = Ax + Bx
B(t + 1) = A' x
y = ( A + B) x'
Sequential Circuits
179
State Table
A(t + 1) = Ax + Bx
B(t + 1) = A' x
y = ( A + B) x'
Sequential Circuits
180
State Diagram
Sequential Circuits
181
Analysis with D Flip-Flops
DA = A x y
A(t + 1) = A x y
Sequential Circuits
182
Design Procedure
Sequential Circuits
183
State Reduction
Sequential Circuits
184
State Reduction Example
Sequential Circuits
185
Example (Cont.)
In the next
state, g is
replaced with e
In the next
state, f is
replaced with d
Sequential Circuits
186
Example (Cont.)
Sequential Circuits
187
State Assignment
Sequential Circuits
188
State Assignments
Sequential Circuits
189
Design Procedure
Sequential Circuits
190
Example
Sequential Circuits
191
Example (Cont.)
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)
Sequential Circuits
192
Example (Cont.)
Sequential Circuits
193
Example (Cont.)
Sequential Circuits
194
Example
Sequential Circuits
195
Example (Cont.)
Sequential Circuits
196
Example (Cont.)
Sequential Circuits
197
Example (Cont.)
Sequential Circuits
198