State machine is composed of state register and combinational logic circuit , According to the control signal, the state can be transferred according to the preset state , It's to coordinate the relevant signal action , A control center that performs a specific operation . The finite state machine is abbreviated as FSM（Finite State Machine）, Mainly divided into 2 Major categories ：
first kind , If the output is only related to the state and not to the input , Is called Moore State machine
The second category , The output is not only related to the state, but also to the input , Is called Mealy State machine
State machine is composed of state register and combinational logic circuit , According to the control signal, the state can be transferred according to the preset state , It's to coordinate the relevant signal action , A control center that performs a specific operation . The state machine is divided into Moore （Moore） State machine and Millie （Mealy） State machine .
An extremely precise description of a state machine is ： It is a directed graph , It consists of a group of nodes and a set of corresponding transfer functions . State machines respond to a series of events “ function ”. Every event belongs to “ current ” The control range of node's transfer function , Where the scope of the function is a subset of the nodes . Function return “ next ”（ Maybe the same one ） node . At least one of these nodes must be a final state . When the final state is reached , State machine stop .
Contains a set of state sets （states）, A starting state （start state）, A set of input symbols （alphabet）, A conversion function that maps input symbols and the current state to the next state （transition function） Calculation model of . When inputting a string of symbols , The model then enters the initial state . It's going to change to a new state , Dependent on conversion function . In a finite state machine , There will be many variables , for example , state The machine has a lot of movement （actions） transformation (Mealy machine ) Or state （ Moore machine ） Associated actions , Multiple initial states , Conversion based on no input symbol , Or specify the symbol and status （ Not necessarily Limited state ） Multiple transformations for , Assign to receive state （ Recognizer ） One or more states of , wait .