Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
4-3
Digital Principles and System Design
Digital Principles and System Design 4-2 Sequential Circuits - Flip-Flops
•~
~i shows the block diagram
. of sequential circuit/Finite State Ma h'llle ,
.....~.~~.~:.t.0_.pr<:E~~~~<:ll_~:l.aY: ..<:~ ..~~~:.s.:_.~ .
ft .c~~cte~to.~ecoIllb;l1ational a~:::back
Combinational circuits are easy
o
elements J-;
between--=.=:::I::n:a=lonal
Comb' t" 1. Define sequential logic circuit.
__~;;I- and Sequential
2. What is flip·flop ?
3. Give the comparison between combinational and sequential logic circuits.
4. What is clock ? State its use.
A Q A
Review Question
Q
B 8 Q 8
III Latches fl. ( (7
(a) Usi~ (b) USin~AND gates (c) USiQg NO~~ II1II SR Latch
Fig. 4.2.1 ~asic bistable elem~ -blt memory cell)
• Fig. 4.3.1 shows SR latch which is l-bit
• The basic bistable element circuit has two stable ~gic 0 and logic 1, hence memory cell. S (Set)
the name 'bistable'. Q
• Two inverters 3 and 4 are connected to
• When A = 0, the output of inverter 1 is 1 (A), i.e., Q = 1. enter the digital information.
• Since the output of inverter 1 is the in..rut to the inverter 2, A = B = 1.
• Input for gate 3 is S and input for
Consequently, the output of inverter 2, .i.e., B is O.
gate 4 is R. This latch is also called RS R (Reset)
• Since the output of the inverter 2 is connected to the input of the inverter 1, latch.
Q = B = A = O.
• For understanding the circuit operation, Fig. 4.3.1 SR latch
• We have assumed same value for A. Thus, the circuit is stable with Q = A = B = 0 t f t determine the output of
and Q = A = B = 1. we mus ateIrs whose one of the . .IS IOglC. 0 and accordingly
NAND input . . we have to
• Using similar explanation it is easy to show that if it is assumed that A = 1, the . g th e ou tpu t 0 f other NAND gate in the cross coupled circuit,
determine
basic bistable element is stable with Q = A = B = 1 and Q = A = B = O. This is a • Because the output of NAND gate is 1 if anyone input is O.
second stable condition of the basic bistable element.
. as follows. In F19. 4:.,
• The circuit operation IS 3 2 the
h output
tp t off shaded NAND gate
shaded NAND as 1
• The two stable states of basic bistable elements are used to store two binary IS determined first, and the 0 input that decides t e ou u 0
elements, 0 and 1.
is shown in bold.
• In positive logic system, state Q = 1 is used to store logic 1, and state Q = 0 is Case 1 : S=R=O
used to store logic O.
. - - - - 1 If Q is I, Q and B inputs for NAND gate 2 are both.1
• Two outputs are complementary. That is when Q = 0, Q = 1; and when Q = 1, In
andthis S - R--=-.
case,output
hence . -Q -_ 0 and S = 1, the output of NAND gate 1 IS
Q = O. Since
Q = O.
1, i.e, Q = 1. tp t
Important Points
If is 0, Q and R inputs for NAND gate 2 are 0 and .1, a~d hen~e ou u
1. The outputs Q and Q are always complementary. -Q =Q1. Since
. -Q = 1 and -S -
- 1, the output of NAND gate 1 IS_ 0, i.e., Q - O.
2. The circuit has two stable states. The state corresponds to Q = 1 is referred to as . I stat e: Q -
Inilla - 0
, -Q - 1 Initial state: Q =1, Q =0
1 state or set state and state corresponds to Q = 0 is referred to as 0 state or
Reset state.
Q=O
3. If the circuit is in the set (1) state, it will remain in the set state and if the circuit is
in the reset (0) state, it will remain in the reset state. This property of the circuit
shows that it can store 1-bit of digital information. Therefore, the circuit is called a
I-bit memory cell. . 0=1
4. The 1-bit information stored in the circuit is locked or latched in the circuit. Fig. 4.3.2
Therefore, this circuit is also referred to as a latch.
m
TECHNICAL PUBLICATIONS'"- An up thrust for knowledge TECHNICAL PUBLICATIONS - An up thrust for knOWledge
Digital Principles and System Design
4-8
Sequential brcUl1s - Flip-Flops Digital Principles and System Design 4-9 Sequential Circuits - Flip-Flops
Enable1
1. What is SR latch? Explain it's operation. input
2. What is gated SR latch ? (E) 01...----
3. Explain the working of gated D latch with truth table and characteristic equation. Flip-Flop is enabled
only when the level
~~~~ ,f---uJ f
• Latches are controlled by enable signal, and they are level triggered, either positive
level triggered or negative level triggered.
V
• The output state is free to change according to the Sand R input values, when
active level is maintained at the enable input.
o t. •
L Output responds
• Flip-flops are pulse or clock edge triggered instead of level triggered. 1 only at the positive
edges of the pulse
lID Level and Edge Triggering Fig. 4.4.3 Positive edge triggering ..
"~"---
Level Triggering
-- . . . Here the output respon d s t 0 the changes in the mput
• Neg ive edge triggermg ef h 'I k pulse at the clock input.
on y at the negative edge 0 t e c oc
• In the level triggering, the ou ut state is allowed to cb aceor ing to input(s)
Output responds
~~~~l~~]-----i- [
when active level (either positive or negative) is maintained at the enable input. only at the negative
• There are two types of level triggered latches : edges of the pulse
Gated SR latch
Case 3 : If S := 1, R := 0 and the cl~ck, pulse '"
S
d Qn + 1 := 1. This is indicated m CP
app 1·reo,
Q
the third row of the truth table.
S
Case 4 : If S := R := 1 and the clock pUl~e ~s
R--:---
I' ed the state of the fli1p-fl1p 1S
app 1 , . di t d as
d fi d and therefore is m tea e
un e me f th
indeterminate in the fourth row a e
(a) SR flip-flop using NAND gates
truth table.
(b) SR flip-flop using NOR gates
d T 'ggered SR Flip-Flop
%
Fig. 4.4.5 Clocked SR flip-flop
gative E ge n . ed SR flip-flop, the negative
• The circuit is similar to SR latch except enable signal is replaced by the Clock • In the negative edge tngger h' it output S Q
Pulse (CP) followed by the positive edge detector circuit. . .1S u sed and t e circu
. e detector circuit CP
• The edge detector circuit is a differentiator.
:";onds at the negative edges of the clock pulse, R Q
~n
. d Fi . 4.4.9 shows the logic symbol,
• The Fig. 4.4.7 shows input and output waveforms for positive edge triggered • The Fig. 4.4.8 g d au tput waveforms
truth table, and mput an , for negative
clocked SR flip-flop. (a) Logic symbol
edge triggered SR flip-flop., , -flo Fig. 4.4.8
• The circuit output responds to the Sand R inputs only at the positive edges of the • The bubble at the clock input indicates that the flip p
clock pulse. At any other instants of time, the SR flip-flop will not respond to the is negative edge triggered.
changes in input.
The Fig. 4.4.6 shows the logic symbol and truth table of clocked SR flip-flop.
CP
Qn
CP
S Q
SR
01
l--_-n
00 0
0
0 o
R,S I
I
i
I
I
I
L
R Q Q--- I
11 X X
InpUtt'gagn~r~~ ~'~cked
~~.~~~
10 t t waveforms for
(._~ .. (b) Truth Table for negative edge clocked
Fig. ;4.4.9
negative edge n SR flip-flop
SR flip-flop
(a) Logic mbol Qn+1 ::: S + Ro, Fig. 4.4.8
(b) Truth table ~sitive edge clocked
~" flip-flop (c) Characteristic equation
~.
Fig. 4.4.6
Case 1
If S R 0 and the clock pulse is applied, the output do not change, i.e.
:::0 :::0
n
Q + 1 Qn' This is indicated in the first row of the truth table.
:::0
11II D Flip-Flop
• Th~wS the logic diagrams of D flip-flop. ~. CP
L
~.
D----=:.... (b) Truth table of flip-flop (c) Input and a t waveforms
Q
D fllp-flcp
Fig. 4.4.12
• Q Fl-t- 1 function follows D input at the positive going edges of the clock pulses.
Hence the characteristic equation for D flip-flop is Q n+ 1 = D.
SR flip-flop
• The output Q n + l is delayed by one clock period. Thus, D flip-flop is also known
(a) D flip-flop as delay flip-flop.
• If we connect the Q output of D flip-flop to
its D input as shown in the Fig. 4.4.13, the
CP
output of D flip-flop will change either
from a to 1 or from 1 to a at every positive
edge of the D flip-flop.
Such change in the output is known as toggling Fig. 4.4.13
SR flip-flop
of the flip-flop output.
(b) D flip-flop using NAND gates
Fig. 4.4.11 Negative Edge Triggered D Flip-Flop
• The basic building block of D flip-flop is a SR flip-flop.
• The SR flip-flop has two data inputs Sand R. CP
• The S input is made high to store 1 in the flip-flop and R input is made high to CP
store a in the flip-flop.
D --~
• When both inputs are same the output either does not change or it is invalid
(Inputs -7 00, no change and inputs -7 11, invalid). (a) Logic symbol (b) Truth table of D flip-flop
Q---~
• In many practical applications, these input conditions are not required.
Fig. 4.4.14 Fig. 4.4.15 Input output wavef!Jrms of
negative edge triggered 0 flip-flop
e In case of negative edge triggering, the output is sensitive at the negative edge of
the clock input. operation of JK flip-flop
e The Fig. 4.4.14 shows the logic symbol and truth table for negative edge triggered Case 1 : J= K == 0
D flip-flop. When J = K = a, S = R = a and according to truth table of SR flip-flop there is
e Fig. 4.4.15 shows input and output waveforms for negative edge triggeredD no change in the output.
flip-flop. When inputs J = K == a, output does not change.
e The bubble at the clock input indicates that the flip-flop is negative edge triggered.
Case 2 ~ J == 1 and K == 0
Q == 0, Q = 1 : When J = I, K = a and Q = a, S == 1 and R = O. According to
truth table of SR flip-flop it is set state and the output Q will be 1.
Q == I, Q = 0 : When J = I, K = a and Q = I, S = a and R = O. Since SR =00,
there is no change in the output and therefore, Q = 1 and Q = O.
TheinputsJ;;:;l and K=O,
r
I
p~e
table of SR flip-flop it is a reset state and the output Q will be O.
----'-
triggered clock
ITheinpufJ=K= I, toggles the flip-flop output. I
for master-slave e Fig. 4.4.18 shows the logic symbol, truth table and timing diagram of positive edge
Fig. 4.4.16 (a)
triggered JK flip-flop.
I!II JK Flip-E P
On + 1 =On J + on K = n+ K n o
Fig. 4.4.18 (d Char teristics equation • In JK flip-flop, en J = K = 1, the output toggles (output changes either from a
to 1 or from 1 to a .
CP • Consider that initially Q = a and J = K = 1. After a time interval M equal to the
propagation delay through two NAND gates in series, the output will change to
0 Q = 1 and after another time interval of M the output will change back to Q = O.
J :1 :1
: :1 This toggling will continue until the flip-flop is enabled and J = K = 1. At the end
:1 :1 of clock pulse the flip-flop is disabled and the value of Q is uncertain. This
: ,
Propagation delay
L\t
Fig. 4.4.22 Input and output waveforms for clocked JK flip-flop
Edge
detector • This condition exists when t p 2 M. Thus by keeping t p < M we can avoid race
circuit
around condition.
J • We can keep t p < M by keeping the duration of edge less than M.
• A more practical method for overcoming this difficulty is the use of the
Fig. 4.4.20
Master-Slave (MS) configuration.
TECHNICAL PUBLICATIONS"'. An up thrust for knowledge TECHNICAL PUBLICATIONS"'. An up thrust for knowledge
Digital Principles and System Design
4 - 18
Sequential Circuits - Flip-Flops
D' . I Principles and ssy\~s~te~m~D.:essJig~n~
~~
~~~
4 - 19 --=-~ _
Sequential Circuits - Flip-Flops
Realize a JKflipflop using only NOR gates.
Solution: • Fig. 4.4.25 illustrates the operation of the master-slave flip-flop.
Replacing AND by
CP~ L
bubbled NOR
... K
Q
Slave au puf:
ggered Master Slave Master Slave Master Slave
flip-flop- sets sets resets resets NC NC
connected through inverter - K Q K 0 I-- e As sho-wn in the Fig. 4.4.29, the T flip~ob~ed from a lKl!P-f!0f'_~
to the slave flip-flop.
t connecting
._.••· botJ:llDPll!?,] Cl!1cl J<. tQge_ther."
e The information present at
"'- ·__ ··___ -,-- -., -
e When J = 0 and K = 1, the master resets on the positive clock. The high Y output , Fig. 4.4.29 ~tes ,
of the master goes to the K input of the slave. Therefore, at the negative clock
slave resets, again copying the action of the master. e When T = 0, J = K = 0 and hen~is no change in the output. When T = 1,
e When J = 1 and K = 1, master toggles on the positive clock and slave then copies J=K = 1 and hence output toggles.
the output of master on the negative clock. e The Fig. 4.4.30 shows logic symbol, truth table and the characteristic equation for
e When J = K = 0, the output of master remains same at the positive clock. Thus the T flip-flop.
output of slave also remains same at the negative clock. The Fig. 4.4.28 shows the
truth table and symbol for master-slave JK flip-flop.
T o
PR CP
Qn+1
On (Toggle)
ClK
(b) Symbol
,
T o
T
ClK FF
T--i--- (t)
Fig. 4.4.31
TECHNICAL PUBLICATlONS"'- An up thrust tor knowledge TECHNICAL PUBLICATlONS"'- An up thrust for knowledge
Sequential Circuits - Flip-Flops
4 - 27
Digital Principles and System Design 4 - 26 Digital Principles and System Design
. . e
• Table 4.5.2 (a) and (b) • 0 ---7 1 TransItIOn: The pres h 0 J = K = 1 (toggle cond1tIOn).
•
. -1 d K = a (set cond1tion) or w en
show the truth table and either when J - an ith I el for this transition to occur.
excitation tables for SR Thus J has to be 1, but K can be at el er ev n 0
• 0 ---7 0 Transition: The present state of the flip-flop is 0 and is to remain 0 when those using RS flip-flops.
a clock pulse is applied. Looking at truth table of SR flip-flop we can understand
that, this can happen either when R = S = 0 (no-change condition) or when R = 1
BIll 0 Flip-Flop
• The Table 4.5.4 (a) and (b) show the
and S = O. Thus, S has to be at 0, but R can be at either level. The table indicates
truth table and excitation· table for
this with a "0" under S and an "X" (don't care) under R.
D flip-flop, respectively.
• 0 ---7 1 Transition : The present state is 0 and is to change to 1. This can happen • In D flip-flop, the next state is al~a~s
only when S = 1 and R = 0 (set condition). Therefore, S has to be 1 and R has to equal to the D input and it 1S
be 0 for this transition to occur.
mdepen d en t 0f the present state..
o
• 1---7 0 Transition: The present state is 1 and is to change to a O. This can happen Therefore, D must be a if Q n + 1 has to
only when S = 0 and R = 1 (reset condition). Therefore, S has to be 0 and R has to be 0, and 1 if Qn+ 1 has to be 1,
be 1 for this transition to occur. regardless of the value of Qn'
• 1 ---7 1 Transition : The present state is 1 and is to remain 1. This can happen
either when S = 1 and R = 0 (set condition) or when S = 0 and R = 0 (no change
BID T Flip-Flop
condition). Thus R has to be 0, but S can be at either level. The table indicates this • The Table 4.5.5 (a) ~nd (b) show the
with a "X" under Sand "0" under R. truth table and the excitation table for
T flip-flop, respectively,
JK Flip-Flop • When input T = 1, the state of the
• The truth table and excitation flip-flop is complemented; when T =. 0,
table for JK flip-flop are shown the state of the flip-flop remams (a) T truth table (b) T excitation table
in Table 4.5.3 (a) and (b) a ---7 0 and
unchanged. Therefore, for
respectively. 1 ---7 1 transitions T must be a and for Table 4.5.5
F
Solution : From F 4 5 2
---
Digital Principles and System Design .4 - 29 Sequential Circuits - Flip-Flops
-
Ig. " we can write truth table for JK flip flop as shown below. 1. Give the characteristic equation and state diagram of JK flip-flop.
For 0(t+1)
JK
Q 00 01 11 10 2. Give the excitation table for JKflip-flop. _~
o
3. Obtain the excitation table of D flip-flop. ~MDD
-
5. What is excitation table ?
:.6(1+1) =J6 + KQ
Fig. 4.5.2 6. Give state diagram of JK flip-flop.
7. Draw state diagram of SR flip-flop. . J _an
8. Draw the truth table and-excitation table of T flip-flop. ~
9. State the characteristics equations of various flip-flops.
8=0) R=D
~
Fig. 4.6.1
SR Flip-Flop to JK Flip-EI
•- '..' ~-~"-~ry;"/""""-L""'"
M The excItatIon table for above on
~~
Table 4.6.3
K-map simplification Logic diagram
~ f~D rn fi>--A/
\. (rjJJA:bi ft ForS For R
J ( Qn
r Qn
~~ s r
'./- 0 1 1
0
0 o 0 0 X 0 X 0
\l "<, ~----i-~':}-
f
Of
~- r-,
q. X r
~~
,I
o o " 1 1 0 1 0 1
, X 0
8 = rOn R =r o,
I
~
0 X
Fig. 4.6.5 Fig. 4.6.6 ~iP-fIOP conversion
"'j'4-()O -0 If we apply clock pulses to the circuit, the circuit output will toggle from a to 1 and
1 to O. Thus, we can build J-bit counter using SR flip-flop by converting it to T flip-flop.
1 o 1 X o Prepare the truth table
o for the circuit of Fig. 4.6.7 and
8
Q
show that it acts as. aT-type r
8R
flipflop. CP Flip-flop
1---- Q
R
Logic diagram
ForR Fig. 4.6.7
o T flip-flop
Fig. 4.6.8 F·Ig.469
. . JK to T flip-flop conversion
1
JK Flip-Flop to D Flip-Flop
1
• The excitation table for above c . 1is as shown in the Table 4.6.6.
version
o
o
Next state
Table 4.6.4 Truth table for the given circuit
• Looking 2.~
column 1 and column 5 of the Table 4.6.4 we can conclude that when
T = 0, the output does not change and when T = 1, the output toggles. Thus, the
given circuit acts as a T flip-flop. This is another way of implementing T flip-flop
using SR flip-flop.
_
Qn
DQ n 0 D
Input I D 0 1 1
o
"" '" ,-- '" ,,' - ,,-- - - - , - " , "'. -,{
'-- -""'-., ~---,-_." ~"
.. "", '- --- ---"'---
1 X 0
Table 4.6.5
m
Digital Principles and System Design
ps -
4 - 34
Sequential Circuits - Flip-Flops Sequential Circuits - Flip-Flops
- 35
K-map simplification
Logic diagram
T Flip-Flop to DE' -Flop
Q ForD
T n
0 1 for above conversion is as shown in the Table 4.6.9.
0 0 1 T
Present state Next state Flip-flop input
1 1 0 T
Fig. 4.6.12
Fig. 4.6.13 0 to T flip-flop conversion
o = TQn +TQn = TEB Q
n
Analyze the circuit and prove that it. is equioalent to T flip-flop. Table 4.6.9
Solution: To analyze the circuit K-map simplification Logic diagram
means to derive the truth table for it.
ForT
We have, D = Input EB Q n
Input ---11 o Output Q
n
0 0 1
ClK 0 0 1 o
1 1 0
Fig. 4.6.14
Fig. 4.6.15 11
Fig. 4.6.16 T to( 0 flip-flop conversion
When input is 0
The excitatio able for above conversion ..! IS as hown in Table 4.6.10. ~ ('f\
I/<_[T
/ P p-flop t: yO (
(
/.i.
.)
''--7
sta pu
o o j output toggles x
o
Table 4.6.8 Truth table for given circuit
• In the above circuit, output does not change when input is a and it toggles when
input is 1. This is the characteristics of T flip-flop. Hence, the given circuit is
T flip-flop constructed using 0 flip-flop.
The excit on table for above conversion is as shown in the Table 4.6.11. 1 x
Table 4.6.12 Excitation table for T to SR conversion
resent state Flip-flop input
K-map simplification
Qn D
0 0 For D
1 1
0 0
1 0
0 1
1 1
0 X
1 X (a)
Fig. 4.6.21
Table 4.6.11 Excitation table for 0 to SR conversion
K-map simplification Logic diagram II1II 0 FI' - lop to JK Flip-Flop
The exc tation table for conversion of D flip-flop to JK flip-flop:
For D s Present state Flip-flop input
ROn
S 00 01 11 10 D
o o o
R 1
/ o
0= R On + S o
1
CP SR Flip-Flop
1
Fig. 4.6.19 Fig. 4.6.20 0 to SR flip-flop conversion
1
1 o
TECHNICAL PUBLICATlONS"'- An up thrust for knowledge
TECHNICAL PUBLICATlONS""- An up thrust for knowledge
Digital Principles and System Design
4 - 38
K-map simplification
ForD
------.:...~--~~~~
Sequential Circuits - Flip-Flops
Logic diagram --
Digital Principles and System Design 4 - 39 Sequential Circuits - Flip-Flops
JO
3. Convert JK flip-flop to T flip-flop.
4. Convert a SR flip-flop into a D flip-flop.
5. Convert a T-FF into an S-R FF. Draw the circuit.
6. How will you convert a D flip-flop into JKflip-flop ?
(a) JK flip-flop
7. Convert SR flip-flop into JKflip-flop.
(b)
~-'-Eig,4.~~~ S. Convert SR flip-flop into T flip-flop.
. Oms/ruet a JK flip-flop using ~u[tiP[exerand an inverter,
pplications of Flip-Flops
---------------
Solution : The excitation table for above conversion is as shown in the Table 4.6.13. Some of the important applications of flip-flops are :
• .~ be used as a memory element.
Present state Flip-flop in
~-' //
j / f t can be used to eliminate key debounce.
o
o ~ as a basic ~()~uential circuits such as counters and
o registers. _
1 ~
1
• ~n be used as a delay element.
o o
1
o Bounce Elimination Switch
o
.~r·
1
1 interfacing
~ys
1
o to the
1
1 digital systems, v
o usually push
Table 4.6.13 button keys are o--A
Implementation table
~B
Implementation use9J
Do D1 D2
J • Push button v-=- v f---...,
0
J CD
keys when
pressed bounces
I / -:
:+-_ _-L- __ .I-I-'-~
J -'--1 Do o
J J o ~---I---1 D a few times,
1 Fig. 4.7.1 Effect of key debounce
D2 ~U~ Y 1 - - - - -..... D 01---- closing and
D3 opening the contacts before providing a steady reading, as shown in the Fig. 4.7.1.
• (feading taken during bouncing period may be faulty. This problem is known as
~ey debounce)
• The problem of key debounce is undesirable and it must be avoided.
Fig. 4.6.23
• One way to avoid key debounce problem is to use SR latch.
TECHNICAL PUBLICATlONS"'_ An up thrust for knOWledge
TECHNICAL PUBLICATlONS"'- An up thrust for knowledge
Digital Principles and System Design
4 - 40
Sequential Circuits - Flip-Flops Digital Principles and System Design 4 - 41 Sequential Circuits - Flip-Flops
::-:------- .
• The circuit used to avoid k b
ey ounce with SR latch is called a switch ----------Difu~;rti.~~;;;;;jm;;::fu;;~di~;-------------iiiiil
a. 3 Differentiate between flip-flop and latch.
debouncer. or contact
Ans. :
• The Fig. 4.7.2 shows the switch debouncer circuit and its f
wave arms.
• When key is at position A, the output VA
Latch
of SR latch is logic I, and when key is A simple latch is the basis for flip-flop
at position B, the output of SR latch is V
logic O. Latch is level triggered either positive
level or negative level triggered.
• When key is in between A and B, SR
inputs are 00 and hence output does The latch output responds to inputs, until
not change, preventing debouncing of active level is maintained at the enable
V in ut.
key output.
• We can say that the output does not o I
a.4 Give the excitation table for JK flip-flop. (Refer section 4.5.3.2)
I
change during transition I a.5 Obtain the excitation table of D and JK flip-flops.
period, I
tr----
I
eliminating key debounce. I (Refer sections 4.5.3.3 and 4.5.3.2)
I
:1
, - - -......- --18 Q
A
Ans. : In the edge triggering, the output responds to the changes in the input only at
.. t
the positive or negative edge of the clock pulse at the clock input. There are two types
8
of edge triggering.
• Positive edge triggering : Here, the output responds to the changes in the
V
I
-=-
• In synchronous sequential circuits, signals can affect the memory elements only at
Moore Model
discrete instants of time.
• In asynchronous sequential circuits change in input signals can affect memory • When the output of X
element at any instant of time. the sequential CP
~~
circuit
1 y.
Synchronous-seqdential circuits only~
~~_the--
flip-flop,_ the Fig. 5.2.1 Example of Moore model
sequential circuit is
referred to as Moore model. . . .
,.-----~' d I F' 5 2 1 shows a sequentIal CircUlt
pIe of Moore mo e. . ig. .. d
• Let us see one exam. d AND ate. The circuit has one input X an
which consists of two JK flip-flops an g
one output Y.
--.
. bles
Excitation vana
Output
-1
f ---
Output
Input { Next .. decClder jVariables
-
Table 5.1.1 Comparison between synchronous and asynchronous sequential circuits variables I.,C'....... ,.
-
state (combinational
decoder circuit)
r State variables
m Clocked Sequential Circuits Fig. 5.2.2 Moore circuit model with an output decoder
• When the output of the sequential circuit ~~~I!Q.~_~m both~ the pr~£!lt~!Clt~~ of L . ~~_~~~._~~~e~ ...~----~.---.
flip-flop(s) and on the ipput(s), the sequential circuit is referred to as ¥ealy '~;~~~tput is a function of present state
model. ~ --., .~~y. ----~..--~..-_._.__.._._---_._.._...._.
,~
Input changes does not affect the
• Fig. 5.2.3 shows the sample Mealy model. As shown in the Fig. 5.2.3, the output of
...~~~!:. _ _ _ - .
the circuit is derived from the combination of present state of flip-flops and
Moore model requires more numbe.r of
input(s) of the circuit. states for implementing same function.
• Looking at Fig. 5.2.3, we can easily realize that, changes in the input within the Table 5.2.1
clock pulses can not affect the state of the flip-flop. However, they can affect the
output of the circuit. Representation of Sequential Circuits
1/0
State Diagram 010
$tate variables
elements
Fig. 5.3.2
Fig. 5.2.7
TECHNICAL PUBLICA n,
nONS - An up thrust for knowledge
TECHNICAL PUBLICATIONS"'· An up thrust for knowledge
F
«
Digital Principles & System Design
5-8 Analysis & Design of Clocked Sequential Circuits
Principles & System Design 5-9 Analysis & Design of Clocked Sequential Circuits
3. Plot the next step map for each flip-flop
\ c
{)~ ..
r~
5. Draw the state table . an d th e ou t p ut equations from the
Solution : 1. D ete r. mthe
m flip-flop
e . input equations;:. . ,
The transition table shown in Table 5.3.1 can be converted into state table as shown
uen~ C~-;>,ND /;;:b \:' e/ .r: (/o/~.
seq, r:-~<).
ymbols to binary codes are assigned. They are a
~~~,~,j,_~::",~
= 0, b = 1.
o f 0~~"./ _.. \( /''r-<." ~
: :: ~::
(2,,1,\ .'
= BA +(X+B) A
and JBQ B +KBQB
.
:;:: X Q, B +XE8 A QB.
= XB+XE8A·B
o
00 0
+ 01 01 0 o
+
A = BA + (X + B) A 1---+--,1< B = XB + X G> A' B
10 10 0
11 0 1<.
o
The transition table can be formed by combinin9!he. above two maps. The Table 5.3.3
shows the transition table. Q./)"" ,. r-'.
Solution:
i) Logic diagram
A -,---r-.. . .
X
By assigning a = 0 0, b = 01, c = 10
X---~ "A-"'-----
and d = 11 we can write state table
B----lL---'"
from the transition table as shown.
6. Draw state diagram
From the state table we can draw
state diagram as shown in Fig. 5.3.5
Table 5.3.4
ClK --------~------------'
~
X
--> V=(A+S)'
A sequential circuit with two D flip-flops A and B, one input x, and one
Step 1: Plot the next-state map for each flip-flop. output z is specified by thefollowing next state and output equations :
ForA+ A(t + 1) = A'+B, B(t + 1) = B'x, Z = A + B', (
11 0 1 11 0 0
Next state
X=o X=l
A +, B+ A+ B+
CLOCK ----..---------'--~
0 O. 0 1
Fig. 5.3.8
0 0 1 1 2. State Table
0 0 1 0 Step 1 : Plot the next-state map for each flip-flop.
0 0 1 0 ForA+ ForB+
X X
Step 3: Draw the state table. AB 0 1 AB 0 1
!inState diagram
00 1 1 00 0 1
By assigning a = 00, b = 01, c = 10 and d
0/0
we can write state table from the transition Ie. 01 1 1 01 0 0
+ - + -
A == A+B B == BX
10 0 0 10 0 1
Next state 11 1 1 11 0 0
1/0
ig. 5.3.7
1 o 1 1
•
J '
1. Explain the various steps in the analysis of synchronous sequential circuits with suitable example. Example
• We start with a sequential circuit whose specification is given in the state diagram
~
of Fig. 5.4.1.
III Design of Clocked Sequential Circuits Step 1: Determine the state table forgiven state diagram.
•
Steps for design of clocked sequential circuits
. Table 5.4.1 shows the state table for given state diagram.
• The recommended steps for the design of a clocked synchronous sequential circuit
are as follows :
1. It is necessary to first obtain the state table from the given circuit information
such as a state diagram, a timing-diagram, or other pertinent information.
2. The number of states may be reduced by state reduction technique if the
sequential circuit can be categorized by input-output relationships independent
of the number of states.
Table 5.4.1 State table
3. Assign binary values to each state in the state table, i.e, state assignment.
---------------~-------
TECHNICAL PUBLICATIONS'''- An up thrust for knowledge
TECHNICAL PUBLICATIONS"'- An up thrust for knowledge
Digital Principles & System Design 5 - 22 Analysis & Design of Clocked Sequential Circuits . I principles & System Design 5 - 23 Analysis & Design of Clocked Sequential Circuits
~
Step 2: Find equivalent states.
solution:
., Looking at the state table for two present states that go to the same next state and 1 . Find equivalent states. The
step ' . . 'E
have the same output for both input combinations, we can easily find that states c T ble 5.4.3 shows the eqUlvalent
Q)
~rn
and e are equivalent. at s in the given state table. The . - Q)
:J .....
sta e 0".l9
Wrn
., This is because, c and e both states go to states c and d and have outputs of 0 and A and C, and states Band E
stateS
1 for X = 0 and X = 1, respectively. Therefore, state e can be removed and gen
erate exactly same output and
replaced by c. arne next state. Hence, state A and
~ are equivalent and similarly states Table 5.4.3 Equivalent states
., The final reduced table is shown in Table 5.4.2. The state diagram for the reduced
13 and Eare equivalent.
table consists of only four states and is shown in Fig. 5.4.2.
step 2 : 'Replace redundant states with equivalent states.
:. Replace C by A and replace E by B, and remove states C and E.
1/0 NoW, there are no equivalent states and hence Table 5.4.3 (a) shows the minimized
state table.
1/1
TECHNICAL PUBLICATIONS'"· An up thrust for knowledge TECHNICAL PUBLICATIONS'''· An up thrust for knowledge
•
r
I
i
Digital Principles & System Design
--------------..,------------------
TECHNICAL PUBLICATlONS"'- An up thrust for knowledge
t_-....- _
Digital Principles & System Design
K-map simplification
5 - 36 Analy"s & Des;gn of Clockad Saquant;., C;nMts r O;g;tat Princ;pJes & SysJem Des;gn
D
Digital Principles & System Design
5- 38 Analysis & Design of Clocked Sequential Circuits
With these flip-flop input functions and circuit output function we can draw the logic
diagram as follows :
r
,
,r
DigitalPrind.le, & S,s/em Design
----- 5 - 39
A K.map simplification
B B
x B AB
X
0 1 AB
X
0 1
B x 00 x 0 00 0 .0
X
A
01 0 X 01 X 0
X
11 0 0 11
10
cp-----r------- ---.J
A Output (Y)
B Therefore input function for RA = ABX + ABX
x - - --
. . (b) / . SA = ABX+ABX
~~JI~.iaglram. of given sequential circuit using T flip-flops
Fig.
RB = AB + BX
3. Design us~~s fIiP-fl~)-?Lrf \ ~ ~
v SB = ABX and,
Using the excitation table for RS hip-flo~ - --
shown in Table 5.4.16 we can determine the Circuit output function = AX + A B X
excitation table for the given circuit as shown With these flip-flop input functions and circuit output function we can draw the logic
in Table 5.4.17.
diagram as follows :
A
Table 5.4.16 Excitation table for RS flip-flop B
X--L.._"
The first row of circuit A-..r--.....
B
excitation table shows that X-"""L-_"
there is no change in the
state for both flip-flops. The
transition from 0 ~ 0 for RS
flip-flop requires inputs R
and S to be X and 0,
respectively. Similarly, we A
can determine inputs for X
Output (Y)
each flip-flop for each row A-..r-~ .....
B
in the table by referring X-"'L-_
present state, next state and
Fig. 5.4.16 Logic diagram of given sequential circuit using RS flip-flop
excitation table. Let us use
K-map simplification to
Table 5.4.17
TECHNfCAL PUBLICATIONS'"_ An up thrust for knowledge
TECHNICAL PUBLiCATIONS'" - An up thrust for knowledge
1IIttt _
Digital Principles & System Design
Using the excitation table for JK flip-flop shown in Table 5.4.18 we can determine the
r
I
Digital Principles & System Design 5 - 41
KB = A+X
Analysis & Design of Clocked Sequential C~
excitation table for the given circuit as shown in Table 5.4.19. Circuit output function = AX + A BX
A
S X
Flip-flop inputs
X
~'~~~--~"--~~'---~-----
B
JA KA J B x A
X
0 X 0
1 X 0 A
X
1 X X A-""--~ -......
Output (Y)
x-
B _
0 X X
Fig. 5.4.18 Logic diagram of given sequential circuit using JK flip-flop
X 0 0
ntial circuit using RS flip flops for the state
X 1 1
mber of flip flops.
X 1 X
JK flip-flop X 0 X
Table 5.4.19
The first row of circuit excitation table shows that there is no change in the state for
both flip-flops. The transition from a ~ a for JK flip-flop requires inputs J and K to be
a and X, respectively. Similarly, we can determine inputs for each flip-flop for each row
in the table by referring present state, next state and excitation table. Let us use K-map
simplification to determine the flip-flop input functions and circuit output functions.
K-map simplification
x
AS _ _-
DO
01 .... d
Solution: From example 5.4.2 we have rrururruze
11 state table for given problem as shown in the
10 Table 5.4.19.
...\
Digital Principles & System Design 5 - 42 Analysis & Design of Clocked Sequential Circuits r Digital Principles & System Design 5 - 43
---
Analysis & Design of Clocked Sequential Circuits
1
i ~ Design Wit~~
• There are occasions when a sequential circuit may use less than the available
number of states. We can consider the unused states as don't care conditions and
a can be used to simplify the input functions to flip-flops.
b • Let us consider one example. First we will design the given sequential circuit
c without using unused states and then we will design the given sequential circuit
d
using unused states.
e
K~map simplification
ForRA For Re
BC BC
xf!\. 00 01 11 10 Xf!\. 00 01 11 10
oosx --5(' 0 X 00 X 0
01 1 X X X 01 X X
11 1 X X X 11 0 X X X 11 0 X X X
,L
10 X X X X 10 0 0 0 0 10 X 0 0 0
~~t'
ForSe ForRe ForSe
BC
Step 1: Derive excitation table
XA 00 01 11 10 00 01 11 10 r-'
The excitation table for given state diagram is as follows
00 X 1 1 ~ 00 0 0 0 0
01 X X X X, 01 0 X X X
11 0 X X X 11 1 X X X
10 X 0 0 0 10 1 X X 1
A C
CP - f - - - - - d ' S
A--r-- A X
C
X-t...-'" A
S·r--
C
, ) li
Digital Principles & System Design 5 - 44 Analysis & Design of Clocked Sequeniist Circuit« ~afPrincipies
!
Syslem Design 5 - 45 Analysis & Daslgn of Clocked Saquanlial Clnoul/S
Step~ma lification for K i: u; and gr;~t- o;;V Derive circuit output and flip-flop input~C~~~~d-$~
/
ex
.. F~rJA For KA ex For JB . ex For K
B
et us see the circuit design with the use of unused states. These unused states ODD,
AS 00 01 11 01 11 AS 00 01 11 10 AS 00 01 11 10 101 and 111 are considered as a don't cares and are used to simplify the K-maps as
)-~-
00 0 00 X X 00 X follows :
01 0 0 01 X X X X ForJ A
ForJ B
ex Sexoo ex
11 X X AS 00 01 A 01 11 10 AS 00 01 11
11 0 0
00 X X 00 ··x X 1 i1i 00 X
10 X X 10 X X
01 0 0 01 X X X lxl
i i 01 X
11 X X 11 X X X !X! 11 0 11 0 0 X ·X
ForJ c ForKc
cx-. ex ex
For Output 10 X X 10 1
k •._ 0 X lxl 10 0 10 X X X X
AS 00 AS 00 01 11 AS 00 01 11 10
00 00 00 ForJ c ForK c For Output
" . \ 01
11 11 X X
10 10 X X 01
Fig. 5.4.22 11
Therefore, input functions for 10
Fig. 5.4.24
Therefore, input functions for
A
8
C
X
Output (Y) A----o-,
A B
!l. C
B ~
c
x x ~---.---- Output (Y)
.t, C
x---._-
8
C xc c
(A~ C]<) Output of AND 7
X
. (A C X) Output of AND 5
cp--..------------~ Output otAND 3
L~
(b)
(a)
Fig. 5.4.23 Fig. 5.4.25
TECHNICAL PUBLlCATlONS"'_ An up thrust for knowledge TECHNICAL PUBLlC~S'M - An up thrust for knowledge
5 - 47 Analysis & Design of Clocked Sequential Circuits
Digital Principles & System Design
Digital Principles & System Design 5 - 46 Analysis & Design of Clocked Sequential Circuits
From the logic diagram it can be realized that using unused state as don't cares we solution:
step 1 : State diagram
can furt r sim e ' -flop input functions and circuit output function.
Here, states 5, 2 and a are forced to go
into 6, 3 and 1 state, respectively to avoid
ocked Condition
lockout condition.
• --I.i"l:-e~gy;R-ff~'[f
the next state
of some. unused state is again
an unused state and if by step 2 Excitation table
chance the counter happens Next states
to find itself in. the unused
states and never arrived at a B+1
used state then the counter is (a) Desired sequence (b) Uhused state forming lockout
a a
q
f
. said to be in the lockout
onditions. This is illustrated
in the Fig. 5.4.26.
Fig. 5.4.26
1 a
a 1
~
• The counter which never goes in lockout condition is called self starting counter.
a a
• The circuit that goes in lockout condition is called bushless circuit.
(~
1 1
• To make sure that the counter will come to the initial state from any unused state,
the additional logic circuit is necessary. 1
• To ensure that the lock out does not occur, the counter should be designed by 1
forcing the next state to be the initial state from the unused states as shown in
1
Fig. 5.4.27.
o 0 o x x
00 ~ o 0
X X
-:
Fig. 5.4.27 State diagram for removing lockout
JS=A
JA =BC
For example, as shown in Fig. 5.4.27, actually it is not necessary to force all unused For Kc
For K B
states into initial state. Forcing anyone state is sufficient. Because if counter initially 11 10
00 01 11 10
goes to unused state which is not forced, it will go to another unused state. This will A 0 X
continue until it reaches the forced unused state. Once forced unused state is reached
0 X
next state is used state, and ree circuit. This is illustrated in Fig. 5.4.27 (b).
J c = A+ B Kc=B
Step 3:
So = 0000,
Assign states,
5 - 49 Analysis & Design of Clocked Sequential Circuits
Next state
x = 1
x = 0
Sl = 0001,
. 0001 0010
~JA - 0A Js Os
I-V Jc °c I--<
S2 = 0010,
0011 0100
S3 = 0011,
r-<t>@ ~0 0011
crAP t>0
,---< ,---< 0100
D-~KA KS
OS r KC Oc
S4 = 0100, 0101 0110
S5 = 0101, 0110 0101
S6 = OlIO, 0111 1000
1000 0111
CP
S7 = 0111,
0000 0000
Fig. 5.4.29 S8 = 1000.
0000 0000
Step 4: Determine the . state
Table 5.4.23(b) State transition table
transition table.
For a four bit even parity bit generator inputs c l erially. The four bits of
the input sequence are to be examined by the circuit and a parity bit Design a sequential circuit with 4 FF ABCD. The next states of B, C, Dare
which is to be added in the original sequence. The circuit equal to the present states of A, B, Crespectively. The next state of A is equal to the
I another four bits after producing a parity bit for the last seq EX-OR of the present states of C and D.
I'
~
and write down the state transition table. Solution:
Solution: ~--------------I
(
I Step 1: Draw the state diagram. Step 2 : Determine the stable table. DA QA Dc Qc DO Qo
F/F F/F
The state diagram for given problem is Next state F/F
[ i
© @
f
as shown in the Fig. 5.4.30. ®
x=O x=l Qc
synchronous
for the given
~.'
f
I
Digital Principles & System Design 6-2 Shift Registers
i
I
I
III I~roduction A B c D
• When the first negative clock edge arrives, the stored binary information becomes, • As seen above the 4-bit register can store 4-bit binary information. In general, n-bit
QAQBQCQD = ABCD register can store n-bit binary information.
A B c D
PA QA DC Qc
What is register ?
<9 e What is buffer register ?
What do you mean by controlled buffer register ?
• When you want to store data in the register, you have to make LOAD or WR Data bits
signal low to activate the tri-state buffers.
• When you want the data at the output, you have to make RD signal low to
activate the buffers.
[tiTI ~ C[fdJJ L{ffijJ
• Controlled buffer registers are commonly used for temporary storage of data ~
Data bits
within a digital system.
(e) Parallel shift in (d) Parallel shift out (e) Rotate right (f) Rotate left
.~ According to the data movement in a register, there are different types of shift , . CP
registers. ! I
I Types of Shift Registers
i-D,
I I
j In I
..... , .. ...
i
I .~
j I 1 1 1 1
~~~)iShift Register
I
I----- 00
.... ... .... ......
01
0 1 1 1
Shift Left Mode I-----
i I
• Fig. 6.3.1 shows serial-in serial-out sh~register. i I
0 1 1
I·· •
D OU !- °A DA Os Os °c Dc
!
°D DD ---- Din
-- °2 I
0
-----
..
Jli1SL
CP
=1 1000 1100 1110 1111
...__.-.....'_.,_...
. Data in register
.. ,,',,"
Fig. 6.3.1 Shift-left register Fig. 6.3.2 Waveforms for shift left register
;) We will illustrate the entry of the four bit binary number 1111 into the register, Shi~ode ." .....
beginning with the left-most bit. Initially, register is cleared. • Fig: 6.3.3 shows serial-in serial-out S~ri~register.
r
SO QAQBQCQO == 0000 Din- 0 3 O2 01 Do 00 ~
°3 °2 °1
• The Table 6.3.1 summarizes the shift left operation. r< ~@
r-< >.0 --c >® --c >@
CP
Fig. 6.3.3 Shift-right register
• We will illustrate the entry of the four bit binary number 1111 into the register,
beginning with the left-most bit. Initially, register is cleared.
SO Q 3Q2Q1QO == 0 0 0 0
• Table 6.3.2 summarizes the shift right operation.
it
Digital Principles & System Design 6-7 Shift Registers
I······
Serial
03 Q3 data
-0
. In I -= CD
Qut-,
! i 1 1 1
............ Q
3 cp_~--====_l--====----l~===~....J
i ! '···1 i··· ... ...
i I Fig. 6.3.6 Parallel In Serial Out (PISO) shift register
- ~. Q a 1 1 1
r
2
i I
!
._. ..... Q
1
I a .rr 1
• There are four input lines A3, A 2, AI' A o for entering data in parallel into the
register.
! i
I • SHIFT/LOAD is the control input which allows shift or loading data operation of
0°1 a a a! 1
the register.
I
-1 0000
.
1000
_.~---_._~----
1100 1110
---
1111 Data in ,~, ..
, ", • When SHIFT/LOAD is low, gates G I, G2, G3 are enabled, allowing each input
data bit to be applied to D input of its respective flip-flop.
Fig. 6.3.4 Waveforms for shift right register
• When a clock pulse is applied, the flip-flops with D = 1 will SET and those with
erial In Parallel Out (SIPO) Shift Register
D = a will RESET.
• The data bits are entered serially into the • All four bits are stored simultaneously.
register but the output is taken in parallel. • When SHIFT/LOAD is high, gates G I, G2, G3 are disabled and gates G 4, Gs, G 6
• Once the data are stored, each bit appears are enabled. This allows the data bits to shift right from one stage to the next.
on its respective output line and all bits • The OR gates at the D-inputs of the flip-flops allow either the parallel data entry
are available simultaneously as shown in operation or shift operation, depending on which AND gates are enabled by the
Table 6.3.3 Truth table
Fig. 6.3.5.
level on the SHIFT /LOAD input.
J
Oat~-.- 0
input' 3 °3 °2 °2 ~
°1 °1 ~O
°0 I-- Parallel In Parallel OU~hift Register
r-<: >0 r-<: >0 r-<: ><D r-< >(2)
• In 'parallel in parallel out register', there is simultaneous entry of all data bits and
the bits appear on parallel outputs simultaneously.
• Fig. 6.3.7 shows this type of register.
Parallel In_~~ljal/o6hiftR~gist~r
• In this type, the bits are entered in parallel i.e simultaneously into their respective
stages on parallel lines.
• Fig. 6.3.6 illustrate~ a four-bit parallel in serial out register.
TECHNICAL PUBLICATlONS"'- An up thrust for knowledge
• When parallel load capability is added to the shift register, the data entered in
/: --
parallel can be taken out in serial fashion by shifting the data stored in the
Q3 Qz Q1 Q
- --....--
Parallel data outputs
- register. Such a register is called bidirectional shift register with parallel load.
• Fig. 6.3.9 shows bidirectional shift register with parallel load.
Fig. 6.3.7 Parallel In Parallel Out (PIPO) shift register
• As shown in the Fig. 6.3.9, the D input of each flip-flop has three sources: Output
Bidirectional Sh,fCRegister of left adjacent flip-flop, output of right adjacent flip-flop and parallel input. Out
• This type of register allows shifting of data either to the left or to the right side. It of these three sources one source is selected at a time and it is done with the help
can be implemented by using logic gate circuitry that enables the transfer of data of decoder. The decoder select lines (SLI and SLo) select the one source out of
from one stage to the next stage to the right or to the left, depending on the level three as shown in the Table 6.3.4.
of a control line. Parallel Inputs
RIGHT / LEFT
Serial data in
for right-shift
Parallel outputs
• When a clock pulse arrives, the data are shifted one place to the right. is shifted l-bit right.
32 fi44
- 128 • The clock input of the
LSB 0A
0
I I
0
I
j
L
1
HIGH
• A binary ripple/asynchronous counter consists of a series connection of
complementing flip-flops, with the output of each flip-flop connected to the clock
1>(6) n @ n
~ JAOA ~ Js Os p- J I-
input of the next higher-order flip-flop. c °c
e The flip-flop holding the least significant bit receives the incoming clock pulses.
CP - t--<
-
o
L- KA °A
L- Ks as '-- Kc Oc I-
• A complementing flip-flops can be obtained from a JK flip-flop with the J and K
inputs tied together as shown in the Fig. 7.2.1 or from a T flip-flop. Fig. 7.2.2 (a) Logic diagram
• The D input is always the complement of the present state and the next clock
pulse will cause the QA ....2...-J
,
0 0 0
HIGH-.......- - -_ _---,
flip-flop to complement
Qs
o o
-.::.-......-----
0 0
• Fig. 7.2.1 (a) shows 2-bit
CP JlI1Jl.IL o
asynchronous counter using 0 0
t:' ''-X~
-
1. Explain in detail the operation of a 4-bit binary ripple counter. ~ . ()i
2. Design and explain the working of an up-down ripple counter. 7)f) /1\l/
'';;:J , . Co-J'JL~--
I ~ :Jro r ~:.{/ ~
I~~~~~ (lRJ f1
.
ronous) Counters
- ,iN !()~
.. ~~.
i
'(J~,k
, l r- lD'.....},(11'
r
('Of'
J..~
MJ-(
. .
~
? ()t-"~I
~
Qf!-. Table 7.3.1 Truth table for BCD counter '---
. .
1. Determme the number of flip-flops needed. ? / V' In
r: r
--
AB ' 00· 01.
ipPut~~ip-flops ~ If ]K flip-flops~re used connect both J and~ l'~W----
MM._._
AS 00 1 1 i 1 1
~all flip flops-!,o logic 1._ _.. _._-,'
Step 3 : Write the truth table for the counter Reset logic
Since, T input is connected to logic 1 each flip-flop toggles at clock input. The elK
Fig. 7.3.4 shows the timing diagram for 3-bit asynchronous counter.
CP
:
QA -LJ a a j a L Reset logic
Fig. 7.3.7
Qs a a a a j L
Qc a a a a L
~l I
Count 001 010 011 100 101 110 111
stage 1 2 3 4 5 6 7
occurrence of count 1010.
Fig. 7.3.4 Output waveforms for 3·bit asynchronous counter [Ans, ; y = A + DC]
Example 7.3.5 : Design mod 5 ripple counter using T flip-flops.
Step 1: Determine the number of flip-flop required. Here, counter goes through 0 - 5
states, i.e., total 6 states. Thus N = 6 and for 2n ~ N we need n = 3, i.e. 3
flip-flops. Synchronous Counters
. 1 k d such that each flip-flop in the counter is triggered at the
Step 2: Type of flip-flops to be used : T 61 When counter IS c oc e
same time, the counter is called as synchronous counter.
?- K-Map simplification
n
ForJ c For Kc ForJ s
1. Dete'mine the numbe, of flip-flops needed. If n 'epresents number of flip-flops BOA BOA
2 2:: number of states in the counter. oc 00 01 11 10 oc 00 01 11 10 11 10
2. Choose the type of flip-flops to be used. 0 0 0 1 0 o rX' X X X' X
1 X X X X 1 iii X X X o X
3. USing
counter.excitation table fa, selected flip-flop detennine the excitation table fa, the
Jc = °BOA
ForKs
4. functions.
Use K-map any other simplifleation method to derive the flip-flop input DO
0'
11 10 oc B A00 01 11 10
X X l' 0 0 X 1 1 X'
1 X X ..0..1 X 1 lx X X X
JA =Qc
Fig. 7.5.1
- .....S lution : - y -< (). tX <:> "" .. 0.. 0) ff
J7)8 :';-'f! i f
~ '2 '~)
ep 1: Detennine the numffer of flip-flop needed Step 5: Draw the logic diagram Timing Diagram
L Ti Flip-flops required are
2 n 2:: If\J)
i. oD(j;lJ-'
t.,,/..-(
Ie.;
-:;?
r
/ F(::-
n = 3 i.e. ~_flip-flops are required._
>
CP .
Qs 0 0 I
I
I
I0
I
0
I
°A(LSB)
<;
Os
-..........--
°c(MSB)
.--/
Qc 0 0 0 I
,
I
0
rTl I
0
Outputs
Solution :_~ d d
Step 1: Determine the number 0 . -flo
.~ p s nee e .
~ble 7.5.2 Excitation table '0' count.. For designing mod 6 counter using the formula
2 n 2:: N
r[\\ ~.' ~~
~) . .t>:>
Here
Step 2 :
N - 6 '.. n = 3
Type of flip-flops to be used : T
. 3 flip-flops are required.
I.e..
step 2:
.
Type of flip-flop to be used : SR
7 - 25 Counters
ForTe ForT B
I 01
01 11
QQ
B A
\ 10 QC 00
0 1
01
1
11
1
10
1
1 1 1 X X
Fig. 7.5.3
Step 5: Draw the logic diagram.
0 0 0 0 X X X 0 X 0
Q e (MSB)
---------------------~-- X X X 0 0 0 0 X 0
Outputs
Fig. 7.5.4 logic diagram SA =ii:BC RA =ABC SB=BC
y ~..
Solution:. ~ade co~
e.1'\/;) 0' is a mod-lO Counter. It has ten states: 0 _ 9.
\~ \ '\"","r®-®-~_"", ""
~o\·:\· ~
00
~
01
\ \ ,0 " \ Fig. 7.5.6 11
Step 1 Determine the number of flip-flops needed. 10 10 Io=:~ _
Step 2 :
~
We know that 2" N. Here, N 19 .. n ~ ~ 4 i.e. 4 flip-flops needed. 'A
'----'----
Qo_...._-,
Os
QA--'--''''-
Qs
°A- ._-
°c_ . ,
Qs h"..---==_ . -I (lSB)
QA
ClK -~===--------
Fig. 7.5.8 Logic diagram
'r
Table 7.5.7 Excitation table for counter
CD CD
AB 00 01 11 10 AB 00 01 11 10
00 1 X X 1 00 X 1 1 X
01 1 X X 1 01 X 1 1 X
11 X X X X 11 X X X X
10 1 X X X. 10 X 1 X X
K D :: 1
Fig. 7.5.9
Implementation
Logic 1
A
D
K-map simplification
CLK--+-------If-----+------+-----+------+----J
ForJA
CD Q D (LSB)
AB 00 01 11 CD ForJs
AB 00 01 11 10 CD
00 0 0 AB . 00 01
00 X
'Y=~
X
,,--
X
01 0 00 0 0
0
01 X X X X 01 X
11 X X X
11 X X X X 11 X
10 X X X
0 0 1 X, X Step 1: Determine the number of flip-flops needed. Here, counter should count
10 0 0
J A :: BCD
maximum count = 7 = (111h which is 3-bit. Thus, we need 3-flip-flops.
--
DlgJta
. . I Principles & System Design
CP~---~+-~~--I~
A(MSB) B C (LSB)
"-----------------.......--- - - - - -. - /
Output
Table 7.5.8 Excitation table of JK
flip-flop
ForKS
BC Be BC ac Be ForKC
A 00 01 11 10 BC Be BC BC BC
----... 00 01 11 10
0 r"-'-
X X 0 X A 00 01 11 10
-,
0 IS. 1 X x . ~J
A 1 X
A 0- x 0 0 x
X 0 1 A 1 0 X X
~,.
0 A 1
Kc=A
Fig. 7.5.11
ForR c
Counters
For Sc :::0
M M= 1
M= 1 D CD 10
M =0 CD 10 AB 00 01 11 10 AB 00 01 11
01 11 10 . AB 00 01 11
......::.::.:...-;;..:..,....;..;..,--.., X 00 X X 0 1 00 X 0
o X 0 00 0 0
X 0 01 X 0
01 0 X 01 0
0 X 0
X 11 X X X X
X X X 11 X X
X X X 11 X
10 X X X X
X 10 0 X X
0 X X 10 0 0 X
Rc=MCD+MCD
Sc =M BC is + MAC D
{fJ M::: 0
For So
M=1 ,tV - M::: 0
01 11
For R o
AB
CD
00 01 11 10
M =1
CD 10
CD
00 01 11 10 AB 00 01 11 ....
AB
.~ i"····· '~"i
""~
1 00 0 '--1 ' f' 0
00 1 0 0 1 00 1 0 0
01 0 1 1 0
0 1 01 1 0 0 1
01 1 0
~;~
11 X X X X
Table 7.5.10 X 11 X X X X
11 X X X
1 X. X
/~!-.
'~..J
""'"".
r-""_
00 0 0 0 0 00 0 0 00 X X X X 00 X X CP--------~-----------'
."'.~ M-r--....
01 0 X X X 01 X X 01 1 0 0 0 01 0 0
.....,
,
,""'."
B
C
"5
11 X X X X 11 X X 11 X X X X 11 X X M-r"-.....
!}}.,.,;
A
10
b",c!
1 0 X X
t,,,.w,
10 0 0 10 0 X X X 10 X X E~--
R B = M BCD + MBCD
Fig. 7.5.14
.a.,;
Hil Jc
c
- JA .A.. L-_ JB
Solution:
Step 1 : Since 2 3
> 7, three flip-flops are required
:-< > 0 r< > ® :-< > e Ie ~
solution:
step 1 : Since N = 10,
step 2 : Flip-flops to be used: T
Determine excitation table for counter
step 3 :
Next state
ForJ s
BC BC BC
A 00 01 11 10 A 00 01 11 10 A 00 01 11 10
,....
0 1 1 0 X 0 X X X X 0 1 0 X X
1 X X X X 1 1 1 0 X 1 1 0 X X
~~." , . . .>• • •
Ks =1 Jc = 1 KC=A
Fig. 7.5.15 (a)
---
Counters , 'tal Principles & System Design 7 - 37 Counters
DIg'
Step 4 : K-map simplification
ForTs
QSQA
B A ForTe
QoQ c 00 01 11
C 00 01 11 10 QSQA
00 0
lip-flop inputs
00 1 1 1 QoQe 00 01
1
01 1 1 1 1
00 0 0 TB TA
11 X X X X 01 0 0
11 X X X X
10 0 0 X X 10 1
11 X 1 1
1 X X
10 0 0 0 1
Tc = QAQ B 1 1
Fig. 7.5.16
0 1
Step 5: Logic diagram
High 1
0 1
1 1
0 1
0 1
1 1
CP-e>--------I-- - - ---J 0 1
1 1
Fig. 7.5.17
0 1
Step 6: Timing diagram
1 1
Fig. 7.5.18 shows the timing diagram for the synchronous decade counter. 0 1
CP 1 1
K-map simplification
1 I 0 0 1 j 0
o o ForTe ForTs
o 0
1 0 0
11 10
QSQ A
UD Q c 00 01 11 10 c 00 01 11 10
o o o o o o o o
L o o 00 00
1 1 1 1
01 1 1 1 1
11 1 1 1 1
1 1 1 1
10
------------.~
!!I'
'!
7-38
7 - 39
logic diagram Counters
LSB
CP - - 4 , - - - - - - - - , - - + - - - - - - - - - - - J
CP--4-----....::.:::.~k _J
Solution: N = 3 and
1
o 0 Table 7.5.14
ForKs
QSQA
Qc 00 01 11 10 00 01 11 10 Q
c 00 01 11 10
Step 1 : N = 7, and since 2 3 7 0 X X a ~J_ ---xl X 1J 0 X 1 1 X
> , n = 3 i.e. Flip-Flops needed = 3
Step 2: Flip-Flops used: JK
X lX X 1 1 X X a 1 X 1 X X
.-
Ks =QA + Qc
Step 3: Transition table
Fig. 7.5.24 (a)
. Nexfstate Step 5 : Logic diagram
a a
a 1 a
a 1
Clock---1IIJo-----------_-------------'
1 a a Fig. 7.5.24 (b)
1 a 1
1 1 a Solution:
a a a Step 1 : Here, N = 4 and since 2 2 :::: 4 we need 2 Flip-Flops
x x x Step 2: Flip-Flops to be used : JK
TECHNICAL PUBLICATIONS'"
- An up thrust for knowledge
TECHNICAL PUBLICATIONS'" - An up thrust for knowledge
Digital Principles & System Design
7 - 42
7 - 43 Counters
Step 3: Transition table
solution: Step 1: State diagram Step 2: State table
TA =AB + Be TB=B +C
Clock --+-------_...J A
B
B B
C C
B C
C
B C
ClK
Fig. 7.5.26 (e)
Logic 1
8(2) 8(7)
1 A
7400'4 QA J s (9) 8
Os
(15) (11)
Solution: Step 1 : Excitation table X ---,1-L---'-"i 1
(6) 7476'2
B B
K S(12) Qst--~-
(14) (10)
R(8)
7476 (A) 7476 (8)
cp-----...------------~
Next state
Step 2: K-map simplification
ForJ A ForKA
AS
X 00 01 11 10 X AS 00 01 11 10
o o
Fig. 7.5.27
11 1 X 1 X A-r---.
C D
10 1 1 X X D ----1.-", B
C
D
JA =CD + CD + B
ForKS ForJ c ForKC
11 a X a X 11 (x"! X 1 f"5<") Example 7.5.19 Find a modulo-6 gray code using K-map and design the corresponding
x) counter.
10 10.. ixJ
..
-
X X X X X X
Example 7.5.20 Design and explain the working of a mod-11 counter.
KC=D+A
-
Example 7.5.21 Using D flip-flops, design a synchronous counter which counts in the
ForJ o ForKo sequence, 000, 001, 010,011, 100, 101, 110, 111, 000.
CD CD
AB 00 01 11 10 AB 00 01 11 10 Example 7.5.22 Design a modulo-12 up synchronous counter using T flip-flops and draw
00 a X X a 00 the circuit diagram.
01 X X X 1 01
11 a X X X 11
Q.1 What is the minimum number of flip-flops needed to design a counter of
10 a X X X 10
modulus 60 ?
Ans.: 2n ~ 60 :. n = 6
K D = AB +AB Q.2 What is the minimum number of flip-flops required to implement a modulo 21
Fig. 7.5.28 (a)
synchronous counter?
Ans. : 2n ~ 21 :. n = 5