Prepared by: Daniyal Khan
MCS 2nd Semester
NCBA&E RYK
1
 Intro to FSMs
 Moore/Mealy Comparison
 Mealy Machine Implementation (JFLAP)
 Applications and Advantages
2
 A finite-state machine, or FSM for short, is a model of computation based on a
hypothetical machine made of one or more states. Only a single state can be active
at the same time, so the machine must transition from one state to another in
order to perform different actions.
 FSMs: Moore/Mealy Machines
3
MOORE
 The output of a Moore finite state
machine depends only on the
machine's current state; transitions
are not directly dependent upon
input.
MEALY
 In the theory of computation, a
Mealy machine is a finite state
transducer that generates an output
based on its current state and input.
This means that the state diagram
will include both an input and output
signal for each transition edge.
4
5
6
Some examples of applications:
 number classification
 watch with timer
 vending machine
 traffic light
 bar code scanner
 gas pumps
7
Mealy Model:
Mealy leads to reduction in number of states
Mealy is faster because output will change as soon as input
changes.
8
We have discussed:
 FSMs
 Moore/Mealy Comparison
 Mealy Machine Implementation (JFLAP)
 Applications and Advantages
9
10
11

Mealy Machine by Daniyal Khan

  • 1.
    Prepared by: DaniyalKhan MCS 2nd Semester NCBA&E RYK 1
  • 2.
     Intro toFSMs  Moore/Mealy Comparison  Mealy Machine Implementation (JFLAP)  Applications and Advantages 2
  • 3.
     A finite-statemachine, or FSM for short, is a model of computation based on a hypothetical machine made of one or more states. Only a single state can be active at the same time, so the machine must transition from one state to another in order to perform different actions.  FSMs: Moore/Mealy Machines 3
  • 4.
    MOORE  The outputof a Moore finite state machine depends only on the machine's current state; transitions are not directly dependent upon input. MEALY  In the theory of computation, a Mealy machine is a finite state transducer that generates an output based on its current state and input. This means that the state diagram will include both an input and output signal for each transition edge. 4
  • 5.
  • 6.
  • 7.
    Some examples ofapplications:  number classification  watch with timer  vending machine  traffic light  bar code scanner  gas pumps 7
  • 8.
    Mealy Model: Mealy leadsto reduction in number of states Mealy is faster because output will change as soon as input changes. 8
  • 9.
    We have discussed: FSMs  Moore/Mealy Comparison  Mealy Machine Implementation (JFLAP)  Applications and Advantages 9
  • 10.
  • 11.