Module 6 - Sequential Circuits, Excitation Function, State Table, State Diagram
Module 6 - Sequential Circuits, Excitation Function, State Table, State Diagram
Sequential
Circuits,
Excitation
Function, State
Table and State
Diagram
Module 6
Amacdalino2020
AMACDALINO2020
SEQUENTIAL CIRCUITS, EXCITATION FUNCTION, STATE TABLE AND STATE DIAGRAM
Table of Contents
Introduction ......................................................................................................................................... 1
Learning Outcomes ............................................................................................................................ 1
Learning Content................................................................................................................................ 1
TOPIC 1: SEQUENTIAL CIRCUITS .......................................................................................................... 2
Characteristics of Sequential Circuits ........................................................................................... 2
Types of Sequential Logic Circuits ................................................................................................. 2
i. Event-Driven or Asynchronous Sequential Circuit............................................................ 2
ii. Clock Driven or Synchronous Sequential Circuit.............................................................. 2
iii. Pulse Driven ......................................................................................................................... 3
Difference between Synchronous and Asynchronous Sequential Circuits .............................. 3
Examples of Sequential Logic Circuits .......................................................................................... 4
i. Clocks ................................................................................................................................... 4
ii. Flip-Flops ............................................................................................................................... 4
iii. Bi-Stables .............................................................................................................................. 4
iv. Counters............................................................................................................................... 5
v. Registers ............................................................................................................................... 5
vi. Memories ............................................................................................................................. 6
Differences between the Combinational and Sequential Logic Circuits ................................. 6
TOPIC 2: SEQUENTIAL STATE MACHINES (FSM) .................................................................................. 6
Definition .......................................................................................................................................... 6
STATE TABLES AND STATE DIAGRAMS ............................................................................................. 7
TOPIC 3: MEALY AND MOORE STATE MACHINES ............................................................................ 11
Mealy Machine ............................................................................................................................. 11
Moore Machine ............................................................................................................................ 11
Mealy Vs. Moore State Machines ............................................................................................... 12
TOPIC 4: ANALYSIS OF SEQUENTIAL CIRCUITS ................................................................................. 13
How to Analyze Sequential Circuits ............................................................................................ 13
EXAMPLES OF STATE MACHINES APPLICATION ........................................................................... 16
i. Pedestrian Crossing Traffic Light ...................................................................................... 16
ii. Up/Down/Stop Counter ................................................................................................... 17
iii. Vending Machine Controller ........................................................................................... 18
Teaching and Learning Activities.................................................................................................... 19
Recommended learning materials and resources for supplementary reading ........................ 19
Flexible Teaching Learning Modality (FTLM) adopted .................................................................. 19
Assessment Task ................................................................................................................................ 19
AMACDALINO2020 i
SEQUENTIAL CIRCUITS, EXCITATION FUNCTION, STATE TABLE AND STATE DIAGRAM
Module 6
Sequential Circuits, Excitation Function, State Table and State Diagram
Introduction
Learning Outcomes
Learning Content
AMACDALINO2020 1
SEQUENTIAL CIRCUITS, EXCITATION FUNCTION, STATE TABLE AND STATE DIAGRAM
AMACDALINO2020 2
SEQUENTIAL CIRCUITS, EXCITATION FUNCTION, STATE TABLE AND STATE DIAGRAM
AMACDALINO2020 3
SEQUENTIAL CIRCUITS, EXCITATION FUNCTION, STATE TABLE AND STATE DIAGRAM
ii. Flip-Flops
➢ The basic building block of the combinational circuit has logic gates, while
indeed the basic building block of a sequential circuit is a flip-flop.
➢ Flip-flop has a better and greater usage in shift register, counters and memory
devices.
➢ It is a storage device capable of storing one bit of data.
➢ Flip flop has two inputs and two outputs labeled as Q and Q’. It is normal and
complements.
iii. Bi-Stables
➢ Are indicated by a box or circle in most cases. Lines in or around bi-stables not
only mark them as bi-stables but also indicate how they function.
➢ Bi-stables are of two types latch and flip flop.
➢ The bi-stables have two stable states one is SET and the other one is RESET. They
can retain either of these stages indefinitely, which makes them useful for
storage purposes. Latches and flip-flops are different in the way they change
from one state to another.
AMACDALINO2020 4
SEQUENTIAL CIRCUITS, EXCITATION FUNCTION, STATE TABLE AND STATE DIAGRAM
iv. Counters
➢ Is a register that goes throughout a predetermined sequence of states upon
the application of clock pulses.
➢ It is also some sort of sequential circuit whose state diagram is a single cycle. In
other words, counters are a particular case of a finite state machine. The output
is generally a state value.
➢ There are two types of counters: Asynchronous counters (Ripple counter) and
the other one is Synchronous counters.
o The asynchronous counter is the clock signal (CLK), which is simply used
to clock the first FF. Each FF (except the first FF) is clocked by the
preceding FF.
o The synchronous counter is the clock signal (CLK) that is functional to all
FF, which means that all FF shares the same clock signal. Thus, the
output changes at the same time.
v. Registers
➢ Registers are clocked sequential circuits.
➢ A register is a collection of flip-flops; each flip-flop is capable of storing one bit
of information. An n-bit register consists of n flip-flops and is capable of storing
n bits of information. Besides flip-flops, a register usually contains a
combinational logic to perform some simple tasks. The flip-flops hold binary
information. The gates to determine how the information is shifted into the
register.
➢ Counters are a special type of register. A counter goes through a
predetermined sequence of states.
AMACDALINO2020 5
SEQUENTIAL CIRCUITS, EXCITATION FUNCTION, STATE TABLE AND STATE DIAGRAM
vi. Memories
➢ Memory elements can be anything that creates a past value available at some
future time-devices that can behold a binary value.
➢ Memory elements are typically flip-flops.
➢ Memory output which is considered as a circuit’s “current state” is a numerical
label. The state embodies all the information about the past needed to define
the current output.
Note: Computer circuits consist of combinational logic circuits and sequential logic circuits.
Combinational circuits produce outputs immediately when their input changes. Sequential
circuits require clocks to control their changes of state. The fundamental sequential circuit unit
is the flip-flop and the behavior of the SR, JK, and D flip-flops are the most important to
know. Review your module 4 for further information of these flip-flops.
AMACDALINO2020 6
SEQUENTIAL CIRCUITS, EXCITATION FUNCTION, STATE TABLE AND STATE DIAGRAM
Characteristic Table – defines the state of each flip-flop as a function of its inputs and previous
state.
Excitation Table – lists the required inputs for a given change of state
State Table – The state table representation of a sequential circuit consists of four sections
labelled present state, input, next state and output. The present state designates the state of
flip-flops before the occurrence of a clock pulse. The next state shows the states of flip-flops
after the clock pulse, and the output section lists the value of the output variables during the
present state.
State Diagram - In addition to graphical symbols, tables or equations, flip-flops can also be
represented graphically by a state diagram.
• In this diagram, a state is represented by a circle, and the transition between states is
indicated by directed lines (or arcs) connecting the circles.
• The binary number inside each circle identifies the state the circle represents.
• The directed lines are labelled with two binary numbers separated by a slash (/). The
input value that causes the state transition is labelled first. The number after the slash
symbol / gives the value of the output.
• A directed line connecting a circle with itself indicates that no change of state occurs.
The state diagram provides exactly the same information as the state table and is
obtained directly from the state table.
• The number of states is 2n where n is the number of flip-flops.
http://ee.usyd.edu.au/tutorials/digital_tutorial/part3/t-diag.htm
AMACDALINO2020 7
SEQUENTIAL CIRCUITS, EXCITATION FUNCTION, STATE TABLE AND STATE DIAGRAM
Example 1:
Draw the state diagram of RS Flip-flop.
Solution:
1st Step: Determine the number of states.
• 2n (n=1, number of flip-flops)
• 21 = 2, the states are 0 and 1
AMACDALINO2020 8
SEQUENTIAL CIRCUITS, EXCITATION FUNCTION, STATE TABLE AND STATE DIAGRAM
Example 2:
Consider a sequential circuit shown below. It has one input x and one output Z and two
state variable Q1Q2. Construct the state table and then draw the state diagram.
Solution:
a. Determine the behavior of the circuit by getting the Boolean expressions for Z, D1 and
D2.
Z = x*Q1
D1 = x' + Q1
D2 = x*Q2' + x'*Q1'
b. Use the equations to form the state table that consists of Present State (Q1, Q2), Next
State (Q1, Q2 when x=0 and x=1) and Output (when x=0 and x=1).
AMACDALINO2020 9
SEQUENTIAL CIRCUITS, EXCITATION FUNCTION, STATE TABLE AND STATE DIAGRAM
Solution:
1. Determine the states
a. 00
b. 01
c. 10
d. 11
AMACDALINO2020 10
SEQUENTIAL CIRCUITS, EXCITATION FUNCTION, STATE TABLE AND STATE DIAGRAM
Mealy Machine
• A Mealy Machine is an FSM whose output depends on the present state as well as the present
input.
• It can be described by a 6 tuple (Q, ∑, O, δ, X, q0) where −
o Q is a finite set of states.
o ∑ is a finite set of symbols called the input alphabet.
o is a finite set of symbols called the output alphabet.
o δ is the input transition function where δ: Q × ∑ → Q
o X is the output transition function where X: Q × ∑ → O
o q0 is the initial state from where any input is processed (q0 ∈ Q).
→a b x1 c x1
b b x2 d x3
c d x3 c x1
d d x3 d x2
Moore Machine
• Moore machine is an FSM whose outputs depend on only the present state.
• A Moore machine can be described by a 6 tuple (Q, ∑, O, δ, X, q0) where −
o Q is a finite set of states.
o ∑ is a finite set of symbols called the input alphabet.
AMACDALINO2020 11
SEQUENTIAL CIRCUITS, EXCITATION FUNCTION, STATE TABLE AND STATE DIAGRAM
→a b c x2
b b d x1
c c d x2
d d d x3
Output depends both upon the present Output depends only upon the present state.
state and the present input
Generally, it has fewer states than Moore Generally, it has more states than Mealy
Machine. Machine.
The value of the output function is a The value of the output function is a function
function of the transitions and the changes, of the current state and the changes at the
when the input logic on the present state is clock edges, whenever state changes occur.
done.
Mealy machines react faster to inputs. They In Moore machines, more logic is required to
generally react in the same clock cycle. decode the outputs resulting in more circuit
delays. They generally react one clock cycle
later.
AMACDALINO2020 12
SEQUENTIAL CIRCUITS, EXCITATION FUNCTION, STATE TABLE AND STATE DIAGRAM
Logic Schematic
Start with the logic schematic from which excitation equations for each flip-flop input
can be derived. Then, to obtain next-state equations, insert the excitation equations into the
characteristic equations. The output equations can be derived from the schematic, and once
output and next-state equations are available, the next-state and output tables as well as
state diagrams can be generated. At this stage, use either the table or the state diagram to
develop a timing diagram which can be verified through simulation.
Examples:
1. Derive the state table and state diagram for the sequential circuit shown in the figure.
AMACDALINO2020 13
SEQUENTIAL CIRCUITS, EXCITATION FUNCTION, STATE TABLE AND STATE DIAGRAM
a. Derive the Boolean expressions for the inputs of each flip-flops in the schematic, in terms
of external input Cnt and the flip-flop outputs Q1 and Q0. These are called excitation
equations.
D0 = Cnt XOR Q0 = Cnt'Q0 + CntQ0'
D1 = Cnt'Q1 + CntQ1'Q0 + CntQ1Q0'
b. Derive the next-state equations by converting these excitation equations into flip-flop
characteristic equations.
Q0next = D0 = Cnt XOR Q0 = Cnt'Q0 + CntQ0'
Q1next = D1 = Cnt'Q1 + CntQ1'Q0 + CntQ1Q0'
00 01
00
01 01 10
10 10 11
11
11 00
Following these transition arcs, we can see that as long as Cnt = 1, the sequential circuit
goes through the states in the following sequence: 0, 1, 2, 3, 0, 1, 2, .... On the other
hand, when Cnt = 0, the circuit stays in its present state until Cnt changes to 1, at which
the counting continues.
Since this sequence is characteristic of modulo-4 counting, we can conclude that the
sequential circuit is a modulo-4 counter with one control signal, Cnt, which enables
counting when Cnt = 1 and disables it when Cnt = 0.
AMACDALINO2020 14
SEQUENTIAL CIRCUITS, EXCITATION FUNCTION, STATE TABLE AND STATE DIAGRAM
2. Construct the State Table and State Diagram of the circuit below:
AMACDALINO2020 15
SEQUENTIAL CIRCUITS, EXCITATION FUNCTION, STATE TABLE AND STATE DIAGRAM
AMACDALINO2020 16
SEQUENTIAL CIRCUITS, EXCITATION FUNCTION, STATE TABLE AND STATE DIAGRAM
State Diagram
AMACDALINO2020 17
SEQUENTIAL CIRCUITS, EXCITATION FUNCTION, STATE TABLE AND STATE DIAGRAM
State Diagram
AMACDALINO2020 18
SEQUENTIAL CIRCUITS, EXCITATION FUNCTION, STATE TABLE AND STATE DIAGRAM
In this Module, the online and remote FTLM is adapted using the university’s Learning
Management System called SeDi. For the online modality, the Virtual Classroom of SeDi shall
be used for the purpose of delivering a lecture and allowing a synchronous discussion with the
students. For the remote modality, SeDI shall be used to upload the module and to allow
asynchronous discussion with the students. This will also be used as platform for the submission
of the requirements.
Assessment Task
Watch the video lectures listed in the Teaching and Learning Activities of the module.
Watch the videos and provide your impressions or understanding of the videos through the
forum that will be posted. Impressions in each video will be equivalent to 15 points each, total
of 45 points.
AMACDALINO2020 19