A vending machine sells a variety of snacks for $0.65; it only accepts dollars.
ID: 2084802 • Letter: A
Question
A vending machine sells a variety of snacks for $0.65; it only accepts dollars. It provides $0.35 in change
in nickels, dimes and quarters, using the smallest number of coins possible. The change controller takes inputs from a quarter counter (1 bit), dime counter (2bits), and nickel counter (3bits). It outputs the number of quarters (1bit), dimes (2bits) and nickels (3bits) to be dispensed, or asserts “no change” (1bit) if the machine is unable to make exact change.
Design a circuit that implements the change controller using SOP form. Be sure to show truth tables, K maps, and reduced equations.
Explanation / Answer
The input output relations of minimum coin dispensing will be as below. THe toal number of coins should be minimum and the sum of the coin values should be 0.35$
INPUT
OUTPUT
Quarter
Q0
Nickel
N1 N0
Dime
D2 D1 D0
Quarter
q0
Nickel
n1 n2
Dime
d2 d1 d0
NC
nc0
0
0
0-6
0
0
0
1
0
0
7
0
0
7
0
0
1
0-4
0
0
0
1
0
1
5-7
0
1
5
0
0
2
0-2
0
0
0
1
0
2
3-7
0
2
3
0
0
3
0
0
0
0
1
0
3
1-7
0
3
1
0
1
0
0-1
0
0
0
1
1
0
2-7
1
0
2
0
1
1,2,3
0-7
0-7
1
1
0
Truth Table
Solving the above truthtable we get the SOP expression for each variable as
Here A is the 1bit input for Quarter count
B C -> is the 2 bit input for nickel count
D E F-> is the 3bit input for dime count
INPUT
OUTPUT
Quarter
Q0
Nickel
N1 N0
Dime
D2 D1 D0
Quarter
q0
Nickel
n1 n2
Dime
d2 d1 d0
NC
nc0
0
0
0-6
0
0
0
1
0
0
7
0
0
7
0
0
1
0-4
0
0
0
1
0
1
5-7
0
1
5
0
0
2
0-2
0
0
0
1
0
2
3-7
0
2
3
0
0
3
0
0
0
0
1
0
3
1-7
0
3
1
0
1
0
0-1
0
0
0
1
1
0
2-7
1
0
2
0
1
1,2,3
0-7
0-7
1
1
0
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.