Description:
As a Circuit:
- As output does depend on input with the state the input arrive, output combinational logic need to include input and the state
As a Table:
| Next - | - state/out |
---|
Current state (S) | In = 0 | In = 1 |
Init | Init / 0 | Got1 / 0 |
Got1 | Init / 0 | Got11 / 0 |
Got11 | Init / 0 | Got11 / 1 |
- Convert the state names from table above into binary
- Where Q1 and Q0 are binary for the states
- Let D1 and D0 be the Flip-flop for the state
- State encoding:
| Q1Q0 | Q1Q0 |
---|
Q1Q0 | In = 0 | In = 1 |
00 | 00/0 | 01/0 |
01 | 00/0 | 10/0 |
10 | 00/0 | 10/1 |
- We can use the the state bits to encode state, let left bit of each state be D0 and the next left be D1
- Then we have the truth table for each state bit
- ex: for D0, we take the red bits of Q0
- D0=In.Q1’.Q0’ using Karnaughmap
In \ Q1Q0 | 00 | 01 | 11 | 10 |
---|
0 | 0 | 0 | x | 0 |
1 | 1 | 0 | x | 0 |
- For D1, we take the green bits
In\Q1Q0 | 00 | 01 | 11 | 10 |
---|
0 | 0 | 0 | x | 0 |
1 | 0 | 1 | x | 1 |
- Out = In.Q1 + In.Q0 as output only depends on state???
- Output is from state and input, Out = In.Q1