PS | NS | NS | NS | release candy | return all coins | return change |
0 | 0 if (coin = 0) and (return = 0) | 1 if (coin=1) and (return = 0) | 5 if (coin= 0) and (return= 1) | 0 | 0 | 0 |
1 | 0 if sum < 75 | 2 if sum=75 | 3 if sum>75 | 0 | 0 | 0 |
2 | 0 | - | - | 1 | 0 | 0 |
3 | 4 if change available = 1 | 5 if change available = 0 | - | 0 | 0 | 0 |
4 | 2 | - | - | 0 | 0 | 1 |
5 | 0 | - | - | 0 | 1 | 0 |
Continue: select a new input value and simulate (clicking simulate applies the CLOCK signal, unshown).
Reference: M. Ercegovac, T. Lang, and J.H. Moreno, Introduction to Digital Systems, Wiley, 1998.