Unit 4
Unit 4
Timing signal
(clock)
Clock
a periodic external event (input)
Clock
synchronizes when current state changes happen
keeps system well-behaved
makes it easier to design and build large systems
Difference between the combinational circuits and
sequential circuits are given below:
S.No Combinational Circuits Sequential Circuits
1 The outputs of the combinational circuit The outputs of the sequential circuits
depend only on the present inputs. depend on both present inputs and
present state(previous output).
2 The feedback path is not present in the The feedback path is present in the
combinational circuit. sequential circuits.
3 In combinational circuits, memory In the sequential circuit, memory
elements are not required. elements play an important role and
require.
4 The clock signal is not required for The clock signal is required for
combinational circuits. sequential circuits.
5 The combinational circuit is simple to It is not simple to design a sequential
design. circuit.
6 Combinational circuits are faster because Sequential circuits are slower than
the delay between the input and the combinational circuits
output is due to propagation delay of
gates only.
Types of Sequential Circuits
Difference between Synchronous and Asynchronous Sequential
Circuits
Key Synchronous Sequential Circuits Asynchronous Sequential
Circuits
Synchronous sequential circuits are Asynchronous sequential
digital sequential circuits in which circuits are digital sequential
the feedback to the input for next circuits in which the feedback
Definition
output generation is governed by to the input for next output
clock signals. generation is not governed by
clock signals.
In Synchronous sequential circuits, Unclocked flip flop or time
the memory unit which is being get delay is used as memory
Memory Unit used for governance is clocked flip element in case of
flop. Asynchronous sequential
circuits.
The states of Synchronous There are chances for the
sequential circuits are always Asynchronous circuits to enter
predictable and thus reliable. into a wrong state because of
State
the time difference between
the arrivals of inputs. This is
called "race condition".
Key Synchronous Sequential Circuits Asynchronous Sequential
Circuits
It is easy to design Synchronous The presence of feedback
sequential circuits among logic gates causes
Complexity instability issues making the
design of Asynchronous
sequential circuits difficult.
Due to the propagation delay of Since there is no clock signal
clock signal in reaching all delay, these are fast compared
Performance elements of the circuit the to the Synchronous Sequential
Synchronous sequential circuits Circuits
are slower in its operation speed
Synchronous circuits are used in Asynchronous circuits are used
counters, shift registers, memory in low power and high speed
units. operations such as simple
microprocessors, digital signal
Example
processing units and in
communication systems for
email applications, internet
access and networking.
Clock Signal and Triggering
Clock signal
A clock signal is a periodic signal in which ON time and OFF time need not be the same.
When ON time and OFF time of the clock signal are the same, a square wave is used to
represent the clock signal. Below is a diagram which represents the clock signal:
Types of Triggering
These are two types of triggering in sequential circuits:
Level triggering
The logic High and logic Low are the two levels in the clock signal. In level triggering,
when the clock pulse is at a particular level, only then the circuit is activated. There are
the following types of level triggering:
Positive level triggering
In a positive level triggering, the signal with Logic High occurs. So, in this triggering, the
circuit is operated with such type of clock signal. Below is the diagram of positive level
triggering:
Negative level triggering
In negative level triggering, the signal with Logic Low occurs. So, in this triggering, the circuit
is operated with such type of clock signal. Below is the diagram of Negative level triggering:
Edge triggering
In clock signal of edge triggering, two types of transitions occur, i.e., transition either from
Logic Low to Logic High or Logic High to Logic Low.
Based on the transitions of the clock signal, there are the following types of edge
triggering:
Positive edge triggering
The transition from Logic Low to Logic High occurs in the clock signal of positive edge
triggering. So, in positive edge triggering, the circuit is operated with such type of clock
signal.
Memory: Sequential circuits have the ability to store binary values, which makes them
ideal for applications that require memory elements, such as timers and counters.
Timing: Sequential circuits are commonly used to implement timing and
synchronization in digital systems, making them essential for real-time control
applications.
State machine implementation: Sequential circuits can be used to implement state
machines, which are useful for controlling complex digital systems and ensuring that
they operate as intended.
Error detection: Sequential circuits can be designed to detect errors in digital systems
and respond accordingly, improving the reliability of digital systems.
Complexity: Sequential circuits are typically more complex than combinational circuits
and require more components to implement.
Timing constraints: The design of sequential circuits can be challenging due to the need
to ensure that the timing of the inputs and outputs is correct.
Testing and debugging: Testing and debugging sequential circuits can be more difficult
compared to combinational circuits due to their complex structure and state-dependant
outputs.
Latches and Flip Flops
• Latches and flip flops are the basic elements and these are used to store
information. One flip flop and latch can store one bit of data.
• The main difference between the latches and flip flops is that, a latch checks
input continuously and changes the output whenever there is a change in
input.
• But, flip flop is a combination of latch and clock that continuously checks
input and changes the output time adjusted by the clock.
• Both Latches and flip flops are circuit elements wherein the output not only
depends on the current inputs, but also depends on the previous input and
outputs.
• The main difference between the latch and flip flop is that a flip flop has a
clock signal, whereas a latch does not. Basically, there are four types of
latches and flip flops: SR, D, JK and T.
Difference between Latch and Flip flop
SNO Flip-flop Latch
Latch is also a bistable device whose
Flip-flop is a bistable device i.e., it has two
1 states are also represented as 0 and
stable states that are represented as 0 and 1.
1.
It checks the inputs but changes the output It checks the inputs continuously
2 only at times defined by the clock signal or and responds to the changes in
any other control signal. inputs immediately.
3 It is a edge triggered device. It is a level triggered device.
Gates like NOR, NOT, AND, NAND are
4 These are also made up of gates.
building blocks of flip flops.
They are classified into asynchronous or There is no such classification in
5
synchronous flipflops. latches.
These can be used for the designing
It forms the building blocks of many
6 of sequential circuits but are not
sequential circuits like counters.
generally preferred.
7 Flip-flop always have a clock signal Latches doesn’t have a clock signal
8 Flip-flop can be build from Latches Latches can be build from gates
9 ex:D Flip-flop, JK Flip-flop ex:SR Latch, D Latch
Storage Elements
• A storage element in a digital circuit can maintain a binary state
indefinitely, until directed by an input, signal to switch states.
• The major differences among various types of storage elements are
in the number of inputs in the manner in which the inputs affect
the binary state.
• Storage elements that operate with signal levels are referred to as
latches, these are controlled by a clock transitions are referred to as
flip-flop.
• Latches are said to be level sensitive devices, flip-flops are edge
sensitive devices.
SR Latch
SR Latch is also called as Set Reset Latch.
This circuit has two inputs S & R and two outputs Q & Q’.
The state of the latch corresponds to the level of Q (HIGH or LOW, 1 or
0) and Q’ is, of course.
S-R Latch with NORs (active high S-R latch)
S- R Latch Truth table.
S R 𝑸𝒏 𝑸𝒏+𝟏 State
0 0 0 0 No Change
0 0 1 1
0 1 0 0 Reset
0 1 1 0
• S-R latch made from cross-coupled NORs
1 0 0 1 Set
• If Q = 1, set state for S=1,R=0
• If Q = 0, reset state for S=0,R=1 1 0 1 1
• Usually S=0 and R=0 no change in state. 1 1 0 x Invalid
• S=1 and R=1 generates 1 1 1 x
𝑸 =Present state
unpredictable/Invalid results 𝑸𝒏 =Next state
𝒏+𝟏
S-R Latch with NANDs(active-low S-R Latch)
S- R Latch Truth table.
S R 𝑸𝒏 𝑸𝒏+𝟏 State
0 0 0 x Invalid
0 0 1 x
0 1 0 0 Set
0 1 1 0
1 0 0 1 Reset
1 0 1 1
1 1 0 0 No
1 1 1 1 Change
• Latch made from cross-coupled NANDs
• Sometimes called S’-R’ latch
• If Q = 1, set state for S=1,R=0
• If Q = 0, reset state for S=0,R=1
• Usually S=1 and R=1 No change in state.
• S=0 and R=0 generates unpredictable/Invalid results
SR Flip-Flop
• SR flip-flop operates with only positive clock transitions or negative clock transitions.
Whereas, SR latch operates with enable signal.
• The type flip-flop which has two inputs namely S (Set) and R (Reset) is termed as
an SR flipflop.
• If the S and R inputs of the flip-flop control its outputs when a clock pulse is present
(i.e. goes from either low to high or high to low), then it called a clocked SR flip-flop.
• Since, the clock signal synchronizes the operation of the SR flip-flop, hence the
clocked SR flip-flop is also known as synchronous SR flip-flop.
SR Flip-Flop
Characteristic table of SR flip-flop
Prese
Present Next
Clk nt
Inputs State
State
1 S R Qt Qt+1
1 0 0 0 0
1 0 0 1 1
1 0 1 0 0
S R Qt+1 State 1 0 1 1 0
0 0 Qt No change 1 1 0 0 1
0 1 0 Reset 1 1 0 1 1
1 0 1 Set 1 1 1 0 x
1 1 - Invalid 1 1 1 1 x
S-R Flip Flop Truth table
1 S R Qt Qt+1 Qt Qt+1 S R
1 0 0 0 0 0 0 0 X
1 0 0 1 1 0 1 1 0
1 0 1 0 0 1 0 0 1
1 0 1 1 0 1 1 X 0
1 1 0 0 1
1 1 0 1 1
1 1 1 0 x
1 1 1 1 x
Qn+1=S+R′Qn
D Flip-Flop
• In SR NAND Gate Bistable circuit, the undefined input condition of SET = "0"
and RESET = "0" is forbidden. It is the drawback of the SR flip flop. This state:
Override the feedback latching action.
Force both outputs to be 1.
Lose the control by the input, which first goes to 1, and the other input
remains "0" by which the resulting state of the latch is controlled.
• The D flip flop is the most important flip flop from other clocked types. It
ensures that at the same time, both the inputs, i.e., S and R, are never equal to
1.
• The Delay flip-flop is designed using a gated SR flip-flop with an inverter
connected between the inputs allowing for a single input D(Data).
• This single data input, which is labeled as "D" used in place of the "Set" input
and for the complementary "Reset" input, the inverter is used. Thus, the level-
sensitive D-type or D flip flop is constructed from a level-sensitive SR flip flop.
D Qt+1 State
0 0 Reset
1 1 Set
Prese
Present Next
Clk nt
Inputs State
State
1 J K Qt Qt+1
1 0 0 0 0
1 0 0 1 1
J K Qt+1 State 1 0 1 0 0
0 0 Qt No change 1 0 1 1 0
0 1 0 Reset 1 1 0 0 1
1 0 1 Set 1 1 0 1 1
1 1 Qt Toggle 1 1 1 0 1
1 1 1 1 0
J-K Flip Flop Truth table
• SR flip-flop to D flip-flop
• SR flip-flop to JK flip-flop
• JK flip-flop to T flip-flop
SR flip-flop to D flip-flop
• Here, the given flip-flop is SR flip-flop and the
desired flip-flop is D flip-flop. Therefore, consider
the following characteristic table of D flip-flop