| Finite state machines: implementing | |||||||||||||||
|
|||||||||||||||
| State: 2 bits (q1q0) | |||||||||||||||
| 2 flip-flops to store | |||||||||||||||
| Input: 1 bit (x) | |||||||||||||||
| Output: 2 bits (z1z0) | |||||||||||||||
| Step 1: State transition table | |||||||||||||||
| Start with state and input | q1 | q0 | x | ||||||||||||
| Each row represents a state and a possible input value | 0 | 0 | 0 | ||||||||||||
| States before inputs: | 0 | 0 | 1 | ||||||||||||
| Look at every possible input for each state | 0 | 1 | 0 | ||||||||||||
| 0 | 1 | 1 | |||||||||||||
| 1 | 0 | 0 | |||||||||||||
| 1 | 0 | 1 | |||||||||||||
| 1 | 1 | 0 | |||||||||||||
| 1 | 1 | 1 | |||||||||||||