Someone puts raptor tokens and then presses the start button
Design the necessary circuit to implement the LED as specified in the figure. Since we only have 6 fidgets to display, and you have decided to use binary numbers to represent values internally, three inputs will suffice. For consistency, please call the inputs X,Y, and Z (with Z representing the rightmost bit in the binary representation of the fidget). Use inputs to set these values. Since 3 inputs yields 8 possible fidgets (and the values 6 and 7 as inputs have no meaning), your circuit should display the Foobarian symbol for error (see figure) when those binary values are input into your circuit. In particular, this implies that you do not have “don’t care” conditions. Your circuit should have an output for each segment of the LED. You should end up with one large circuit that correctly "lights up" the LED when given the fidget value. You should arrange your outputs as the actual FBCP LED display. Unfortunately, the simulator does not have bar-shaped LEDs so you will have to use the output pins arranged in an approximate pattern.
Be VERY careful to get the correct function for your inputs before simplifying and designing
The various services available cost the following:
• wash only: 1Trex token OR 2 Raptor tokens
A B Description
0 0 Nothing is happening
If more tokens are inserted than are necessary, the car wash will NOT give back the extras (so, for example, if someone puts in 5 Raptor tokens and then presses the START button, this person will receive a wash, wax and dry, but won't get back the additional token). Since we only have 2 inputs (that recognize Raptor and Trex tokens), no other tokens are recognized.
Design this using D flip-flops. You’ll need to track of the total amount of units entered into the machine. There can be anywhere from 0-4 units entered (anything more than 4 doesn’t matter, since you can’t get change). So you’ll need to store a 3-bit number potentially. That means 3 flip-flops D4, D2, D1. Their values along with that of A and B give their new values. Some examples:
Old state: A=1, B=1, D4=0, D2=1, D1=1 (start button pressed with 3 units in machine)
New state: D4=D2=D1=0 (money taken), W=1, X=1, D=0 (user gets a wash&wax)