Unit4 Sequential Circuits
Unit4 Sequential Circuits
Block Diagram –
Block Diagram –
Its output depends only on the current Its output depends on the current as
input well as previous input.
FLIP-FLOPS
Flip flop is formed using logic gates, which are in turn made of
transistors. Flip flop are basic building blocks in the memory of
electronic devices. Each flip flop can store one bit of data. Flip – flops
have two stable states and hence they are bistable multivibrators. The
two stable states are High (logic 1) and Low (logic 0).
The term flip – flop is used as they can switch between the states
under the influence of a control signal (clock or enable) i.e. they can
‘flip’ to one state and ‘flop’ back to other state.
Flip – flops are a binary storage device because they can store
binary data (0 or 1).
Flip – flops are edge sensitive or edge triggered devices i.e. they
are sensitive to the transition rather than the duration or width
of the clock signal.
They are also known as signal change sensitive devices which
mean that the change in the level of clock signal will bring
change in output of the flip flop.
A Flip – flop works depending on clock pulses.
Flip flops are also used to control the digital circuit’s
functionality. They can change the operation of a digital circuit
depending on the state.
Some of the most common flip – flops are SR Flip – flop (Set –
Reset), D Flip – flop (Data or Delay), JK Flip – flop and T Flip – flop.
Latch: The term Latch is used for certain flip-flops or the simplest
type of flip-flop is called an S-R Latch. It refers to non-clocked flip-
flops, because these flip flops latch on to 1 or a o immediately upon
receiving the input pulse called SET or RESET. A latch may be an
active High input latch or an active low input latch. Using two NOR
gates, an active high S-R latch can be considered and using two
NAND gates an active LOW S-R latch can be considered. The Latch
has two inputs as S and R and two outputs as Q and Q̅.
Latches vs Flip-Flops
Latches and flip – flops are both 1 – bit binary data storage devices.
The main difference between a latch and a flip – flop is the triggering
mechanism. Latches are transparent when enabled ,whereas flip –
flops are dependent on the transition of the clock signal i.e. either
positive edge or negative edge.
Characteristics Table
S R Qn Qn+1 State
0 0 0 0 No Change (NC)
0 0 1 1
0 1 0 0 Reset
0 1 1 0
1 0 0 1 Set
1 0 1 1
1 1 0 X Indeterminate(Invalid)
1 1 1 X
0 0 0 X Indeterminate(Invalid )
0 0 1 X
0 1 0 1 Set
0 1 1 1
1 0 0 0 Reset
1 0 1 0
1 1 0 0 No Change or
1 1 1 1 Last State
The operation of the NAND latch is the reverse of the operation of
the NOR gate latch. That is why it is called an active low S-R latch.
In the sequential circuit, if the output changes during the high voltage
period or low voltage period, it is called level triggering. In other
words, the output changes during either high voltage or low voltage
period- not during the edges like in edge triggering. Thus, when an
event triggers at the clock level, we call it level triggering. Two types
of level triggering i.e high level triggering and low level triggering.
Working
SR flip – flop works during the transition of clock pulse either from
low – to – high or from high – to – low (depending on the design) i.e.
it can be either positive edge triggered or negative edge triggered.
Characteristics Table
clk S R Qn Qn+1 State
↑ 0 0 0 0 Last state
↑ 0 0 1 1
↑ 0 1 0 0 Reset
↑ 0 1 1 0
↑ 1 0 0 1 Set
↑ 1 0 1 1
↑ 1 1 0 X Invalid
↑ 1 1 1 X
Qn+1 = S + R̅Qn
States Inputs
Present(Qn) Next(Qn+1) S R
0 0 0 X
0 1 1 0
1 0 0 1
1 1 X 0
When the Enable input “EN” is at logic level “0”, the outputs of the
two AND gates are also at logic level “0”, (AND Gate principles)
regardless of the condition of the two inputs S and R, latching the two
outputs Q and Q̅ into their last known state. When the enable input
“EN” changes to logic level “1” the circuit responds as a normal SR
bistable flip-flop with the two AND gates becoming transparent to the
Set and Reset signals.
This simple JK flip Flop is the most widely used of all the flip-flop
designs and is considered to be a universal flip-flop circuit. The two
inputs labelled “J” and “K” are not shortened abbreviated letters of
other words, such as “S” for Set and “R” for Reset, but are themselves
autonomous letters chosen by its inventor Jack Kilby to distinguish
the flip-flop design from other types.
The sequential operation of the JK flip flop is exactly the same as for
the previous SR flip-flop with the same “Set” and “Reset” inputs. The
difference this time is that the “JK flip flop” has no invalid or
forbidden input states of the SR Latch even when S and R are both at
logic “1”.
↑ 0 0 0 0
Memory
no change
↑ 0 0 1 1
↑ 0 1 0 0
Reset( Qn+1= 0)
↑ 0 1 1 0
↑
1 0 0 1
↑ Set (Qn+1 =1)
↑ 1 0 1 1
1 1 0 1
↑
Toggle
↑ 1 1 1 0
Characteristic Equation
K̅Q̅n K̅ Qn KQn KQ̅n
J̅ 1
J 1 1 1
Qn+1=JQ̅ n + K̅Qn
Excitation table
States Inputs
Present Next J K
0 0 0 X
0 1 1 X
1 0 X 1
1 1 X 0
Master-Slave JK Flip-flop
1. When the Clock pulse is high the output of master is high and
remains high till the clock is low because the state is stored.
2. Now the output of master becomes low when the clock pulse
becomes high again and remains low until the clock becomes
high again.
3. Thus toggling takes place for a clock cycle.
4. When the clock pulse is high, the master is operational but not
the slave thus the output of the slave remains low till the clock
remains high.
5. When the clock is low, the slave becomes operational and
remains high until the clock again becomes low.
6. Toggling takes place during the whole process since the output
is changing once in a cycle.
When the clock is “LOW”, the outputs from the “master” flip flop are
latched and any additional changes to its inputs are ignored. The gated
“slave” flip flop now responds to the state of its inputs passed over by
the “master” section.
Then, the circuit accepts input data when the clock signal is “HIGH”,
and passes the data to the output on the falling-edge of the clock
signal. In other words, the Master-Slave JK Flip flop is a
“Synchronous” device as it only passes data with the timing of the
clock signal.
D- Flip-Flop
The D Flip Flop is by far the most important of the clocked flip-flops
as it ensures that inputs S and R are never equal to one at the same
time. The D-type flip flop are constructed from a gated SR flip-flop
with an inverter added between the S and the R inputs to allow for a
single D (Data) input.
Then this single data input, labelled “D” and is used in place of the
“Set” signal, and the inverter is used to generate the complementary
“Reset” input there by making a level-sensitive D-type flip-flop from
a level-sensitive SR-latch as now S = D and R = not D as shown.
Truth table
Clk D Qn Description
Memory
↓»0 X Q
no change
↑»1 0 0 Reset Q » 0
↑»1 1 1 Set Q » 1
Characteristic table for the D-type Flip Flop
Clk D Qn Qn+1
↑ 0 0 0
↑ 0 1 0
↑ 1 0 1
↑ 1 1 1
Note that: ↓ and ↑ indicates direction of clock pulse as it is assumed D-type flip flops are
edge triggered
Characteristic Equation
Q̅ n Qn
D̅
D 1 1
Qn+1=D
Excitation table
States Input
Present(Qn) Next(Qn+1) D
0 0 0
0 1 1
1 0 0
1 1 1
T Flip-Flop
Truth table
CLK T Qn+1
↑ 0 Qn(Last state)
↑ 1 Toggle
Characteristic Table
Clk T Qn Qn+1
↑ 0 0 0
↑ 0 1 1
↑ 1 0 1
↑ 1 1 0
Q̅n Qn
T̅ 0 1
T 1 0
Excitation Table
States Input
Present Next T
0 0 0
0 1 1
1 0 1
1 1 0
The applications of Flip-flops are as specified below.
Counters
Frequency Dividers
Shift Registers
Storage Registers
Asynchronous input
The normal data inputs to a flip flop (D, S and R, or J and K) are
referred to as synchronous inputs because they have an effect on the
outputs (Q and not-Q̅) only in step, or in sync, with the clock signal
transitions.
These extra inputs are called asynchronous because they can set or
reset the flip-flop regardless of the status of the clock signal.
Typically, they’re called preset and clear:
Excitation table
Step-2:
Using K map, find the boolean expression for J and K in terms of T.
J=T K=T
Step-3:
Construct the circuit diagram for the conversion of J-K flip-flop into
T flip-flop.
Step-2:
Using the K-map we find the boolean expression of J and K in terms
of D.
J=D K =D'
Step-3:
We construct the circuit diagram of the conversion of JK flip-flop into
D flip-flop.
Step-1:
We construct the characteristic table of D flip-flop and
excitation table of S-R flip-flop.
Step-2:
Using the K-map we find the boolean expression of S and R in terms
of D.
S=D R = D'
Step-3:
We construct the circuit diagram of the conversion of S-R flip-flop
into D flip-flop.
Conversion of D to T flip-flop
Conversion of T to D flip-flop
Shift Register
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, we have 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
Operation
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
Similarly with Din = 1 and with the fourth negative clock edge
arriving, the stored word in the register is Q3 Q2 Q1 Q0 = 1111.
Truth Table
Waveforms
Block Diagram
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
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
Block Diagram
Operation
1) Ring Counter
2) Johnson (Twisted Ring) Counter
Counter Design
Counter is a sequential circuit. A digital circuit which is used for a
counting pulses is known counter. Counter is the widest application of
flip-flops. It is a group of flip-flops with a clock signal applied.
Counters are of two types.
Classification of counters
Up counters
Down counters
Up/Down counters
UP/DOWN Counter
The 2-bit ripple counter is called as MOD-4 counter and 3-bit ripple
counter is called as MOD-8 counter. So in general, an n-bit ripple
counter is called as modulo-N counter. Where, MOD number = 2n.
Type of modulus
Application of counters
Frequency counters
Digital clock
Time measurement
A to D converter
Frequency divider circuits
Digital triangular wave generator.
Asynchronous Counter Design
Two-bit Ripple Up-Down Counter using negative edge triggered
flip-flops
We see that these equations are the same as the equations obtained by the direct design of the
up/down cou ntt'.'r. So. the cir cuit will be the same as that shown in Figure 12.15 .
Step 4. The minimal expressions: From the excitation table we observe that T = 1 because all
the entries for T I are either 1 or X. The K-maps for T and T based on the excitafion table and the
3
minimal expressions obtained from them are shown i~ Figure 12.21. Also drawing and minimizing
the K-maps for T2, we get
T2 = Q4QIM + ~QIM + Q2Q1M + Q3QIM
Step 5. The logic diagram: The logic diagram based on those minimal expressions is drawn as
shown in Figure 12.22.
couNTEAS
1
0
QM
1 .
1
01 11 10
02 00 01 11 10 02 00 ,.-19 18
17
1 3 2
00 I
10 00 11'6 1
22
21 23
4 5 7 6 20 X
X X
01 X
01
30
12 13 14 28 29 d1 ...
11
~1 5
11 X X
~- X
25 27 26
8 9 11 10 24
X X X
10 X
10 .__
QM
1 0 1
02 02 00 01 11 10
00 01 11 10
-16 17 19 18
0 1 3 2
00 00 1
20 21 _23 22
4 5 - 7 6
X X X
01 1 01 X
14 28 29 31 30
12 13 15
X X X X
11 1 11
11 10 24 25 27 26
9 X
118 10 X X X
10 -
T3= O4O,M + O2O1M+ os<'.5)5,M
Figure 12.21 K-maps for excitations T4 and T3 of a mod-10 up-down counter.
0 40 1M O3O261M O3O261M
040 1M O4O1M 0 40 1M
0 201M 0 20 1M 0 30 20 1M
0 30,M
T2 02 T3 03 T4 04
T,
FF2 FF3 FF4
02 03 04
CLK
Figure 12.22 Logic diagram of synchronous mod-10 up-down counter.
In the K-maps, the remaining minterms are don't cares Cui ( 20, 21 , 22, 23, 24, 25, 26, 27,
28, 29, 30, 31)).
From the excitation table we can see that T1= 1 and the expressions for T4, T 3 and T2 are·.
T ::: l:m(0, 15, 16, 19) + d( 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31)
4
T l:m(7, 8, 15, 16) + d( 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31)
:::
3
r = l:m(3, 4, 7, 8, 11, 12, 15, 16) + d ( 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 )
2
646 l=UNOA.MENTAL S OF DIGITAL CIRCUITS
8 9 11 10 8 9 11 10
10 X X X
10 X X X
T2= 0, T -Q
Figu re 12.2 4 K-maps for excitations of synchronous 4
mod-9 c~:nter using T flip-fl ops.
,,
COUN TERS 547
Srep "· Tltt logic du,1,vam: The logic diagr am based on those
sh<)\H l in h gure l 2.25 .
rninim <1l expre ssion s is drawn a~,
PRE
PRE PRE
T2
02 T3 04
FF2
FF4
02 03 6"
CLK CLR CLR CLR CLR
Figure 12.25 Logic diagram of the synchronous mod-9 counter using
T flip-flops.
PS NS Required Excitations
03 02 o, 03 02 01 T3 T2 T,
0 0 0 0 0 1 0 0 1
0 0 1 0 1 1 0 1 0
0 1 1 0 1 0 0 0 1
0 1 0 1 0 1 0 0
1 1 0 1 1 1 0 0 1
1 1 1 0 0 0 1 1 1
QQ
. ~ , Q2Q1
Q3
00 01 11 10 a3 00 01 11 10 01 11
0 ~1 3 2
Q
0 1
3 IJJ2 0 1 0
7 6 4 5
.: 5 7 6 4 5 7
1 X Ix 1I 1 X IX 1 I X X
0301 0301
03
020, 0 3020 ,
0 20 ,
02'5, T, o, T2 02 T3 03
FF 1 FF2 FF 3
o, 02 03 -
CLK
04 0 3 02 o, 04 03 02 o, T4 T3 T2 T,
0 0 1
0 0 0 0 0 0 0 1 0
0 1 0
0 0 0 1 0 0 1 1 0 1
1 0 0 0 0
0 0 1 1 0 0 0
0 0 1 0
0 0 1 0 0 1 1 1
1 0 0 0
0 1 1 0 0 1 1
1 0
0 1 0 1 0 0
0 1 1 1 0 1
1 0 0 0 0
0 1 0 1 0 0 0
1 0 0 1 0
0 1 0 0 1 0 1
0 1 0 0
1 1 0 0 1 1 0 _J_
0 0 1 1
1 1 0 1 0 0
(b) Excitation table
(a) State diagram
Figure 12.29 Synchronous mod-1O Gray code counter.
►
COUNTERS 549
o201 0 201
03 00 01 11 10 03 00 01 11 10
0 1 3 2
00 0 1 3 2
00 1
.___
5 7
01 [Ii4 6
01
4 5 7 6
12 13 15 ,. 14 12 13 15 14
11 1 X X 11 1 X X
8 9 11 10 8 9 11 10
10 X X X X 10 X X X
r7
I I
00
2 1
10 03 00 01 11 10
1 3 2
00
3 2
00 1 lo 1
'---
7 6 4 - 5 7 - 6
01 01 1 1
13 15 14 12 13 15 14
12
11 X X
10
11 1
8
1
'--
9 rx71
X
- X
10
10 X
X 10 xi X X
I
I I
T = 0 30 20 1 + OsC)20, T, = 0 4 + 0 30 20 1 + 0 30 20 1
2
+ 630 20 1 + ci3cii~,
figure 12.30 K-maps for excitations of a synchronous mod-1 OGray code counter.
04
ai.520 1 030201 0401 0 401
0 30 i 5, - ----1 a i 52a , 03020 1 0403020,
0 30 201 02 T3 03 04
a, T2
6/:5201 T1
FF3 FF4
FF2
FF1
02 03 04
a,
PS NS Required excitations
0 4 0 3 0 2 01 04 0 3 0 2 0 1 J4 K4 J3 K3 J2 K2 J, K1
0 0 0 0 0 0 0 1 0 X 0 X 0 X 1 X
0 0 0 1 0 0 1 0 0 X 0 X 1 X X 1
0 0 1 0 0 0 1 1 0 X 0 X X 0 1 X
0 0 1 1 0 1 0 0 0 X 1 X X 1 X 1
0 1 0 0 0 1 0 1 0 X X 0 0 X 1 X
0 1 0 1 0 1 1 0 0 X X 0 1 X X 1
0 1 1 0 0 1 1 1 0 X X 0 X 0 1 X
0 1 1 1 1 0 0 0 1 X X 1 X 1 X 1
1 0 0 0 1 0 0 1 X 0 0 X 0 X 1 X
0 0 1 0 0 0 0 X 1 0 X 0 X X 1
(b) Excitation table
Figure 12.32 Synchronous BCD (mod-1 O) counter.
oa
2 1 00
2 1 0 20 1
Q403 00 01 11 10 o403 00 01 11 10 o403 00 01 11 10
0 1 3 2 0 1 3 2 2
0 1 - 3
00 00 X X X X 00 1
4 5 ...- 7 6 4 5 7 6 4 5 7
- 6
01 1 01 X X X X 01 X X X
)(
12 13 15 14 12 13 15 13 15 14
14 12 )(
11 X X )( X 11 )(
- X X X X 11 X X
11
~
1(
8 9 11 10 8 11 9
)(
9 10 8 )(
10 X X )(
10
-=---
X
1 )( X 10
o, 4 s 7 6
1 X X 4 s 7 6 4 5 7 6
01 X X 1 01 1
12 13 15
11 X 14
X )( 12 13 14
X 15 14 12 13 15
11 X X X X
8
X 11 X X X
9 11 10
10 X 8 9 11
X 10 8 9 11 10
10 X X
J2 = 0 40 , - X X 10 X X
-X X
~=0 , ~ = ~0,
Figure 12.33 K-rnaps fo
r exc1•t at1on
.
s of synchronous BCD coun ter using J-K flip-fl ops.
Srep 5 · The logic diagram: The logic diagram based on those minimal expressio
show n in Figu re 12.30. ns is drawn as
J1 01 J2 02 J3 03 04
FF 1
FF 2 FF 3 FF4
K1 a, K2 02 K3 03 K4 04
CU<
PS Present inputs NS
a,. 03 0 2 a1
1 0 1 0 0 0 O O O 0 1 1 1 0 1 1
1 0 1 1 0 1 1 1 0 1 1 0 0 0
0 0 O O O 0 1 0 1
0 0
1 0 1 O O O 1 1 1 0 0 0
1 1 0
O O O .0 1 1 1 1 1 1
1 1 1 0 0 0
1 0 1 1 1 0 0 0 0
1 1 1 1 1 1
k for lock-out (b) State diagram
(a) Table to c hec
. f k out of Sync hronous BCD counter using J-K flip-fl ops.
Figu re 12.35 Checking or Ioc
The state diagram for the mod-6 counter is drawn as shown in Figure 12 _
Ster 2. 771,• .,·tace Jiagrom:
. .36a
Step 3 The type' offlip -J1ops and the excitation table: JK fli p-flops are selected and the ex . . ·
. p· 12 36 cnat1on
lu b le of a mod-6 counter usi ng J-K FFs is drawn as shown m 1gure . b. (States 110 and 1
can be removed from the state diagram if it is not required to determine whether the counter.1s, self lt
.
starting or not) .
PS NS Required excitations
03 02 01 03 0 2 01 J3 K3 J2 ~ J1 K,
0 0 0 0 0 1 0 X 0 X 1 X
0 0 1 0 1 0 0 X 1 X X 1
0 1 0 0 1 1 0 X X 0 1 X
0 1 1 1 0 0 1 X X 1 X 1
1 0 0 1 0 1 X 0 0 X 1 X
1 0 1 0 0 0 X 1 0- X X 1
Step 4. The minimal expressions: The K-maps for excitations of FFs J 3 , K3 , J 2 , Kz. J 1 and K 1 in
terms of the outputs of FFs Q3, Q2 and Q 1, their minimization, and the minimal expressions for
excitations obtained from them are shown in Figure 12.37.
0201 Q2Q 1 Q 2Q 1
03 00 01 11 10 Q3 00 01 11 10 Q3 00 01 11 10
0 3 2 0 1 3 2 0 1 3 2
0 0 X X X X 0 I 1 xi X
4 5 7 6 4 5 7 6 4 5 7 6
1 X X X X 1 1 X X 1 X X
QO
2 1
00
2 1 00
2 1
03 01 11 10 03 00 01 11 10 03 00 01 11 10
00
0 1 3 2 0 1 3 2 0 1 3 2
0 X X 1 0 1 X X 1 0 X 1 1 X
7 6 4 5 7 6 4 5 7 6
4 5
1 1 1 X X
1 X X X X X X X 1 X
K2 = 0 1 J1 =1 K1 = 1
Figure 12.37 K-maps for excitations of synchronous mod-6 counter using J-K fl ip-flops.
Step 5. The logic diagram: The logic diagram based on those minimal expressions is drawn as
shown in Figure J 2.38.
1
FF1
K, .___- ---'--I K3
L-- --
CLK
Figure 12.38 Logic diagram of synchronous mod-6 counter using J-K flip-flops.