← IGCSE Computer Science Paper 1

Classifying an event as a hardware or software interrupt

The origin of the signal. From a device, like a key press or mouse move, it is a hardware interrupt. From a running program, like divide by zero or a memory clash, it is a software interrupt.

Understanding Classifying an event as a hardware or software interrupt in IGCSE Computer Science Paper 1

What it does: The mouse is a hardware peripheral. Any signal that starts from a device is classified as a hardware interrupt. The classification depends on the source of the signal. Use 'because' to link your answer to where the signal came from. Classify by the source of the signal. The program asked for an impossible calculation, so the source is a program, which means a software interrupt.

Common mistakes: The event is a mouse move, which comes from a device. A memory clash comes from a running program, so it does not match the source and type below. It should be "mouse moved". The reason must match the source. A mouse move is a hardware interrupt because it comes from a device, not from a program. It should be "because of a device".

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
A user presses a key on the keyboard while a program is running. What type of interrupt is this?
Software interrupt, because the signal comes from a programHardware interrupt, because the signal comes from a device
Matches
Divide by zero = hardware interrupt, because it happens inside the CPU
↓
Divide by zero is caused by a running program, so it is a software interrupt. Being handled by the CPU does not make it a hardware interrupt.
Applying
Meanings
Term
interrupt source
Meaning
The origin of the signal. From a device, like a key press or mouse move, it is a hardware interrupt. From a running program, like divide by zero or a memory clash, it is a software interrupt.
Practice
Key press = hardware interrupt because it comes from the keyboard
Testing
Gaps
type ← ""
Check Answer
Spots
2source ← "mouse"
3event ← "memory clash"

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

The 'Horned Lizard' badge — Bug Squasher, 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. A user presses a key on the keyboard while a program is running. What type of interrupt is this?
A. Software interrupt, because the signal comes from a program
B. Hardware interrupt, because the signal comes from a device ✓
The keyboard is a hardware device. Its signal tells the CPU a key was pressed, so it is a hardware interrupt.
2. A program tries to calculate 10 / 0 and the CPU cannot continue. What type of interrupt is this?
A. Software interrupt, because the error happens in a running program ✓
B. Hardware interrupt, because the CPU cannot do the sum
Divide by zero is a runtime error caused by the program's own instructions. The signal comes from software, so it is a software interrupt.
3. The user moves the optical mouse across the desk. What type of interrupt is this?
A. Hardware interrupt, because the mouse is a device sending a signal ✓
B. Software interrupt, because the cursor on screen is drawn by software
The source is the mouse, which is a hardware peripheral. The movement signal comes from the device, so it is a hardware interrupt.
4. Two processes try to write to the same memory location at the same time. Which answer correctly classifies and justifies this?
A. Hardware interrupt, because memory is a piece of hardware
B. Software interrupt, because the clash is caused by programs that are running ✓
Although memory is hardware, the clash is caused by two running processes. The signal comes from the programs, so it is a software interrupt.
5. Which sentence gives the best reason for classifying an event as a hardware interrupt?
A. It is a hardware interrupt because the signal comes from a hardware device. ✓
B. It is a hardware interrupt because it happens while the computer is switched on.
The classification depends on the source of the signal. Use 'because' to link your answer to where the signal came from.

Match the Pairs

Pressing the 'A' key on the keyboard → Hardware interrupt, because the signal comes from a hardware device (the keyboard)
result = 10 / 0 → Software interrupt, because the signal comes from a running program causing a runtime error
Moving the mouse sends a signal from a device, so it is a hardware interrupt → source = "mouse" # hardware interrupt
Two processes writing to the same memory location is a software interrupt because a running program causes the clash → write(addr, A) + write(addr, B) # software interrupt
Divide by zero = hardware interrupt, because it happens inside the CPU → Divide by zero is caused by a running program, so it is a software interrupt. Being handled by the CPU does not make it a hardware interrupt.
Pressing a key = software interrupt, because the user typed it in a program → A key press is signalled by the keyboard device, so it is a hardware interrupt. The program that later uses the key does not create the signal.

Key Term

interrupt source
The origin of the signal. From a device, like a key press or mouse move, it is a hardware interrupt. From a running program, like divide by zero or a memory clash, it is a software interrupt.

Fill in the Blanks

1. IF source = "key press" THEN type ← "hardware" ENDIF
Hint: Pressing a key sends a signal from a device. Type the interrupt type this gives.
2. IF source = "divide by zero" THEN type ← "software" ENDIF
Hint: Dividing by zero is an error in a running program. Type the interrupt type this gives.
3. IF source = "mouse move" THEN type ← "hardware" ENDIF
Hint: Type the keyword that starts the code run when the IF condition is true.
4. IF source = "memory clash" THEN type ← "software" ENDIF
Hint: Type the variable name that stores the classification of the interrupt.
5. reason ← "a device sent the signal" OUTPUT "Hardware, because " + reason
Hint: Type the linking word that introduces the justification for the choice.

Spot the Error

Question 1
A event ← "mouse moved"
B source ← "mouse"
C event ← "memory clash"
Line C — The event is a mouse move, which comes from a device. A memory clash comes from a running program, so it does not match the source and type below. It should be "mouse moved".
Question 2
A event ← "mouse moved"
B source ← "mouse"
C type ← "hardware"
D why ← "because of a program"
Line D — The reason must match the source. A mouse move is a hardware interrupt because it comes from a device, not from a program. It should be "because of a device".
Question 3
A event ← "divide by zero"
B source ← "keyboard"
C type ← "software"
Line B — Divide by zero is an error caused by a running program, not by a keyboard. The source should be "running program", which makes it a software interrupt.
Question 4
A event ← "key pressed"
B source ← "running program"
C type ← "software"
Line A — Two processes writing to the same memory location is a memory clash caused by programs. A key press comes from a device, so the event does not match the program source. It should be "memory clash".
Question 5
A event ← "divide by zero"
B source ← "running program"
C type ← "software"
D why ← "because from a device"
Line D — Divide by zero comes from a running program, so the 'because' reason must say it is from a program, not a device. It should be "because from a program".

Student with a class code? Join your class →