Unit 05 - Sequential Circuits and Applications
Unit 05 - Sequential Circuits and Applications
5.1 Introduction
In the previous unit we studied about combinational circuits, and different
codes like Gray code, BCD code, and Excess-3 code. In 1918 William
Eccles and F.W. Jordan invented the first flip flop. Initially it was named after
the inventers and was called as Eccles Jordan trigger circuit. The name flip-
flop was later derived from the sound produced on a speaker connected to
one of the back coupled amplifiers outputs during the trigger process within
the circuit. This original electronic flip-flop – a simple two-input bistable
circuit without any dedicated clock (or even gate) signal, was transparent,
and thus a device would be labeled as a "latch" in many circles today.
In digital circuits, combinational circuits don’t have memory to store the
values and its output depends only on the inputs. A powerful model is
required to build a complex digital system. In order to build a powerful
model, a digital circuit which has a memory and its output should depend on
its previous state and also on the input to the circuit is required. So a device
should have following three characteristics to serve as a memory:
two stable states should exists in the device
the state of the device should be readable.
at least once, we should be able to set the state of the device.
5.3 Latch
The S-R Latch
The figure 5.1 shows the SR latch constructed using NOR gates. From
figure 5.1, it can be observed that the output of each NOR gate is given as
feedback to the other NOR gate.
Figure 5.1: The S-R Latch. S sets the latch, causing Q to become true.
R resets the latch.
When both the inputs to an NOR gate are low, the output will be high. From
the circuit it can be analyzed that among two NOR gate outputs, only one
output will be high and other will be low. Consider that the output of the
upper NOR gate ( Q ) is high, as this output is connected as input to the
lower NOR gate its output will be low. This circuit is an S-R latch. Where S
stands for set and R stands for reset, because of which it is also known as
set-reset latch.
By examining the circuit we can see that both the inputs of NOR gate should
be low to generate a high output. When the set S button is pressed, the
output of the latch will be high i.e.; output of lower gate and its complement
output will be low. The latch will be set i.e. its output will be high when the
Set S input is high, and the latch will be reset i.e., its output will be low when
the reset R input is high. Even when the inputs are removed the circuit will
be in the stable state. The inputs which generated a particular output and
When the control signal is true, the S and R signals are propagated through
the AND gates and the stored value can change. Because the control input
is generally driven by a regular train of pulses, it is often called a clock input.
Figure 5.3-A shows the digital circuit of a clocked S-R latch and figure 5.3-B
shows the symbol for the clocked S-R latch.
Figure 5.3-A: Clocked S-R latch. The latch can change only when C is true.
First experiment the given digital circuit with different combination of S and
R inputs by giving low to C input. Later a high value is applied to C and
circuit is experimented with different values of S and R inputs. But when
both S and R inputs are high, clocking will not help much. When S and R
values are equal to 1, and C is clocking, it is difficult to predict which value
will be stored in the memory, either true value or complement value. But
latch will settle down to one of the two stable states when both inputs S and
R are removed at the same time.
The Clocked D-Latch
When the idea of clocking is applied to S-R latch, the problem of what
should happen when S=R=1 can be taken care of and the input to the circuit
can also be simplified.
Usually one bit information should be stored in the memory element. The
complexity of the circuit increases when the set and reset of the latch are
explicitly needed.
The main intention is to design a circuit which has a data input and data
output. When the clock signal is high, irrespective of the value at data input
D storage device should store the value of D and transfer to the data output
Q.
Figure 5.4-A shows the circuit for clocked D latch and the figure 5.4-B
shows the logic symbol of clocked D latch.
The circuit shown in above figure 5.4-A has two inputs. One is control input
and other is data input. An AND gate is used to connect the data input to the
S input of an S-R latch and the data input is connected to R input through
an inverter and an AND gate. The control input C is connected as the
second input to both the AND gates. The state of the latch will not change
when the control input C is applied with low value. When the control input
and the data input are true (i.e. High), the Set input of the latch also will be
true and therefore the true value is stored in the element. When the control
input is true and the data input is false, the Reset input of the latch also will
be true and therefore the false value (i.e low value) is stored in the element.
Here is something to think about: The concept of a D latch, where the bit to
be stored is applied to the S input of a latch, and through an inverter to the
R input, can only be made to work when the latch is clocked. Why is that?
When the control input is true, the clocked D latch stores the data input D
value. The correct value of D will be stored in the latch if the control input is
triggered only when the input to the circuit is settled.
The functionality of the circuit is analyzed by asserting the value of C and
changing the values of D. The output of the circuit will be equal to the data
input D if the C input is high. This kind of clocked D latches are said to be
level triggered devices, the level at C says whether to store the data or not.
Self Assessment Questions
3. The latch will be set when the Set S input is ________________.
4. Usually one bit information should be stored in the _________element.
5. The control input which is generally driven by a regular train of pulses
is often called a _____________ input.
6. When the control input is true, the clocked D latch stores the data input
D value (True or False?).
Basic flip-flops
Two NOR gates or two NAND gates can be used to construct a flip flop.
Usually flip flop are used in constructing the sequential circuits. As Flip flop
has two stable states, it is also known as bi-state gate. Until the trigger is
received by the flip flop, it maintains its state for indefinite amount of time.
When the trigger is applied according to the predefined rules, the state of
the flip flop changes and the new state will be unchanged till another trigger
is applied.
Flip – Flop circuit using NOR gates
The functionality of the flip flop can be explained using cross coupled two
NOR gates or NAND gates. The cross coupled circuits will have the
feedback paths. The figure 5.5 shows the logic diagram of SR Flip flop using
NOR gates
Normal value (Q) and the complement value ( Q ) are the two outputs of a
flip flop. Set(S) and Reset (R) are the two inputs for above circuit. The
current state of the output is determined by the feeding back the previous
states. i.e output is feedback to the input as shown in figure 5.5. Flip-flops
which are constructed using NOR gates works normally at input equal to
logic zero.
When the S input is equal to 1 and R input is 0, the output Q is equal to 0.
As this Q value is given again along with R, the output Q will become 1.
Therefore, from the above discussion we can say that when S = 1and R = 0,
outputs Q will be 1 and Q will be 0.
The state of outputs will be unchanged even when the Set input is made 0
and R is also 0. When the S input is equal to 0 and R input is 1, the output
The outputs Q and Q are 0’s when inputs S = 1 and R = 1. This violates the
fact that Q and Q are complement to each other. This condition must be
avoided in normal operations.
From the above discussion, it can be observed that the flip flop has two
stable state i.e., set state (Q =1, Q = 0) and reset state (Q = 0, Q = 1).
Table 5.2: Truth table for S-R flip flop using NAND gates
Flip flops which are constructed using NAND gates works normally at input
equal to logic one. When the input S is applied with logic 0, then the outputs
Q will be 1 and Q will be 0. Then flip flop is said to be in set sate. If R input
is applied with logic 0, then outputs Q will be 0 and Q will be 1. Then flip
flop is said to be in reset state. Both the output Q and Q will be 1 if S and R
inputs are applied with logic 0. In normal operation this condition must be
avoided.
R-S, D, J-K and T are the different types of flip flops used in designing
sequential circuits. The digital circuits like memories and microprocessors
can be constructed by interconnecting flip-flops to form the logic gates.
5.4.1 SR flip-Flop
The figure 5.7 shows the logic symbol of Set-Reset flip-flops (SR flip-flop).
Normally, in storage mode, the S and R inputs are both low, and feedback
maintains the Q and Q outputs in a constant state, with Q the complement
of Q. If S (Set) is pulsed high while R is held low, then the Q output is forced
high, and stays high even after S returns low; similarly, if R (Reset) is pulsed
high while S is held low, then the Q output is forced low, and stays low even
after R returns low. The table 5.3 shows the truth table SR flip-flop which
shows the operation of SR flip-flop.
SR Flip-Flop operation
Characteristic table Excitation table
S R Action Q(t) Q(t+1) S R Action
0 0 Keep state 0 0 0 X No change
0 1 Q=0 0 1 1 0 Set
1 0 Q=1 1 0 0 1 Reset
1 1 Unstable combination, 1 1 X 0 No change
5.4.2 JK flip-flop
The figure 5.8 shows the timing diagram for JK flip-flop.
In the JK flip flop circuit symbol, the clock input is shown as > and data
inputs are J, K. Q and Q are the data outputs. The characteristic equation
of the JK flip-flop is:
The origin of the name for the JK flip-flop is detailed by P. L. Lindley, a JPL
engineer, in a letter to EDN, an electronics design magazine. The letter is
dated June 13, 1968, and was published in the August edition of the
newsletter. In the letter, Mr. Lindley explains that he heard the story of the
JK flip-flop from Dr. Eldred Nelson, who was responsible for coining the
term while working at Hughes Aircraft. Flip-flops in use at Hughes at the
time were all of the type that came to be known as J-K. Another theory
holds that the set and reset inputs were given the symbols "J" and "K" after
one of the engineers that helped design the J-K flip-flop, Jack Kilby.
5.4.3 D flip-flop
The symbol of D flip flop is shown in the figure 5.10.
During the positive edge of the clock or negative edge of the clock, the
output of the flip flop will take the value of D. The flip flop output should not
take the values of inputs on both the edges of the clock. As the output of the
flip flop takes the value of input after one clock cycle, it is called the D or
Delay flip flop. The D flip flop can also be used as a memory cell or zero
order hold or a delay line. The table 5.5 shows the truth table of D flip-flop.
Usually a master slave flip flop responds during the negative edge of the
enable input. When the clock input low for a positive edge triggered master
slave D flip flop and enable to the master is high. During the transition of
clock from low to high, the input value will be latched. When the clock is
changed from 0 to 1, the enable to the master will go low and its locks the
value which is at master’s input. At the same time, the enable to the slave
will be changed from low to high and the signal which is captured by the
master is latched by the slave. When the clock signal is changed from high
to low, the output of the slave is locked and holds the value which is seen at
the last positive edge while the master accepts the new value. The figure
5.12 shows the circuit for positive edge triggered master slave D flip flop.
Figure 5.12: Circuit for positive edge triggered master slave D flip flop
A negative edge triggered flip flop can be determined by removing the left
most inverter in the above circuit. This has a truth table as shown in
table 5.6.
Table 5.6: Truth table for negative edge triggered D flip- flop
D Q > Qnext
0 X Falling 0
1 X Falling 1
Like SR flip flop, most of the D flip flops in digital systems has set and reset
capability. In D flip flop the illegal condition i.e., S=R=1 in SR flip flop is
resolved (refer to the truth table shown in table 5.7).
From the timing diagram, it is clear the circuit accepts the value in the input
when the clock is HIGH, and passes the data to the output on the falling-
edge of the clock signal (i.e when clock pulse is making transition from 1 to
0). Thus Master-Slave J-K flip flop is a Synchronous device since it only
passes data with the timing of the clock signal.
Application of flip-flops
An important application of flip-flops is in the design of digital counters.
These devices generate binary numbers in a specified count sequence
when triggered by an incoming clock waveform. On each trigger, the
counter advances to the next number in the sequence. After reaching the
final state in the sequence, the counter then recycles. Counters may be
used to count up or down, to cycle through memory addresses in
microprocessors applications, to generate waveforms of particular patterns
and frequencies, and to activate other logic circuits in a complex process.
From the state diagram, we can generate the state table shown in table 5.8
Note that there is no output section for this circuit. Two flip-flops are needed
to represent the four states and are designated Q0Q1. The input variable is
labeled x.
Table 5.8: State table
Present State Next State
Q0 Q1 x=0 x=1
00 00 01
01 10 01
10 10 11
11 11 00
We shall now derive the excitation table and the combinational structure.
The table is now arranged in a different form as shown in table 5.9, where
the present state and input variables are arranged in the form of a truth
table.
Table 5.9: Excitation table of the circuit
0 → 0 0 X
0 → 1 1 X
1 → 0 X 1
1 → 1 X 0
The Table 5.10 shows the Excitation table with present state and next state.
Table 5.10: Excitation table with present state and next state
Present State Next State Input Flip-flop Inputs
Q0 Q1 Q0 Q1 x J0K0 J1K1
00 00 0 0X 0X
00 01 1 0X 1X
01 10 0 1X X1
01 01 1 0X X0
10 10 0 X0 0X
10 11 1 X0 1X
11 11 0 X0 X0
11 00 1 X1 X1
In the first row of table 5.10 we have a transition for flip-flop Q0 from 0 in the
present state to 0 in the next state. In table 5.10 we find that a transition of
states from 0 to 0 requires that input J = 0 and input K = X. So 0 and X are
copied in the first row under J0 and K0 respectively. Since the first row also
shows a transition for the flip-flop Q1 from 0 in the present state to 0 in the
next state, 0 and X are copied in the first row under J1 and K1. This process
is continued for each row of the table and for each flip-flop, with the input
conditions as specified in table 5.10.
The simplified Boolean functions for the combinational circuit can now be
derived. The input variables are Q0, Q1, and x; the outputs are the variables
J0, K0, J1 and K1.The information from the truth table is plotted on the
Karnaugh maps shown in figure 5.17.
The Table 5.12 shows the excitation table for D flip-flop. Next step is to
derive the excitation table for the design circuit, which is shown in table
5.13. The output of the circuit is labeled Z.
Table 5.13: Excitation table
Present State Next State Input Flip-flop Input Output
Q0 Q1 Q0 Q1 x D0 D1 Z
00 00 0 0 0 0
00 01 1 0 1 0
01 00 0 0 0 0
01 10 1 1 0 0
10 11 0 1 1 0
10 10 1 1 0 0
11 00 0 0 0 0
11 01 1 0 1 1
Now plot the flip-flop inputs and output functions on the Karnaugh map to
derive the Boolean expressions, which is shown in figure 5.19.
5.6 Summary
Let us recapitulate the important concepts discussed in this unit:
Flip flop is a device which changes its state at the positive edge or
negative edge (also known as leading edge and trailing edge) of the
clock signal. A synchronous latch is device which monitors the input
signal and changes its state whenever the control signal is high.
As the flip flop stores the given values, in a memory device it can be
used as basic storage device. Only one bit information can be stored in
a Flip Flop.
Two NOR gates or two NAND gates can be used to construct a basic
flip flop.
Flip-flops types are: SR ("set-reset"), D ("data" or "delay"), T ("toggle"),
and JK flip flop.
The output of the flip flop takes the value of input after one clock cycle in
case of D flip flop.
All the shift registers which are important part of digital system are
constructed using flip flops.
Master-slave flip flop is designed using two separate flip flops. One acts
as the master and another acts as slave.
5.8 Answers
Self Assessment Questions
1. True
2. Flip flop
3. High
4. Memory
5. Clock
6. True
7. Basic storage
8. True
9. True
10. Clk=1
11. Flip-flops
12. State table
Terminal Questions
1. Refer to section 5.2
2. Refer to section 5.4
3. Refer to sub-section 5.4.4
4. Refer to section 5.5