209k views
0 votes
As a talented grad of CMPEN 270, your new job as a digital designer is to design a "greedy" vending machine that accepts only nickels, dimes, and quarters. It is "greedy" because it does not give back any change! There is only one type of snack inside the vending machine which sells for 20 cents. To simplify the problem, assume only one coin is accepted at a time and generates the following inputs (XY) to the state machine. (USE T-Flip Flops ONLY)

Condition XY
No coins were put in the vending machine 00
One nickel was put in the vending machine 01
One dime was put in the vending machine 10
One quarter was put in the vending machine 11

User Locoboy
by
5.6k points

1 Answer

3 votes

Answer:

See explaination

Step-by-step explanation:

In the below answer "Z" is the output. please kindly check attachment for further details.

When z=1 , the vending machine gives snacks

z=0 , the vending machine doesn't give snacks.

And z becomes 1( high) only when the machine gets 20 cents or more than 20 cents. Since the machine doesn't give change, after giving snacks it will restart from initial state A (where no coins were put).

As a talented grad of CMPEN 270, your new job as a digital designer is to design a-example-1
As a talented grad of CMPEN 270, your new job as a digital designer is to design a-example-2
As a talented grad of CMPEN 270, your new job as a digital designer is to design a-example-3
As a talented grad of CMPEN 270, your new job as a digital designer is to design a-example-4
As a talented grad of CMPEN 270, your new job as a digital designer is to design a-example-5
User Srowland
by
5.1k points