n flip-flops can hold 2ⁿ patterns. A machine with N states uses only N of them, so 2ⁿ − N codes are unused.
- A BCD counter uses 4 flip-flops for 10 states:
1010to1111are unused. - A 5-state finite state machine with binary encoding uses 3 flip-flops: 3 of the 8 codes are unused.
Unused states matter twice in a design:
- They make the logic smaller. In normal operation the machine never sits in an unused code, so its next state doesn't matter. Mark those rows as don't-cares and the K-maps can make bigger groups.
- They can still happen. At power-up, or after electrical noise, the flip-flops may land in any pattern. Once the equations are chosen, every don't-care has become a real 0 or 1, so every unused code now goes somewhere. Check where.
If every unused code leads back into the main sequence, the design is self-starting. If some unused code loops among unused codes forever, it has a lock up state.