Interrupt handling step by step
The ordered steps: an interrupt is generated, the CPU finishes its cycle and detects it, saves its state, runs the ISR, restores its state, then resumes the original task.
Understanding Interrupt handling step by step in IGCSE Computer Science Paper 1
What it does: The ordered sequence is the same for any interrupt, including a key press: generate, detect, save, run the ISR, restore, resume. The CPU checks for interrupts at the end of each cycle, so the current instruction is completed first. The state (registers and program counter) must be saved BEFORE the ISR runs, or the original task's progress would be lost when the ISR overwrites the registers. Order: key pressed (generated), CPU finishes cycle and detects, saves state, runs the keyboard ISR, restores state, resumes. Resuming comes last.
Common mistakes: The CPU must finish the current fetch-decode-execute cycle before it detects the interrupt. It does not abandon the cycle. The line should be 'CPU finishes the current cycle'. After the keyboard sends the interrupt, the CPU first finishes its cycle and detects the interrupt. Restoring the state happens after the ISR has run. The line should be 'CPU finishes cycle, detects it'.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 409–418) and word search (Modules 390–418).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
interrupt handling sequenceFill in the Blanks
Spot the Error
Student with a class code? Join your class →