Digital Logic Chapter 5 Sequential Logic Circuits
Digital Logic Chapter 5 Sequential Logic Circuits
A Latch is a special type of logical circuit. The latches have low and high two stable states. Due to these
states, latches also refer to as bistable-multivibrator. Latches are of two types they are SR latch and D
latch
Flip-Flop
Flip-flop is a digital memory circuit, and with the help of the flip-flop we can store one bit of
information. The fundamental blocks of various sequential circuits are flip-flops. Flip-flop is also called
a bistable multivibrator or one-bit or binary. In a sequential circuit, we use flip-flops as a memory
element.
In a sequential circuit, the output is obtained from the combinational circuit or flip-flop or both. When
the clock pulse is active, then the state of the flip-flop is active, and when the clock pulse is not active,
then the state of the clock pulse remains unaffected. Mainly, in the synchronous sequential circuit, flip
flops function as a memory element, and in asynchronous sequential circuit, the unclocked flip flops or
latches function as a memory element.
Trigger
In the context of flip-flops, the term "trigger" refers to the specific event that causes the flip-flop to
capture or update its state. It determines when the inputs are considered and when the outputs are
changed. There are two common types of triggers used in flip-flops i.e. Level triggering and edge
triggering
Level trigger: It refers to a triggering mechanism where a circuit or flip-flop responds to the continuous
level of an input signal rather than a specific edge transition. In other words, the circuit reacts or changes
its state when the input signal maintains a particular logic level (high or low) for a sustained period of
time.
Positive-Edge Trigger: A positive-edge trigger, also known as a rising-edge trigger or clocked flip-flop,
responds to a transition from a low (logic 0) to a high (logic 1) level on the clock input. When the clock
signal rises from low to high, the flip-flop samples and latches the input values and updates its outputs
based on those values. Positive edge triggered flip-flops are widely used in synchronous digital systems.
Types of Latch
There are three types of Latch and they are
• SR Latch
• Gated SR Latch
• Gated D Latch
The SR latch is a circuit can be made by using two cross-coupled NOR gates or two cross-
coupled NAND gates with two inputs labeled S (for Set) and R (for Reset) and with two complementary
outputs Q and .
S R Q Comment
0 0 Hold Hold No change
0 1 0 1 Reset
1 0 1 0 Set
1 1 0 0 Invalid state
(not used)
Figure – SR Latch using NOR gate Figure – Truth table of SR Latch using NOR gate
S R Q Comment
0 0 1 1 Invalid state
(not used)
0 1 1 0 Set
1 0 0 1 Reset
1 1 Hold Hold No change
Figure – SR Flip flop using NAND gate Figure – Truth table of SR Flip flop using NAND gate
Case – II
If S =1, R = 0 then the output = 1 because anyone input is low (0) then the output of NAND gate is
high (1) and the both input of another NAND gate is high (1) then the output Q = 0.
Now let S =1, R =1 then the outputs Q = 0 and = 1. This means it store previous value.
Case – III
If S = 0, R = 0 then Q = 1 = 1. Here both the outputs are high so this is an invalid condition because
both the outputs must be complementary outputs.
Here when the is moved to the position H, R=0 and S=1 then the flip flop is set with Q=1 at the first
high level on S. Again when switch bounce losing the contact to the input signal then S=R=0, therefore
the flip flop remains set Q=1. When the switch regain contact R=0 and S=1; this causes an attempt to
again set the flip flop but the flip flop is already set no change occurs at Q. the result is a “clean” low to
high signal at its output.
When the switch is moved to the position L, S =0 and R =1. Bouncing occurs at the R input due to
switch. Here it simply respond to the first high lelvel and ignores all following transition. Th result is a
“clean” low to high signal at its output.
Gated SR Latch
A gated latch requires an enable input, EN. The Gated SR latch circuit has two inputs and two outputs
i.e. a set input (S), a reset input (R), outputs Q and . SR Latch can be constructed by using cross-
coupled NAND and NOR gates. Figure shows the logic circuit diagram, symbols and truth table of gated
SR latch.
Figure – Gated SR Latch (a) using Cross Couple NAND and (b) using Cross Couple NOR
EN S R Q
0 X X Memory state
1 0 0 Memory state
1 0 1 0 1
1 1 0 1 0
1 1 1 Invalid
Gated D Latch
The Gated SR latch circuit has two inputs and two outputs i.e. a set input (S), a reset input (R), outputs
Q and ( Q ) ̅ .
Another type of gated latch is called the D latch. It differs from the S-R latch because it has only one
input in addition to EN. This input is called the D (data) input. It has two outputs Q and . Figure
shows logic diagram, symbol and truth table of a D latch.
EN D Q Comment
0 X Hold Hold Memory state
1 0 1 Reset state
1 1 1 0 Set state
Figure – Truth table of Gated D Latch
Working of Gated D Latch
• If EN = 0, D will be treated as don’t care conditions, then we get Q and in memory state i.e.
holding previous values.
• When the D input is HIGH (i.e. D = 1) and the EN input is HIGH, then we get Q =1 and 0
and the latch will be in set state.
• When the D input is LOW (i.e. D = 0) and EN is HIGH, then we get Q =0 and 1 and the
latch will be in set restate.
• The output Q follows the input D when EN is HIGH.
Figure- S-R Flip-Flop using NAND gate Figure- Truth table of S-R Flip-Flop
Working
Consider the SR NAND Flip-flop and it is clear from figure that
S ∗ S. CLK S CLK R∗ R. CLK R CLK
Case I:
Now if CLK is 0 then S*=1 and R*=1 and here S and R will be treated as don’t care conditions, then we
get Q and in memory state i.e. holding previous values.
Case II:
If CLK=1 then S*= S and R*= , now there will be 4 more cases depending upon the values of S and R.
Case II (a): S=0 and R= 0 then S* and R* both becomes 1 and we get outputs Q and in holding
memory state.
Case II (b): S=0 and R=1 then S*=1 and R*= 0 then we get Q = 0 and = 1, we get both outputs as
complement of each other.
Case II (c): S=1 and R=0 then S*=0 and R*=1 them we get Q = 1 and = 0.
Case II (d): S=1 and R=1 then S*=0 and R*=0 then we get Q and in the invalid state i.e. not used
condition.
Figure – Positive Edge-Triggered SR flip-flop Figure – Truth table of Positive Edge-Triggered SR flip-flop
• When the clock pulse is zero, the output is stores the previous value or in memory state.
• When the Positive edge triggered clock pulse encountered, there are four possible output states exist.
If both the inputs (S and R) are zero (low), the output Q stores the previous value.
If both the inputs (S and R) are different, the output Q is in set or reset state depending on the
value of S i.e. if S = 0, the output is in Reset state else the output is in Set state.
If both the inputs (S and R) are 1 (high), the output Q is in indeterminate state or invalid
condition.
Figure – Negative edge-triggered SR flip-flop Figure – Truth table of Negative edge-triggered SR flip-flop
D flip-flop
A D Flip Flop (also known as a ‘data’ or ‘delay’ flip-flop) is a type of flip flop that tracks the input,
making transitions with match those of the input D. The D stands for ‘data’; this flip-flop stores the
value that is on the data line. It can be thought of as a basic memory cell.
The input of the D-flip flop directly goes to the input S and its complement goes to the input R. The D-
input is sampled throughout the existence of a CLK pulse. When the clock input is set to 1, the D input
is copied to the output Q and when the clock input is set to 0, then the flip flop switches to a clear state.
CLK D Q Description
0 X Q Memory state
0 0 1 Reset
1 1 0 Set
Figure – Positive Edge-Triggered of D Flip-flop Figure –Truth table Negative Edge-Triggered of D FF
When the clock is zero, the output hold the previous value or in memory state. When the positive edge
trigger clock pulse is encounter then the output Q copies the value of input D i.e. if D = 0 ,Q = 0 (reset
state) and if D = 1 ,Q = 1 (set state).
CLK D Q Description
0 X Q Memory state
0 0 1 Reset
1 1 0 Set
Figure –Negative Edge-Triggered of D Flip Flop Figure –Truth table of Negative Edge-Triggered D FF
Digital Logic: Chapter 5: Sequential Logic Circuits By: MB Sah
When the clock is zero, the output hold the previous value or in memory state. When the negative edge
trigger clock pulse is encounter then the output Q copies the value of input D i.e. if D = 0 , Q = 0 (reset
state) and if D = 1 ,Q = 1 (set state).
Figure – Logic circuit of edge triggered JK flip flop Figure – symbol of positive edge
triggered JK flip flop
Figure – Detailed and short Truth table of positive Edge Triggered JK flip flop
When the rising edge of the clock encounter then following conditions occur,
When J = 0 and K = 0, the output Q remains unchanged.
When J = 0 and K = 1, the output Q is reset to 0.
When J = 1 and K = 0, the output Q is set to 1.
When J = 1 and K = 1, the output Q is complemented (toggled).
When the clock signal is low, then irrespective of the value of J and K inputs, the flop-flop retains the
present state.
At the first rising edge of the clock, when J = 0 and K = 1, then output Q becomes 0 and it remains in
that state until next rising edge. In between, even if the input changes, the flip-flop does not responds to
the input changes.
At the second rising edge, since J = 1 and K = 0, the output of the flip-flop becomes 1. And it remains in
that state until next rising edge.
At the third rising edge, since both J and K inputs are 1, the output of the flip-flop toggles and it
becomes 0.
0 0 Qn Hold
0 1 0 Reset state
1 0 1 Set state
1 1 Qn Toggle
Figure – Symbol and truth table of Negative Edge Triggered JK flip-flop
T Flip-flop
A T flip-flop (Toggle Flip-flop) is a simplified version of JK flip-flop. The T flop is obtained by
connecting the J and K inputs together. The flip-flop has one input terminal and clock input. These flip-
flops are said to be T flip-flops because of their ability to toggle the input state. Toggle flip-flops are
mostly used in counters.
Figure – Symbol of Positive edge triggered T Flip-flop Figure - T Flip Flop Circuit
The operation of the T flip – flop is
When the T input is LOW, then the next state of the T flip flop is same as the present state.
• T = 0 and present state = 0, then the next state = 0
• T = 0 and present state = 1, then the next state = 1
Digital Logic: Chapter 5: Sequential Logic Circuits By: MB Sah
When the T input is HIGH and during the positive transition of the clock signal, the next state of the T
flip – flop is the complement of the present state.
• T = 1 and present state = 0, then the next state = 1
• T = 1 and present state = 1, then the next state = 0
CLK T Qn Qn+1 Description
0 0 0 Unchanged/hold
0 1 1 Unchanged/hold
1 0 1 Toggle
1 1 0 Toggle
Figure- Truth table of Positive edge triggered T Flip flop
In this truth table, Qn represents the present state and Qn+1 represents the next state of the output.
In addition to these two flip-flops, the circuit also includes an inverter. The inverter is connected to
clock pulse in such a way that the inverted clock pulse is given to the slave flip-flop.
Flip-Flop Timing
Flip-flop timing refers to the characteristics and parameters that determine the behavior and performance
of a flip-flop with respect to the timing of its inputs and clock signal.
Figure – Propagation delays, preset input to output and clear input to output
Set-up time
The set-up time (ts) is the minimum interval required for the logic levels to be maintained constantly on
the inputs (J and K, or D) prior to the triggering edge of the clock pulse in order for the levels to be
reliably clocked into the flip-flop.
Hold time
The hold time (th) is the minimum interval required for the logic levels to remain on the inputs after the
triggering edge of the clock pulse in order for the levels to be reliably clocked into the flip-flop.
State Table: A state table lists all possible states of the circuit, along with the inputs and outputs
associated with each state and the next state(s) resulting from a specific input combination. It provides a
systematic representation of the circuit's behavior.
S R Flip flop
Truth table of S R Flip Flop is given below and with the help of this table we make the characteristics
table and the excitation table.
CLK S R Qn+1 State
0 x x Qn No Change
1 0 0 Qn No Change (Hold the previous Value)
1 0 1 0 Reset
1 1 0 1 Set
1 1 1 1 Invalid
Qn S R Qn+1
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 X
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 X
The characteristics equation can be calculated by using K-map
Figure – State Diagram of SR Flip Flop Figure –State Diagram of D Flip Flop
Figure – State Diagram of JK Flip Flop Figure – State Diagram of T Flip Flop
Flip-flop conversions
In this section, Different flip-flops can be implemented by using another type flip flop or simply say that
one flip flop is converted into another type of flip flop. There are few steps for conversion of one flip
flop into another.
Step 1: Write the truth table of the required flip-flop
Step 2: Write the excitation table of the given flip-flop
Step 3: Write the conversion table
Step 4: Find the Boolean expressions for the inputs of the given flip-flop
Step 5: Draw the circuit for implementing required flip flop using given flip-flop
Digital Logic: Chapter 5: Sequential Logic Circuits By: MB Sah
Conversion of SR flip flop into D Flip Flop
Step 1: Write the truth table of the D flip-flop
D QN QN+1
0 0 0
0 1 0
1 0 1
1 1 1
Step 2: Write the excitation table of the S R flip-flop
QN QN+1 S R
0 0 0 X
0 1 1 0
1 0 0 1
1 1 X 0
Step 3: Write the conversion table
D QN QN+1 S R
0 0 0 0 X
0 1 0 0 1
1 0 1 1 0
1 1 1 X 0
Step 4: write the Boolean expressions for S and R from the conversion table using K-Maps
For S For R
The Boolean expressions for S and R from the conversion table using K-Maps
For S For R
The Boolean expressions for J and K from the conversion table using K-Maps
For J For K
The Boolean expression for D from the The circuit for implementing T flip-flop from
conversion table using K-Map D flip-flop
For D
The Boolean expression for T from the conversion table using K-Maps
For T
The Boolean expressions for T flip-flop from the conversion table using K-Maps
For T
⨁
The circuit for implementing D flip-flop from T flip-flop