Question 3

OCR Computer Science June 2016 Paper 1AS6 marks

On the specification

(a)
1.2 Software and software development
(b)
1.2 Software and software development
Question text

3 A burglar alarm runs on a processor with the Little Man Computer (LMC) instruction set. One of the instructions in the set is Branch if Positive (BRP). (a) Describe what the instruction BRP does. [2] A numeric PIN code entered into the burglar alarm is compared with the code stored at the memory location passcode. If the codes match, the program jumps to the part of the program labelled deactivate. If the codes do not match, the program jumps to the part of the program labelled alarm. (b) Write the LMC code to meet the requirements above. (You don’t have to write the code for labels deactivate and alarm, as you can assume this has already been written elsewhere.) [4]