I want to design a combinational circuit for a vending machine, that delivers 2 items, tea( 2$) and water(1$). The machine accepts up to 3 dollars.
# I draw the truth table with 3 inputs(dollars) and 2 outputs(tea & water).
d1 d2 d3 : t w
-----------------
0 0 0 : 0 0
0 0 1 : 0 1
0 1 0 : 0 1
0 1 1 : 1 0
1 0 0 : 0 1
1 0 1 : 1 0
1 1 0 : 1 0
1 1 1 : 1 1
Is there a better way to draw the truth table?
Your initial truth table does not represent the vending machine fully. Consider, for example, that a customer depositing $2 should be allowed to buy one tea or two waters. Consider also that the machine should be forgiving of over depositing for a given purchasing request.
Definitions:
Inputs
Outputs
Truth Table
The following truth table captures