0% found this document useful (0 votes)
13 views25 pages

Module 3 Sequential Circuits

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views25 pages

Module 3 Sequential Circuits

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Module 3:

Sequential Logic Circuits

Logic Circuits and Switching


Armie Q. Valencia Theory 1st Wave 1st Tri S.Y. 2425
Sequential Logic Circuits (SLC)
Combinational logic circuits are perfect for those
applications when a Boolean function be immediately
evaluated, given the current inputs.
Examples: multiplexer, ripple-carry adder, shifter, etc

However, sometimes, we need a kind of circuits that


change value by considering the current inputs and its
current state.
Memory is such an example that requires to remember the
current state
The circuits need to “remember” their states.

Sequential logic circuits (SLC) provide this functionality.


Armie Q. Valencia Logic Circuits and Switching
Theory 1st Wave 1st Tri S.Y. 2425
How to “remember”?
Think about the states in your own
life-time
1 years old, blabla…
2 years old, blabla…
3 years old, blabla…

Time

Logic Circuits and Switching


Armie Q. Valencia Theory 1st Wave 1st Tri S.Y. 2425
Essential Component of Sequential Circuits: Clocks
As the name implies, sequential logic circuits require a means
by which events can be sequenced.
The change of states is triggered by the clock.
The “clock” is a special circuit that sends electrical
pulses to a sequential logic circuit.
Clocks produce electrical waveforms constantly, such as the
one shown below.

Logic Circuits and Switching


Armie Q. Valencia Theory 1st Wave 1st Tri S.Y. 2425
When Change Its State?
State changes occur in sequential circuits, only when
the clock ticks.
A sequential logic circuits could changes it state
Either, at the rising/falling edge of the clock pulse ,
Or, when the clock pulse reaches its highest/lowest level.

Logic Circuits and Switching


Armie Q. Valencia Theory 1st Wave 1st Tri S.Y. 2425
Edge-triggered Or Level-triggered?
SLC that changes its state at the rising edge, or the
falling edge of the clock pulse is called Edge-
triggered SLC.
SLC that changes its state when the clock voltage
reaches to its highest or lowest level are called
Level-triggered SLC.
Level-triggered SLC
Edge-triggered SLC

Logic Circuits and Switching


Armie Q. Valencia Theory 1st Wave 1st Tri S.Y. 2425
Latch And Flip-flop
-latch and flip-flop are two kinds of SLCs,
which are used to construct memory
A latch is level-triggered
A flip-flop is edge-triggered
Which one depends on the length of the clock
pulse?
Latch, or
flip-flop?

Logic Circuits and Switching


Armie Q. Valencia Theory 1st Wave 1st Tri S.Y. 2425
Essential Component Of Sequential Circuits:
Feedback
The most important design mechanism of SLC is
Feedback
◼ Feedback can retain the state of sequential circuits
Feedback in digital circuits occurs when an output
is looped back as an input.
A simple example of this concept is shown below.
If Q is 0 it will always be 0, if it is 1, it will always be 1. ---
The motivation of Memory!

Logic Circuits and Switching


Armie Q. Valencia Theory 1st Wave 1st Tri S.Y. 2425
SR Flip-flop
You can see how feedback works by examining the most
basic sequential logic components, the SR flip-flop.
The “SR” stands for set/reset.
The internals of an SR flip-flop are shown below,

along with its block diagram. Clock Driven

Logic Circuits and Switching


Armie Q. Valencia Theory 1st Wave 1st Tri S.Y. 2425
C
Behavior Of An SR Flip-flop
The behavior of an SR flip-flop is illustrated in the
following truth table.
Let’s denote Q(t) as the value of the output at time t, and
Denote Q(t+1) is the value of Q at time t+1.

Logic Circuits and Switching


C
Armie Q. Valencia Theory 1st Wave 1st Tri S.Y. 2425
Retain its Change its
original value value

SR Flip-flop Truth Table


We consider Q(t), its
current output, as the
third input for SR flip-
flop, besides S and R.
Q(t+1)
The truth table for this =Q(t)
circuit, as shown on the
0
right.
When both S and R are 1
1, the SR flip-flop is in
forbidden state
Logic Circuits and Switching
Armie Q. Valencia forbidden state Theory 1st Wave 1st Tri S.Y. 2425
Clocked SR Flip-flop

Logic Circuits and Switching


Armie Q. Valencia Theory 1st Wave 1st Tri S.Y. 2425
JK Flip-flop
One limitation of SR flip-flop is that, when S and R are
both 1, the output is undefined.
This is not nice because it wastes a state
Therefore, SR flip-flop can be modified to provide a stable
state when both S and R inputs are 1.

