Nepedia
Back to Discover
Independent Reader
🔢

Finite-state machine

math Maturity 11-13 Next article →

Imagine a gate at a subway station.

Tornelli
Tornelli

It can be in two states: locked or unlocked. If you push the gate while it is locked, nothing happens. But if you put in a coin, the state changes to unlocked. Once you push through, it changes back to locked. This is a finite-state machine.

Turnstile state machine colored
Turnstile state machine colored

A finite-state machine is a way to model how things work. It can only be in one state at a time. It changes states when it receives an input. This change is called a transition. These machines are used in many things. Vending machines, elevators, and traffic lights all use them.

There are different kinds of these machines. Some are called acceptors. They look at a sequence of symbols to see if it fits a rule. Others are called transducers. These machines produce an output based on the state or the input.

Fsm Moore model door control
Fsm Moore model door control

For example, an elevator door uses these ideas to open and close. These machines have a set amount of memory. This memory is limited by how many states they have.

177 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (10)
File:Turnstile state machine colored.svg
Turnstile state machine colored.svg
File:Tornelli.jpg
Tornelli.jpg
File:UML state machine Fig5.png
UML state machine Fig5.png
File:SdlStateMachine.png
SdlStateMachine.png
File:Finite state machine example with comments.svg
Finite state machine example with comments.svg
File:Fsm parsing word nice.svg
Fsm parsing word nice.svg
File:DFAexample.svg
DFAexample.svg
File:Fsm Moore model door control.svg
Fsm Moore model door control.svg
File:Fsm mealy model door control.svg
Fsm mealy model door control.svg
File:4 bit counter.svg
4 bit counter.svg
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.