You are on page 1of 1

Assignment-6

The objective of this assignment is to design a coffee vending machine. Coffee costs ten rupees and is
dispensed by inserting two five rupee coins or one ten rupee coin. In case a ten rupee coin follows a five
rupee coin the machine dispenses a cup of coffee and returns a five rupee change. The machine can accept
only one coin at a time. The coffee machine has 2 outputs (a) YD with YD=1 meaning coffee is dispensed
and (b) YC with YC=1 meaning a 5 rupee coin change is returned back. Design a coffee vending state
machine with input A denoting the value of the input coin which may be five (A=0) or ten (A=1) rupee and
outputs YD and YC. For example an input sequence A=000 will give an output sequence YD=010 and
YC=000 after initial (reset) state.

(1) Design the coffee vending machine as a Moore machine with least number of states. Draw the
state-diagram.
(2) Write the state encoding table, the state transition table and the output table.
(3) Draw the circuit
(4) Draw the state-diagram for a Mealy machine implementation.

Deadline: Submit on Friday 23rd Feb tutorial class.

You might also like