stateencoding
State encoding is the method used to represent the finite set of states in a finite state machine (FSM) with binary vectors or bit patterns. It is a key consideration in digital design, simulation, and modeling, because the chosen encoding affects hardware resources, timing, and power consumption as the machine transitions between states.
Common state encoding schemes include binary encoding, one-hot encoding, Gray code, and variants such as Johnson
The encoding choice influences synthesis results, including gate count, critical path, and dynamic power from state
Example: with four states, binary encoding uses two bits (00, 01, 10, 11); one-hot encoding uses four