9618/13/M/J/22 question 2: worked solution (May/June 2022, paper 13)

Show as 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. Q3 9618/13/M/J/22 original Q2 Structured · 8 marks Worked solution (a) Step Description PC ← [PC] + 1 The address in the PC is incremented MDR ← [[MAR]] The data at the address held in MAR is copied to the MDR MAR ← [PC] The contents of the PC are copied to the MAR PC ← [PC] + 1: the address in the Program Counter is incremented [1] MDR ← [[MAR]]: the data at the address held in MAR is copied to the MDR [1] MAR ← [PC]: the contents of the PC are copied to the MAR [1] (b) Write five of these points in order: The CPU checks for an interrupt at the start or end of each F-E cycle [1] The priority of the interrupt is checked; if lower than the current process, carry on with the cycle [1] If higher, the state of the current process (registers) is stored on the stack [1] The type or location of the interrupt is identified [1] The correct interrupt service routine (ISR) is called to handle it [1] When the ISR has finished, check for further interrupts or go back to the start of the cycle; otherwise load the stored data from the stack and continue the process. Any five of the six points score. KEY IDEA After each F-E cycle the CPU checks interrupts, saves its state to the stack for a higher priority one, runs the ISR, then restores the state. TOTAL 8 marks Official mark scheme VIDEO ▶ Whole paper Video solution of the whole paper · by A Levels Academy Islamabad. Tap the picture to open it on YouTube.