Finite State Machines

?

Finite State Machines

Finite State Machine- Any device that stores its current status and whose status can be changed as a result of an input

  • Used in many areas of computer science
  • Allow programmers to think about all of the different states or conditions a device/code could be in and to plan what should happen to that device when it recieves an allowable input of some kind
  • They are particularly useful at the design stage as they force the designer to think about every possible input and how the changes the state of the machine
1 of 4

Example of a FSM

(input/output) e.g. (0/1) shows 0 is input and 1 is output

Image result for finite state machine examples (http://www.eecs.berkeley.edu/~newton/Classes/CS150sp97/lectures/week1_1/sld029.jpg)

2 of 4

FSM Symbols

Symbol                                   Meaning

[Circle]                                    State

[Circle with arrow pointing     Starting State

at it]

[Circle within Circle]               Accept (or end) State

['i' with an arrow going           Connector (with i being the input)

over it]

['j/k' with an arrow going        Connector (with j being input and k being output]

over it]

3 of 4

Decision Table

The same information can be represented as a decision table. This makes it easier to observe all possible conditions are accounted for.Image result for finite state machine decision table example (http://www.eecs.berkeley.edu/~newton/Classes/CS150sp97/lectures/week1_1/sld025.jpg)

4 of 4

Comments

No comments have yet been made

Similar Computing resources:

See all Computing resources »See all Finite State Machines resources »