One-hot encoding
Encode n states using n flip-flops
- Assign a single 1 for each state
- Example: 0001, 0010, 0100, 1000
- Propagate a single 1 from one flip-flop to the next
- All other flip-flop outputs are 0
Draw FSM directly from the state diagram
- Each state function needs only predecessor states' bits as input
- One product term per incoming arc
- Disadvantage: Complex state diagram ? complex design
Large machines require many flip-flops
- Decompose design into smaller pieces that can be one-hot encoded
- n+m states for two machines versus nŚm states for one