← IGCSE Computer Science Paper 1

The CPU checks for interrupts after each cycle

At the end of each fetch-decode-execute cycle the CPU checks for an interrupt signal. If none, it fetches the next instruction; if one, it switches to handling it first.

Understanding The CPU checks for interrupts after each cycle in IGCSE Computer Science Paper 1

What it does: The check comes after the execute step, so the current instruction is always completed before any interrupt is looked at. The interrupt is dealt with first. Only afterwards does the CPU go back to fetching the next instruction of the program. The CPU checks at the end of every cycle. Most of the time there is no interrupt, so it just carries on.

Common mistakes: The CPU only switches to the interrupt service routine when an interrupt IS present. The line should be IF interrupt THEN run ISR. The CPU checks for an interrupt signal at the end of every cycle, so it must not skip the check. The line should be CHECK for interrupt signal.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

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.

Learning
Duo
When does the CPU check whether an interrupt signal has arrived?
Only when the computer is switched offAt the end of each fetch-decode-execute cycle
Matches
check for interrupt, then fetch, decode, execute
↓
The interrupt check is placed at the start of the cycle. The CPU checks at the END of each cycle, after the current instruction has been executed.
Applying
Meanings
Term
interrupt check
Meaning
At the end of each fetch-decode-execute cycle the CPU checks for an interrupt signal. If none, it fetches the next instruction; if one, it switches to handling it first.
Practice
WHILE computer_is_on DO
Testing
Gaps
interrupt = TRUE THEN
Check Answer
Spots
3 DECODE and EXECUTE
4 IF no interrupt THEN run ISR

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Hermit Crab' badge — Definition Collector, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. When does the CPU check whether an interrupt signal has arrived?
A. Only when the computer is switched off
B. At the end of each fetch-decode-execute cycle ✓
The CPU checks for an interrupt after every fetch-decode-execute cycle, so it can respond quickly to events.
2. The CPU is halfway through executing an instruction when an interrupt signal arrives. What happens?
A. The CPU finishes the current instruction, then checks and handles the interrupt ✓
B. The CPU stops mid-instruction and handles the interrupt straight away
The check happens after the current instruction finishes, so no instruction is left half done.
3. At the end of a cycle the CPU finds NO interrupt signal. What does it do next?
A. It fetches the next instruction and carries on as normal ✓
B. It stops and waits until an interrupt arrives
No interrupt means the CPU carries on with the next fetch-decode-execute cycle as normal.
4. At the end of a cycle the CPU finds an interrupt signal. What does it do before fetching the next program instruction?
A. It switches to handling the interrupt ✓
B. It ignores the interrupt and fetches the next instruction
If an interrupt is present, the CPU deals with it before it fetches the next instruction of the program.
5. Which statement about the interrupt check is correct?
A. It is only done when the user presses a key
B. It is done once every cycle, whether or not an interrupt has occurred ✓
The CPU checks at the end of every cycle. Most of the time there is no interrupt, so it just carries on.

Match the Pairs

IF interrupt_signal = TRUE THEN → At the end of a cycle, the CPU checks whether an interrupt has arrived and, if it has, switches to handling it
ELSE fetch next instruction → No interrupt is present, so the CPU carries on as normal with the next fetch-decode-execute cycle
The CPU only checks for an interrupt after the current instruction has finished, at the end of the cycle → fetch, decode, execute, THEN check interrupt
If an interrupt is found during the check, the CPU switches to handling it before fetching the next instruction → IF interrupt found THEN handle interrupt BEFORE next fetch
check for interrupt, then fetch, decode, execute → The interrupt check is placed at the start of the cycle. The CPU checks at the END of each cycle, after the current instruction has been executed.
No interrupt found, so the CPU stops and waits → If there is no interrupt, the CPU does not stop. It carries on as normal and fetches the next instruction.

Key Term

interrupt check
At the end of each fetch-decode-execute cycle the CPU checks for an interrupt signal. If none, it fetches the next instruction; if one, it switches to handling it first.

Fill in the Blanks

1. execute() IF interrupt = TRUE THEN handle_interrupt()
Hint: Type the keyword that makes the CPU test a condition after the instruction has finished executing.
2. execute() IF interrupt = TRUE THEN handle_interrupt()
Hint: Type the Boolean value that means an interrupt signal has arrived.
3. IF interrupt = FALSE THEN fetch_next_instruction() ENDIF
Hint: Type the Boolean value for when no interrupt signal is present, so the CPU carries on as normal.
4. decode() execute() check_interrupt()
Hint: Type the name of the step the CPU performs at the end of each cycle to look for an interrupt signal.
5. IF interrupt THEN handle() ELSE fetch()
Hint: Type the keyword that starts the other branch, which runs when no interrupt was found and the CPU carries on.

Spot the Error

Question 1
A REPEAT
B FETCH instruction
C DECODE and EXECUTE
D IF no interrupt THEN run ISR
E UNTIL power off
Line D — The CPU only switches to the interrupt service routine when an interrupt IS present. The line should be IF interrupt THEN run ISR.
Question 2
A FINISH current instruction
B SKIP the interrupt check
C IF none THEN FETCH next
Line B — The CPU checks for an interrupt signal at the end of every cycle, so it must not skip the check. The line should be CHECK for interrupt signal.
Question 3
A Interrupt signal arrives
B CPU finishes the instruction
C CPU ignores the signal
Line C — After the current instruction has finished, the CPU checks the interrupt signal and does not ignore it. The line should be CPU then checks the signal.
Question 4
A IF no interrupt THEN
B FETCH next instruction
C ELSE ignore the interrupt
D ENDIF
Line C — If an interrupt is present, the CPU switches to handling it before fetching the next instruction. It does not ignore it. The line should be ELSE handle the interrupt.
Question 5
A AT END OF the whole program
B CHECK interrupt signal
C IF none THEN carry on
Line A — The interrupt check happens at the end of each fetch-decode-execute cycle, not only when the whole program ends. The line should be AT END OF each cycle.

Student with a class code? Join your class →