State Machine

A state machine is the "machine inside the machine, inside the machine". A computer is considered the 'outer machine'. Within the computer, is the CPU core, which is the virtual machine that does all the calculations. This core accepts the machine code instructions and executes them. It does NOT directly control the hardware.

Each instruction code may require several steps to actually control the hardware to perform the required function. This is what the state machine does.