← IGCSE Computer Science Paper 1

How an interrupt is generated

A signal sent to the CPU by a device (hardware) or a running program (software) when an event, such as a key press, needs the CPU's attention.

Understanding How an interrupt is generated in IGCSE Computer Science Paper 1

What it does: A divide by zero error occurs inside a running program, so the software sends an interrupt signal to the CPU. An interrupt is generated when an event happens that needs attention, and a signal is then sent to the CPU. The keyboard is a hardware device, so a key press makes it send an interrupt signal to the CPU.

Common mistakes: An interrupt signal is sent to the CPU, not to the printer. The line should be SEND interrupt TO CPU. The running program reports its error by sending the interrupt signal to the CPU. The mouse does not receive it. It should be SEND interrupt TO CPU.

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
What starts the process of generating an interrupt?
An event happens that needs the CPU's attentionThe CPU deletes the running program
Matches
CPU -> interrupt signal -> keyboard
↓
The direction is wrong: the device sends the interrupt signal to the CPU, not the CPU to the device.
Applying
Meanings
Term
interrupt signal
Meaning
A signal sent to the CPU by a device (hardware) or a running program (software) when an event, such as a key press, needs the CPU's attention.
Practice
source ← "keyboard"
Testing
Gaps
SEND TO CPU
Check Answer
Spots
2 keyboard creates signal
3 SEND interrupt TO printer

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

The 'Gulper Eel' badge — Deep Streak, 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. What starts the process of generating an interrupt?
A. An event happens that needs the CPU's attention ✓
B. The CPU deletes the running program
An interrupt is generated when an event happens that needs attention, and a signal is then sent to the CPU.
2. Which is the interrupt signal sent to?
A. The monitor
B. The CPU ✓
The interrupt signal is sent to the CPU, which decides how to respond to the event.
3. A key is pressed on the keyboard. Which source generates the interrupt?
A. Software (a running program)
B. Hardware (the keyboard) ✓
A key press is an event from a hardware device, so the keyboard sends a hardware interrupt signal to the CPU.
4. A running program tries to divide a number by zero. Which source generates the interrupt?
A. Software (the running program) ✓
B. Hardware (the keyboard)
A runtime error such as divide by zero is an event in a running program, so it generates a software interrupt.
5. Worked example: a key is pressed. What is the correct order of the first two steps?
A. Key is pressed, then the keyboard sends an interrupt signal to the CPU ✓
B. The keyboard sends an interrupt signal to the CPU, then the key is pressed
The event (the key press) happens first. The interrupt signal is sent as a result of the event.

Match the Pairs

interrupt signal → A signal sent to the CPU by a device or a running program to report an event that needs attention
keyboard sends signal → A hardware source generates an interrupt when a key is pressed
A running program is a software source that can generate an interrupt when an error happens → divide by zero error -> interrupt signal
The order of events when a key is pressed: event, signal, then the CPU is told → key pressed -> signal -> CPU
CPU -> interrupt signal -> keyboard → The direction is wrong: the device sends the interrupt signal to the CPU, not the CPU to the device.
interrupt signal sent before the key is pressed → An interrupt is only generated after an event happens, so the signal cannot be sent before the key press.

Key Term

interrupt signal
A signal sent to the CPU by a device (hardware) or a running program (software) when an event, such as a key press, needs the CPU's attention.

Fill in the Blanks

1. event ← "key press" SEND interrupt signal TO CPU
Hint: Type the two-word name for what a device sends to the CPU to report an event.
2. IF event = "key press" THEN SEND interrupt signal TO CPU ENDIF
Hint: Type the abbreviation for the part of the computer that receives the interrupt signal.
3. device ← keyboard source ← HARDWARE
Hint: Type the kind of source a physical device like the keyboard is.
4. IF divisor = 0 THEN source ← SOFTWARE ENDIF
Hint: Type the kind of source when a running program causes the event.
5. IF event = "key press" THEN SEND interrupt signal TO CPU ENDIF
Hint: Type the keyword that checks whether the event has happened before the signal is sent.

Spot the Error

Question 1
A IF key is pressed THEN
B keyboard creates signal
C SEND interrupt TO printer
D ENDIF
Line C — An interrupt signal is sent to the CPU, not to the printer. The line should be SEND interrupt TO CPU.
Question 2
A result <- 10 / 0
B error <- TRUE
C source <- 'software'
D SEND interrupt TO the mouse
Line D — The running program reports its error by sending the interrupt signal to the CPU. The mouse does not receive it. It should be SEND interrupt TO CPU.
Question 3
A type <- 'software'
B source <- 'mouse'
C event <- 'button clicked'
D SEND interrupt TO CPU
Line A — A mouse is a hardware device, so the interrupt it generates is a hardware interrupt. It should be type <- 'hardware'.
Question 4
A EVENT: user presses a key
B keyboard detects the key
C SEND interrupt signal TO CPU
D CPU never learns of the event
Line D — The interrupt signal exists to tell the CPU about the event so it can give it attention. The CPU is alerted, not left unaware.
Question 5
A user presses a key
B keyboard creates a signal
C signal is sent to the screen
D CPU may now handle the key
Line C — The interrupt signal from the keyboard goes to the CPU, not to the screen. It should be signal travels to the CPU.

Student with a class code? Join your class →