
A state machine is a model used to describe the behavior of a real-world system. State machines are used to solve a large number of problems. They are used to model the behavior of various types of devices, such as electronic control devices, programs that parse communication protocols, and programs that perform text or pattern searches.
State machines may be described using a state diagram and a state table. A state diagram is composed of states, inputs, outputs, and transitions between states. A state table describes a state machine with the present state and input on the left, and the next state and output on the right.
State machines may be implemented using either a hardware architecture or a software architecture. The advantage of a hardware implementation is that it operates very fast, but it is difficult to modify and usually requires more circuit board space. The advantage of a software implementation is that it is easier to design and modify, but can be slower than the hardware equivalent.

Mark Strain has over 25 years’ experience in designing and developing embedded systems ranging from precise time and frequency standards, remote monitoring systems, cryptographic communications equipment, and advanced weapon systems for the warfighter. He has designed and developed systems with 8-bit microcontrollers in bare metal systems and systems with complex real time embedded operating systems on 32-bit microprocessors. He is currently a Software Engineering Manager for a large defense contractor. He has a Bachelor of Science degree in Electrical Engineering from the University of Central Florida and a Master of Science degree in Electrical Engineering from the University of South Florida. He is a registered Professional Engineer in the State of Florida. He has written many courses for Professional Engineers for continuing education in the areas of computer engineering and electrical engineering. He enjoys studying cosmology and is a published author of Cosmic Entity: A Timeless Perception of the Universe. He lives in Winter Garden, FL with his wife and two children.