Sosnsusnshdlsksy
Sosnsusnshdlsksy
210245
DIGITAL ELECTRONICS AND LOGIC DESIGN
UNIT –III
SEQUENTIAL LOGIC DESIGN
Prof.P.C.Patil
Department of Computer Engg
Guru Gobind Singh College of Engineering , Nasik
pcpatil.webs.com
Syllabus
• Flip-Flop: SR, JK,D,T, • BCD Counter,
• Preset and Clear, • Johnson Counter,
• Master Slave JK Flip Flops, • Modulus of the counter ( IC
• Truth Tables and 7490),
• Excitation tables, • Synchronous Sequential Circuit
Design :Models- Moore and
• Conversion from one type to Mealy, State diagram and State
another type of Flop-Flop. Table ,Design Procedure,
• Registers: SISO, SIPO, PISO, PIPO • Sequence Generator and
• Shift Registers detector.
• Bidirectional Shift Register,
• Ring Counter
• Universal Shift Register
• Counters: Asynchronous Counter,
Synchronous Counter,
Books to Refer
Text Books:
Reference Book:
Properties
• The output Q and Q̅̅̅̅ are always
Complementary.
A1 G1 Q • The Circuit has two stable
State.(i.e. Q=1 Set State and Q=0
Reset State).
• The Circuit continues to remain in
A2
the same state referred to as
G2 Q Memory.
• The information is latched or
Cross Couple Inverter s as Memory locked in this circuit ,so it is also
Element referred as Latch.
1 Bit Memory Cell with input
• IF S=R=0 Circuit will be same as
prev.
• IF S=1 & R=0 then Q=1
• IF S=0 & R=1 then Q=0
• IF S=R=1 , then both the outputs
Q and Q̅̅ will try to become 1
which is not allowed and
therefore this input condition is
prohibited.
A Clocked S-R Flip Flop
0 0 Qn
1 0 1
0 1 0
1 1 ?
What is a JK Flip-flop?
• A flip-flop is a circuit that has two stable states and can be used to store
state information.
• The flip-flop can be made to change state by signals applied to one or more
control inputs and will have one or two outputs.
JK Terminology/Structure
PR = Preset
CLR = Clear
CLK = Clock
The logic states applied to the J and K inputs cause the flip-
flop to operate 4 different ways.
J K Q Q’ Mode
0 0 Q Q’ Hold
1 0 1 0 Sets JK contains an internal Active
Low SR latch.
0 1 0 1 Resets
1 1 Q’ Q Toggle
Review: Truth Table for NAND
2 Inputs: 3 Inputs:
A B X A B C X
0 0 1 0 0 0 1
0 1 1 0 0 1 1
1 0 1 0 1 0 1
1 1 0 0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
Mode of Operation: Hold
Hold: no change in Q.
J K Q Q’ Orig. Q Orig. Q’
0 0 0 1 0 1
Mode of Operation: Set
Set: Q = 1.
J K Q Q’ Orig. Q Orig. Q’
1 0 1 0 0 1
Mode of Operation: Reset
Reset: Q = 0.
J K Q Q’ Orig. Q Orig. Q’
0 1 0 1 1 0
Mode of Operation: Toggle
Toggle: Q = Q’.
J K Q Q’ Orig. Q Orig. Q’
1 1 1 0 0 1
Mode of Operation: Toggle again
Toggle: Q = Q’.
J K Q Q’ Orig. Q Orig. Q’
1 1 0 1 1 0
Overview: During a time period
Characteristic Equation
Q J K Q(t + 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 Characteristic Equation:
1 1 1 0 Q(t+1) = J.Q’+ K’.Q
If only one slide to remember…
Characteristic Equation:
J K Q Q’ Mode
0 0 Q Q’ Hold SR Latch:
1 0 1 0 Sets
A ‘0’ at the set or the
0 1 0 1 Resets
reset will either set or
1 1 Q’ Q Toggle reset the value of Q.
Race Around Condition
Master Slave Flip Flop
Input Output waveform of Mater Slave flip flop
D-Type Flip Flop
• If we use only middle two rows of the truth table of S-R or J-K Flip flop,
we obtain D- tyoe of Flip flop
J K Q
0 0 Q
1 0 1
0 1 0
1 1 Q’
D Q
0 0
1 1
T Type Flip Flop
Pr J K Q
0 0 Q
1 0 1
0 1 0
Clk 1 1 Q’
T Q
0 Q
Cr 1 Q’
Preset & Clear
• When the power is switched on the state of the circuit is uncertain.(i.e. 0
or 1)
• In many application it is desired to initially set or reset the Flip Flop to
initial state.
• This is accomplished by using direct or asynchronous inputs referred to
as preset(Pr) and clear(Cr) inputs.
• These inputs may be applied at any time between clock pulses and are
not in synchronism with
SR flip-flop with Preset & Clear
Preset(Pr)
Inputs Output Operation
Performed
Clk Cr Pr Q
CLK
1 1 1 Qn+1 Normal FF
0 0 1 0 Clear
0 1 0 1 Preset
Clear (Cr)
• The truth table of Flip Flop is also referred to as the characteristic table.
• Sometimes there is need to find input condition from the given output
condition , tabulation of these condition is known as excitation table.
S R Flip Flop
SR truth table Next state table
S R Qn+1 S R Qn Qn+1
0 0 Qn
0 0 0 0
0 1 0
0 0 1 1
1 0 1
0 1 0 0
1 1 ?
0 1 1 0
1 0 0 1
SR excitation table
1 0 1 1
Qn Qn+1 S R
1 1 0 ?
0 0 0 X
1 1 1 ?
0 1 1 0
1 0 0 1
1 1 X 0
J K Flip Flop
JK truth table Next state table
J K Qn+1
J K Qn Qn+1
0 0 Qn
0 1 0 0 0 0 0
1 0 1 0 0 1 1
1 1 Qn’ 0 1 0 0
0 1 1 0
JK excitation table 1 0 0 1
1 0 1 1
Qn Qn+1 J K
1 1 0 1
0 0 0 X
1 1 1 0
0 1 1 X
1 0 X 1
1 1 X 0
D Flip Flop
D Qn+1 D Qn Qn+1
0 0 0 0 0
1 1 0 1 0
1 0 1
1 1 1
D excitation table
Qn Qn+1 D
0 0 0
0 1 1
1 0 0
1 1 1
T Flip Flop
T Qn+1 T Qn Qn+1
0 Qn 0 0 0
1 Qn’ 0 1 1
1 0 1
1 1 0
T excitation table
Qn Qn+1 T
0 0 0
0 1 1
1 0 1
1 1 0
Conversion from one Flip Flop to Another
Conversion of Flip Flops
• SR to JK
• SR to D
• SR to T
• JK to D
• JK to T
• D to T
• T to D
• JK to SR
• T to SR
• D to JK
T Flip-Flop to D Flip-Flop
Input Present State Next State Flip- Flop input
D Qn Qn+1 T
0 0 0 0
0 1 0 1
1 0 1 1
1 1 1 0
Qn Qn+1 T
0 0 0
0 1 1
1 0 1
1 1 0
T Flip-Flop to D Flip-Flop
Qn 0 1
D
0 0 1
1 1 0
T = D Q’ + D’ Q
D
D’
T
D Flip Flop to JK Flip Flop
Input Input Present State Next State Flip Flop input
J K Qn Qn+1 D
0 0 0 0 0
0 0 1 1 1
0 1 0 0 0
0 1 1 0 0
1 0 0 1 1
1 0 1 1 1
1 1 0 1 1
1 1 1 0 0
D Flip-flop to JK Flip Flop
Q
0 1 Q 0 1
JK
JK D Q+
00 0 1 00 0 1
01 0 0 01 0 0 0 0
11 1 0 11 1 0 1 1
10 1 1 10 1 1
D = J Q’ + K’ Q
Q
J
D
K
Q’
T Flip Flop to JK Flip Flop
Excitation Table of T FF
Input Input Present Next Flip Flop
State State input
J K Qn Qn+1 T Qn Qn+1 T
0 0 0 0 0 0 0 0
0 1 1
0 0 1 1 0
1 0 1
0 1 0 0 0
1 1 0
0 1 1 0 1
1 0 0 1 1
1 0 1 1 0
1 1 0 1 1
1 1 1 0 1
T Flip-flop to JK Flip Flop
Q Q+
Q 0 1
0 1 JK Q+
JK JK
T Q+
00 0 0 00 0 0 00 Q
01 0 1 01 0 1 Q
01 0 0
11 1 1 11 1 1 10 1 1 Q’
10 1 0 10 1 0 11 Q’
T = J Q’ + K Q
Q
J
T
K
Q’
JK Flip Flop to T Flip Flop
Input Present State Next State Flip Flop Input Flip Flop Input
T Qn Qn+1 JA KA
0 0 0 0 X
0 1 1 X 0
1 0 1 1 X
1 1 0 X 1
Qn Qn+1 J K
0 0 0 X
0 1 1 X
1 0 X 1
1 1 X 0
Implement T Flip-flop by JK Flip-flop
Q
T 0 1 J K
Q Q+
0 0 1 00 0 X
1 1 0 01 1 X
10 X 1
11 X 0
Q Q
T 0 1 T 0 1
0 X 0 X 0
0
1 1 X 1 X 1
J=T K=T
Sequential Logic:
• Shift Register
i. Serial In Serial Out (SISO)
ii. Serial In Parallel Out (SIPO)
iii. Parallel In Serial Out (PISO)
iv. Parallel In Parallel Out (PIPO)
v. Bidirectional Shift Register
vi. Universal Shift Register
Buffer Register
D Q D Q D Q
Q Q Q
10110
10110
10110
Shift Register Construction
• Shift registers are comprised of D Flip-Flops that share a common clock
input.
D Q D Q D Q
Q Q Q
Registers 1.56
Registers
1.57
• a Serial In Serial Out shift register has a single input and a single output
Input D Q D Q D Q Output
Q Q Q
Registers
1.58
• A Serial In Parallel Out shift register has a single input and access to all
outputs
Input D Q D Q D Q
Q Q Q
Registers
1.59
Input
Input Input
Output
D Q D Q
D Q
Q Q
Q
Registers
1.60
D Q D Q D Q
Q Q Q
• If the register has both shifts (right shift and left shift) and parallel load
capabilities, it is referred to as universal shift register.
Registers 1.63
Registers
1.64
• n bit counter has n flip flops and it has 2n distinct states with maximum
count of 2n -1.
• Types of Counter
1. Synchronous Counter
2. Asynchronous Counter
Differences
Asynchronous Counter Synchronous Counter
• Output of the first flip flop drives • No connection between output of
the clock for the next flip flop. first flip flop and clock input of
• All the flip flops are not clocked the next flip flop.
simultaneously. • All the flip flops are clocked
• Logic circuit is very simple. simultaneously.
• These counters are slow • Logic circuit is complex.
because of propagation delay. • These counters are fast.
Ripple/Asynchronous Counter
4 Bit asynchronous down counter
Asynchronous Up/ Down Counter
Truth Table
Input Input Input Output
M Q Q’ Y for down
Y=Q’
0 0 0 0 counting
0 0 1 1
0 1 0 Y=Q
0 for up counting
for
0 1 1 1
1 0 0 0
K Map Equation for Y=M’Q’+MQ
1 0 1 0
UP/DOWN’ = Y
1 1 0 1
1 1 1 1
3 bit Synchronous Up/Down Counter
Counter has 8 states i.e N=8
2n >= N
n = no. of Flip Flop= 3
Control Input for Flip-flop
input M QC QB QA QC+1 QB+1 QA+1 J C KC J B KB JA KA
0 0 0 0 0 0 1 0 X 0 X 1 X
0 0 0 1 0 1 0 0 X 1 X X 1
0 0 1 0 0 1 1 0 X X 0 1 X
0 0 1 1 1 0 0 1 X X 1 X 1
0 1 0 0 1 0 1 X 0 0 X 1 X
0 1 0 1 1 1 0 X 0 1 X X 1
0 1 1 0 1 1 1 X 0 X 0 1 X
0 1 1 1 0 0 0 X 1 X 1 X 1
1 1 1 1 1 1 0 X 0 1 X 1 X
1 1 1 0 1 0 1 X 0 X 0 X 1
1 1 0 1 1 0 0 X 0 X 1 1 X
1 1 0 0 0 1 1 X 1 0 X X 1
1 0 1 1 0 1 0 0 X 1 X 1 X
1 0 1 0 0 0 1 0 X X 0 X 1
1 0 0 1 0 0 0 0 X X 1 1 X
1 0 0 0 1 1 1 1 X 1 X X 1
Logical diagram of 3 bit Synchronous Counter
Decade Binary Counter/Modulo N counter
• IC 7490 is a decade binary counter
Internal Diagram of IC 7490
Function table 7490
0 0 0 0 0 0
1 0 0 0 1 0
2 0 0 1 0 0
3 0 0 1 1 0
4 0 1 0 0 0
5 0 1 0 1 0
6 0 1 1 0 1
7 0 1 1 1 1
8 1 0 0 0 1
9 1 0 0 1 1
Design MOD 6 counter using IC 7490.
Logical Diagram for Mod 6 Counter
Divide by 20 counters using IC 7490
• Logical Method :-
• MOD 20 COUNTER: -We know that One IC can work as mod-10 BCD
counter. Therefore we need two ICs. The counter will go through 0-19 &
should be reset on state 20 i.e.
Q D QC QB QA QD QC QB QA
0 0 1 0 0 0 0 0
7490(1) 7490(2)
Logical Diagram for Mod 20 counter
Ring Counter
• A ring counter takes the serial output of the last Flip-Flop of a shift
register and provides it to the serial input of the first Flip-Flop.
Timing Sequence of 4 bit Ring Counter
Johnson Counter / Twisting Ring / Switch Tail Counter
Presen Next Jn Kn
t state state
0 0 0 X
0 1 1 X
1 0 X 1
1 1 X 0
Present states Next state A B C
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 X X X X X X X X X
0 1 1 1 0 0 1 X X 1 X 1
Present Next Jn Kn
1 0 0 1 1 0 X 0 1 X 0 X
state state
0 0 0 X
1 0 1 X X X X X X X X X 0 1 1 X
1 0 X 1
1 1 0 0 0 0 X 1 X 1 0 X 1 1 X 0
1 1 1 X X X X X X X X X
Sequence Generator
Sequence Detector
0 0 0 0 0 0 0 X 0 X
0 0 1 0 1 0 0 X 1 X Present Next Jn Kn
state state
0 1 0 1 0 0 1 X X 1
0 0 0 X
0 1 1 X
0 1 1 0 1 0 0 X X 0
1 0 X 1
1 0 0 1 1 0 X 0 1 X 1 1 X 0
1 0 1 0 1 0 X 1 1 X
1 1 0 0 0 0 X 1 X 1
1 1 1 0 1 1 X 1 X 0
K Map
Sequence Detector