The following table shows part of the instruction set for a processor. The processor has one general purpose register, the Accumulator (ACC), and an Index Register (IX). [Table: Instruction (Opcode, Operand, Explanation)] <address> can be an absolute or symbolic address # denotes a denary number, e.g. #123 B denotes a binary number, e.g. B01001101 The following table shows another part of the instruction set for the processor. [Table: Instruction (Opcode, Operand, Explanation)] The contents of memory addresses 50 and 51 are shown: [Table: Memory address, Data value (50: 01001101, 51: 10001111)]
- (a)Trace the program currently in memory using the trace table, stopping when line 90 is executed for a second time. [Table of program instructions and memory contents for trace table][5]
- (b)(i)The current contents of the ACC are: 0 1 0 1 0 0 1 1 Show the contents of the ACC after the execution of the following instruction. XOR B00011111[1]
- (b)(ii)The current contents of the ACC are: 0 1 0 1 0 0 1 1 Show the contents of the ACC after the execution of the following instruction. AND 50[1]
- (b)(iii)The current contents of the ACC are: 0 1 0 1 0 0 1 1 Show the contents of the ACC after the execution of the following instruction. LSL #3[1]
- (b)(iv)The current contents of the ACC are: 0 1 0 1 0 0 1 1 Show the contents of the ACC after the execution of the following instruction. OR 51[1]
- (c)Write the register transfer notation for each of the stages in the fetch-execute cycle described in the table. [Table: Description, Register transfer notation][3]
Mark scheme
Marking points from the official mark scheme (Oct/Nov 2022). The mark or mark type is shown in brackets.
- [1] For ACC=0, IX=1 (after 76)
- [1] For ACC=2, 101=2 (after 85)
- [1] For ACC=0, ACC=1, 100=1, IX=1 (after 89 - first loop iteration complete)
- [1] For IX=4 (after 76 - second loop, first instruction)
- [1] For ACC=6, 101=6 (after 82)
- [1] For ACC=1, ACC=2, 100=2, IX=2 (after 89 - second loop iteration complete, stop after 90)
- [1] 0100 1100
- [1] 0100 0001
- [1] 1001 1000
- [1] 1101 1111
- [1] MAR ← [PC]
- [1] PC ← [PC] + 1
- [1] CIR ← [MDR]
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →