State Diagram (Price: 15¢)
Moore Machine Outputs
Each state represents the accumulated amount. The machine only
dispenses when reaching S15 (15¢ or more). Overpayment returns change.
Inputs: N = Nickel (5¢), D = Dime (10¢)
Inputs: N = Nickel (5¢), D = Dime (10¢)
Vending Machine
Refreshing Soda
15¢
$0.00
Insert Coin
Change Return
—
Current State
S0 (0¢) — Waiting for coins. Need 15¢ total.
| State | Amount | +5¢ | +10¢ |
|---|---|---|---|
| S0 | 0¢ | S5 | S10 |
| S5 | 5¢ | S10 | S15 |
| S10 | 10¢ | S15 | S15 |
| S15 | 15¢+ | DISPENSE → S0 | |