Vending machine example -- Part II

The state table

```        x  y  A  B     z  A  B     JA KA JB KB
0  0  0  0     0  0  0      0  x  0  x
0  0  0  1     0  0  1      0  x  x  0
0  0  1  0     0  1  0      x  0  0  x
0  0  1  1     0  1  1      x  0  x  0
0  1  0  0     0  0  1      0  x  1  x
0  1  0  1     0  1  0      1  x  x  1
0  1  1  0     0  1  1      x  0  1  x
0  1  1  1     0  1  1      x  0  x  0
1  0  0  0     0  1  0      1  x  0  x
1  0  0  1     0  1  1      1  x  x  0
1  0  1  0     0  1  1      x  0  1  x
1  0  1  1     0  1  1      x  0  x  0
1  1  0  0     0  0  0      0  x  0  x
1  1  0  1     0  0  1      0  x  x  0
1  1  1  0     0  1  0      x  0  0  x
1  1  1  1     1  0  0      x  1  x  1
```

The Equations

• z = Sigma(15)
• z = x y A B
• DA = Sigma(2, 3, 5, 6, 7, 8, 9, 10, 11, 14)
• DA = x' A + x' y B + x y' + A B'
• DB = Sigma(1, 3, 4, 6, 7, 9, 10, 11,13)
• DB = x' y B' + x' A B + x y' A + x A' B + y' B
• JA = Sigma(5, 8, 9)
• JA = d(2, 3, 6, 7, 10, 11, 14, 15)
• JA = x y' + x' y B
• KA = Sigma(15)
• KA = d(0, 1, 4, 5, 8, 9, 12, 13)
• KA = x y B
• JB = Sigma(4, 6, 10)
• JB = d(1, 3, 5, 7, 9, 11, 13, 15)
• JB = x' y + x y' A
• KB = Sigma(5, 15)
• KB = d(0, 2, 4, 6, 8, 10, 12, 14)
• KB = x' y A' + x y A

Implementation with D flip-flops

Press here to retrieve a copy.

Implementation with JK flip-flops

Press here to retrieve a copy.