state machines

DR.S & S.S GHANDHY
ENEGINEERING COLLAGE
SUBJECT:DIGITAL ELECTRONICS
130230111001-ADITI AGGRAWAL
 130230111007-AYUSHI MEHTA
 130230111027-KRISHNA PATEL
 130230111031-NIKITA PATEL
 130230111043-ROSHNI TAILOR
 130230111046-RIYA SHAH


SUBMITED TO:
STATE MACHINES



DEFINITION:
A State machine or finite machine(FSM) or a
sequential machine is a system that can be
described in terms of a set of states that the
system may enter into.
A FSM has a set of inputs,and a set of
outputs.the next state of FSM depends on the
present state and inputs.the outputs also
depends on the present state and inputs.
GENERAL MODEL OF
SEQUENTIAL MACHINE



The output of a sequential machine depends on
the present state as well as the past state.
The present state is stored in the memory
elements.The present states are applied to the
combinational cicuit alongwith the external
inputs.
The outputs and the next state of the sequential
machine are decided by the external inputs and
the present state.
CLASSIFICATION OF STATE MACHINES:
1. On the basis of block.
2. On the basis of model used.
 CLASSIFITION ON THE BASIS OF CLOCK:
1.Synchronous state machines
2.Asynchronous state machines
3.Machine synchronous state machine
 CLASSIFITION OF STATE MACHINES BASED
ON MODEL TYPE:
1.Moore machine:Depends on the present state of
flip flop.
2.Mealy machine:Depends on the present state of
flip flop and the external inputs.
MOORE MACHINE:


The combinational circuts C1 on the inputs side
is called as the next state decoder.The external
inputs and the feedback singals from the memory
elements are applied to this combinational
circuit.C1 is also called Input Forming
Logic(IFL).
The outputs of the memory elements are applied
to another combinational circuits C2 which is
also called as output decoder.C2 is called as
Output Forming Logic(OFL).
MEALY MACHINES:
APPLICATIONS OF THE STATE MACHINES:
1.Motor controllers
2.Traffice lights controller
3.Vending machines
4.Sequence generaters
5.Sequence detectors and many more….
STATE MACHINE NOTATIONS:
1.Input variable
2.Output variable
3.State variable:As the output of the flip flops
4.Excitation variable:As the inputs of the
memory(flip flop).
5.State:The state of a sequential machines is
dependent on the content of memory.
The relation between state variable and state is:
y=2^x
y=maximum number of possible states
x=number of state variables


PRESENT STATE:The status of all state
variable at any instant say “t” before the
application of next clock edge is called a present
state.
NEXT STATE:The status of all state variable at
the same time instant say “t+1” after the
application of clock edge is called as next state.
EXCITATION TABLE OF SR FLIP FLOP:
Present
state of Q
output
Next state
of Q
output
Sn
input
Rn
output
CASE 1
0
0
0
x
CASE 2
0
1
1
0
CASE 3
1
0
0
1
CASE 4
1
1
x
0

EXCITATION TABLE OF D FLIP FLOP:
Output

Input
Present state
Next state
Dn
0
0
0
0
1
1
1
0
0
1
1
1
EXCITATION TABLE OF JK FLIP0 FLOP:
Output
Input
Present
state
Next state
Jn
Kn
0
0
0
x
0
1
1
x
1
0
x
1
1
1
x
0

EXCITATION TABLE OF T FLIP FLOP:
Output
Input
Present state
Next state
Tn
0
0
0
0
1
1`
1
0
1
1
1
0
STATE TABLE:
Present
state
Next state
Output Y
X=0
Qa
Qb
Qa
X=1
Qb
Qa
X=0
X=1
Qb
0
0
0
0
0
1
0
0
0
1
1
1
0
1
0
0
1
0
1
1
0
0
0
1
1
1
1
1
1
1
1
0



The basic element of a sequential circuit is a flip
flop.The outputs Qa,Qb,…..etc of such flip flops
will be used as state inputs to a sequential
circuit.they are also called as state variable.
In addition to this “x” represents an external
input and Y represents the output of the
sequential circuit.
Y will be dependent on the state variables and
the external input x.
STATE DIAGRAM:



The circle represents the present state.the
arrows between the circles define the state
trastion say from 00 to 01 or 01 to 11.
A directed line connecting the same circle
indicates that next state is same as the present
state.
The lining joining the circles are labeled with a
pair of binary numbers with a “/” in between .for
example the line joining 00 and 01 is labeled as
1/0.
THANK YOU