9618/11/M/J/22 question 6: worked solution (May/June 2022, paper 11)
Show as plain textHide plain text
Cambridge AS Level Computer Science 9618 · 4.1 Central Processing Unit (CPU) Architecture Worked solution from the Processor Fundamentals Paper 1 Theory Fundamentals booklet, Part 1 of 3. Q2 9618/11/M/J/22 original Q6 Structured · 15 marks Worked solution (a)(i) Write five of these points: The Program Counter (PC) holds the address of the next instruction [1] The PC is incremented (changed to the next address) each cycle [1] The Memory Address Register (MAR) holds the address to be fetched, copied from the PC [1] The Memory Data Register (MDR) holds the data found at the address in MAR [1] The instruction is copied to the Current Instruction Register (CIR) for decoding and execution [1] (a)(ii) Detected: interrupts are checked for at the start or end of each F-E cycle [1] Handled (up to 4 of these): The priority of the interrupt is checked. If it is lower than the current process, carry on with the F-E cycle [1] If it is higher, the state of the current process (the registers) is stored on the stack [1] The type or location of the interrupt is identified and the correct interrupt service routine (ISR) is called [1] When the ISR has finished, check for further interrupts [1] Then the stored data is loaded back from the stack and the process continues. Any four of the handling points above score (the stored data loaded back from the stack, so the process continues, can replace one of them). (b) Give one factor and its impact. For example: Factor: clock speed [1] Impact: a higher clock speed means more F-E cycles per second [1] Other pairs also score: number of cores (more instructions at the same time), bus width (more data or more memory locations each time), cache size (more frequently used instructions held for fast access). (c)(i) AND #2 uses 00000010, so only bit 1 can stay. Bit 1 of 01101101 is 0. 00000000 [1] (c)(ii) OR #8 uses 00001000. Bit 3 of 01101101 is already 1. 01101101 [1] (c)(iii) Shift 4 places left and fill the right with zeros: 01101101 → 11010000. 11010000 [1] KEY IDEA Interrupts are checked at the end of each F-E cycle, and a higher priority interrupt makes the CPU save its state on the stack before running the ISR. TOTAL 15 marks Official mark scheme VIDEO ▶ Whole paper Video solution of the whole paper · by qiphyedu. Tap the picture to open it on YouTube.