There are 4 fsm encoding types:
- Binary encoding - states are represented in binary code: 0000, 0001, 0010, 0011, etc. Less flip-flops then in the One hot/cold style, more gates (the cause is the to decode binary states) then in the One hot/cold style. Less performance than in One hot/cold.
- Gray encoding - states are represented in Gray code: 0000, 0001, 0011, 0010, .. . Each state is different from another only by a single bit. This gives several advantages: lower power consumption (less switching), and makes the FSM asynchronous outputs resilient to glitches. But the cost is in increased gate usage. But in practice I rarely see a FSM with asynchronous outputs. And in most of cases we have been targeting low power consumption as well as performance so we used other ways to reach it.
- One Hot - one bit is high, the rest are low: 0001, 0010, 0100, 1000. N states - N of flipflops, but less gate utilization and higher performance than with binary encoding because of not needing any combinational logic for the state decoding. Practically, I've never seen a FSM where for One-hot state encoding needed significantly more bits then the binary encoding.
- One Cold - the one bit is low, the rest are high: 1110, 1101, 1011, 0111. Actually the same as the One-hot. But I never used it and never saw the usage of it. I think that this coding style may be fabric-dependent. For example if in a ASIC design library the best performance reachs by using an active low level.
In most cases the One-hot encoding is used. And I think this is the best way in almost all designs.