9608_w17_qp_31
A paper of Computer Science, 9608
Questions:
6
Year:
2017
Paper:
3
Variant:
1

Login to start this paper & get access to powerful tools

1
2
3
4
5
6
A large warehouse stores goods that must be kept above a temperature of 15 degrees Celsius. The warehouse has six temperature sensors which are each placed at a different location in the warehouse. A computer system is programmed to turn on appropriate heaters when one of the sensors is below the minimum temperature. State the name given to the type of system described. Justify your answer to part . Sensors and heaters are two types of device used in this system. State two other devices that are used. Justify your choice. Device 1 Justification Device 2 Justification The computer system stores the temperature readings for the six sensors in six 8-bit memory locations. Six of the bits in an 8-bit register, LOWREG, are used to indicate whether a particular reading is below the minimum temperature. A value of 1 means the reading is below the minimum temperature. For example: This pattern of bits in LOWREG shows that sensor 5, sensor 4 and sensor 1 have readings below the minimum temperature. Not used Not used The following table shows part of the instruction set for a processor which has one general purpose register, the Accumulator (ACC), and an Index Register (. Instruction Explanation Op code Operand LDD Direct addressing. Load the contents of the given address to ACC. LDR #n Immediate addressing. Load the number n to IX. LDX Indexed addressing. Form the address from + the contents of the index register. Copy the contents of this calculated address to ACC. STO Store the contents of ACC at the given address. INC Add 1 to the contents of the register (ACC or . ADD Add the contents of the given address to the ACC. OR Bitwise OR operation of the contents of ACC with the contents of address. CMP #n Compare the contents of ACC with number n. CMP Compare the contents of ACC with the contents of . JMP Jump to the given address. JPE Following a compare instruction, jump to if the compare was True. JGE Following a compare instruction, jump to if the content of ACC is greater than or equal to the number used in the compare instruction. The code uses six memory locations to store the temperature readings. It stores readings for sensors 1 to 6 at addresses 8000 to 8005. At a particular time, the memory locations store the following data. Dry run the assembly language code starting at START and finishing when the loop has been processed twice. LOWTEMP LOWREG COUNTER ACC IX B00000000 Explain why the operand of the instruction labelled Q1 has the value 32. The code beginning at the instruction labelled HEATON must make the system turn on the heaters in those areas that are below the minimum temperature. Describe what this code will have to do.