Question 9(a) 2014 · May-June · Paper 12 · 1 mark
Reveal official mark-scheme answer
Official answer for Question 9
Part (a)
Part (a)
Question 1
Question 1
Question 1
Show text version of question
Question 9
Part (a)
Question 9
A vending machine dispenses drinks and has a number of drinks options.
drink option with code
tea black 10 + milk 11 + sugar 12 + milk + sugar 13
coffee black 20 + milk 21 + sugar 22 + milk + sugar 23
cappuccino normal 30 + extra milk 31 + sugar 32 + extra milk + sugar 33
chocolate normal 40 + extra milk 41 + sugar 42 + extra milk + sugar 43
cold drinks coke 50 orange 51 lemon 52 mango 53
water normal 60 cold 61 cold fizzy 62 hot 63
The vending machine is controlled by a microprocessor.
If a customer keys in 23 then they will receive a cup of coffee with milk and sugar.
So, 23 will be stored as 0 0 1 0 1 1 1
If an invalid code is keyed in, an error message is displayed.
Part (a)
A customer selects a lemon drink.
Show how the code for this selection is stored in the 7-bit register:
Why this question appears here
71% assigned-topic match · Programming › Constructs
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9691_s14_qp_12.pdf
