Vending machine example -- Part I

The problem is to design a Nabs dispenser. The Nabs machine has two inputs, x and y, which encode the following information:

        x  y    Meaning
        0  0    nothing is happening
        0  1    nickel inserted
        0  1    dime inserted
        1  1    Nabs button pushed

There is a single output, z. When z is 0, the machine produces nothing. When z is 1, the machine outputs a package of Nabs.

Assume that Nabs cost 15 cents. Nabs are returned only if the Nabs button is pushed after 15 cents are deposited. Assume that this %!@%$# machine returns no change and just keeps any money you deposit over 15 cents.

Draw the finite state machine for the Nabs dispenser below.

Back to the Handout index