STATE MACHINE

Govt. Engineering CollegeGandhinagar
It is all about……
STATE
MACHINE
What is a state machine?
A state machine is a different way of
thinking about computation
 A state machine has some number of
states, and transitions between those
states
 Transitions occur because of inputs
 A “pure” state machine only knows
which state it is in—it has no other
memory or knowledge

A State Machine or a sequential
machine is a system that can be
described in terms of a set of states that
the system may enter into.
 Once the system is in particular state, it
may remain there for some finite time
duration. This decides the memory
capability of state machine.
 The next state of FSM depends on the
present states and output. The output
also depends on present states and
inputs.

State machine I/O

State machines are designed to respond
to a sequence of inputs, such as
 The individual characters in a string
 A series of external events
State machines may produce output
(often as a result of transitions)
 Alternatively, the “result” of a state
machine may be the state it ends up in

This shows that the sequential machine
consists of combinational circuits
alongwith memory elements.
 The memory element will always appear
in the feedback path.
 Present state is stored in memory
elements. They are applied to
combinational circuit alongwith external
inputs.

A Finite State Machine

A sequential logic unit which
 Takes an input and a current state
 Produces an output and a new state
It is called a Finite State Machine
because it can have, at most, a finite
number of states.
 It is composed of a combinational logic
unit and flip-flops placed in such a way
as to maintain state information.

Representing a Finite State
Machine

It can also be represented using a state
diagram which has the same
information as the state transition
diagram.
State0
State1
Block Diagram:PREVIOUS STATE
STATE MEMORY
D
SET
Q
OUTPUTS
NEXT
STATE
CLR
D
SET
CLR
CLK
Q
...
INPUTS
NEXT STATE
LOGIC
Q
Q
OUTPUT LOGIC
Classification of State Machine:

State Machine are classified on the
following two basis:-

On the basis of clock

On the basis of model used
On the basis of Clock:



Synchronous State Machine:
If the state machine changes its state in
response to the clock and if all the
inputs are synchronous then its called
synchronous state machine
Asynchronous State Machine:
If the changes in the state are based on
only input and output and not on the
clock then its Asynchronous State
Machine
On the basis of Model:Mealy Machine: Output as a function
of both inputs and current states
PREVIOUS STATE
STATE MEMORY
D
SET
Q
OUTPUTS
NEXT
STATE
CLR
D
SET
CLR
CLK
Q
...
INPUTS
COMBINATIONAL
LOGIC
Q
Q
OUTPUT LOGIC
Moore Machine:-Output as a
function of current state only
PREVIOUS STATE
STATE MEMORY
D
SET
Q
OUTPUTS
NEXT
STATE
CLR
D
SET
CLR
CLK
Q
...
INPUTS
COMBINATIONAL
LOGIC
Q
Q
OUTPUT LOGIC
Presented By: Khatwani
Falguni(130130111046)