This modified flip-flop is


called a JK flip-flop,
shown on the right.
- The “JK” is in honor of
Jack Kilby.
Logic Circuits and Switching
Armie Q. Valencia Theory 1st Wave 1st Tri S.Y. 2425
Sequential Circuits
On the right, we see how an
SR flip-flop can be modified
to create a JK flip-flop.
The truth table indicates
that the flip- flop is stable
for all inputs.
When J and K are both 1,
Q(t+1) = ¬Q(t)

Logic Circuits and Switching


Armie Q. Valencia Theory 1st Wave 1st Tri S.Y. 2425
An Example
Let’s say a JK flip-flop is rising-edge triggered
At t0, Q(t) = 0. What will be the changes of the value of Q over
time?
Time
• Any time other than
the rising edge won’t
trigger this JK flip-flop
to change its state
D Flip-flop
Another modification of the SR flip-flop is the D flip-
flop, shown below with its truth table.
You will notice that the output of the flip-flop remains
the same during subsequent clock pulses. The output
changes only when the value of D changes.

Logic Circuits and Switching


Armie Q. Valencia Theory 1st Wave 1st Tri S.Y. 2425
D Flip-flop
The D flip-flop is the fundamental circuit of
computer memory.
D flip-flop and its truth table are illustrated
as below.

Logic Circuits and Switching


Armie Q. Valencia Theory 1st Wave 1st Tri S.Y. 2425
Sequential Circuits
Sequential circuits are used anytime that we
need to design a “stateful” application.
A stateful application is one where the next state of the
machine depends on the current state of the machine and
the input.
A stateful application requires both combinational
and sequential logic.
The following slides provide several examples of
circuits that fall into this category.

Logic Circuits and Switching


Armie Q. Valencia Theory 1st Wave 1st Tri S.Y. 2425
Sequential Circuits
This illustration shows a 4-
bit register consisting of D
flip-flops. You will usually
see its block diagram
(below) instead.

A larger memory configuration


is shown on the next slide. Logic Circuits and Switching
Theory 1st Wave 1st Tri S.Y. 2425
Armie Q. Valencia
4X3 Memory

Read the
content
Write from the
the memory
content
into the
memory
(0,0); (0,1); (1,0); (1,1);
Choose a word, Wordi 93
(0<=i<=3)
Sequential Circuits
A binary counter is
another example of a
sequential circuit.
The low-order bit is
complemented at
each clock pulse.
Whenever it changes
from 0 to 1, the next bit is
complemented, and so
on through the other flip-
flops.
Logic Circuits and Switching
Armie Q. Valencia Theory 1st Wave 1st Tri S.Y. 2425
Synchronous MOD-16 counter
Designing Circuits
Digital designers rely on specialized software to
create efficient circuits.
Thus, software is an enabler for the
construction of better hardware.
Of course, software is in reality a collection of
algorithms that could just as well be
implemented in hardware.
Recall the Principle of Equivalence of
Hardware and Software.
Logic Circuits and Switching
Armie Q. Valencia Theory 1st Wave 1st Tri S.Y. 2425
Designing Circuits
When we need to implement a simple, specialized
algorithm and its execution speed must be as fast as
possible, a hardware solution is often preferred.
This is the idea behind embedded systems, which are
small special-purpose computers that we find in many
everyday things.
Embedded systems require special programming that
demands an understanding of the operation of digital
circuits, the basics of which you have learned in this
chapter.
Logic Circuits and Switching
Armie Q. Valencia Theory 1st Wave 1st Tri S.Y. 2425
Summary
Computers are implementations of Boolean
logic.
Boolean functions are completely described by
truth tables.
Logic gates are small circuits that implement
Boolean operators.
The basic gates are AND, OR, and NOT.
The XOR gate is very useful in parity
checkers and adders.
The “universal gates” are NOR and NAND. Logic Circuits and Switching
Armie Q. Valencia Theory 1st Wave 1st Tri S.Y. 2425
Summary
Computer circuits consist of combinational logic
circuits and sequential logic circuits.
Combinational circuits produce outputs almost
immediately when their inputs change.
Sequential circuits require clocks to control
their changes of state.
The basic sequential circuit unit is the flip-flop:
The behaviors of the SR, JK, and D flip-flops are
the most important to know.
Logic Circuits and Switching
Armie Q. Valencia Theory 1st Wave 1st Tri S.Y. 2425

You might also like