← IGCSE Computer Science Paper 1

Hardware interrupts compared with software interrupts

A hardware interrupt comes from a device outside the program (key press, mouse move); a software interrupt comes from the running program itself (divide by zero, memory conflict).

Understanding Hardware interrupts compared with software interrupts in IGCSE Computer Science Paper 1

What it does: Moving the mouse is an action by an external device, which makes it a hardware interrupt. A memory conflict is caused by running processes, so it is a software interrupt. Hardware interrupts come from devices. Errors inside a program cause software interrupts. The CPU handles both types. The difference is where the signal comes from. A key press is sent by the keyboard hardware, not by the program, so it is a hardware interrupt.

Common mistakes: A key press is signalled by the keyboard, a device outside the running program. The source should be "keyboard device", not "running program". Divide by zero is caused by the running program itself, so it is a software interrupt. Line 3 should be type ← "software interrupt".

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 390–408) 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?
Hardware interruptSoftware interrupt
Matches
Division by zero is a hardware interrupt because the CPU does the maths
↓
Division by zero is caused by the running program, so it is a software interrupt, not a hardware interrupt
Applying
Meanings
Term
hardware interrupt vs software interrupt
Meaning
A hardware interrupt comes from a device outside the program (key press, mouse move); a software interrupt comes from the running program itself (divide by zero, memory conflict).
Practice
CASE event OF
Testing
Gaps
Type: interrupt
Check Answer
Spots
1event ← "key press"
2source ← "running program"

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

The 'Seahorse' badge — Range Rider, 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
B. Hardware interrupt ✓
The keyboard is a device outside the running program, so its signal is a hardware interrupt.
2. A program tries to divide a number by zero. What type of interrupt is generated?
A. Software interrupt ✓
B. Hardware interrupt
The error happens inside the running program itself, so it causes a software interrupt.
3. Which statement correctly describes the SOURCE of a hardware interrupt?
A. The running program itself, such as a divide by zero error
B. A device outside the running program, such as a mouse ✓
Hardware interrupts come from devices. Errors inside a program cause software interrupts.
4. Which statement correctly describes the SOURCE of a software interrupt?
A. The running program or process itself ✓
B. A peripheral device such as a keyboard
Software interrupts are raised by the program or process, for example when it causes an error.
5. The user moves the mouse while a video plays. Which type of interrupt is this?
A. Hardware interrupt ✓
B. Software interrupt
The mouse is an external device that signals the CPU, so this is a hardware interrupt.

Match the Pairs

Key pressed on the keyboard while a program runs → A hardware interrupt, because the signal comes from a device outside the running program
result = 10 / 0 → A software interrupt, because the running program causes the error itself
A hardware interrupt is generated by a device and not by the program, for example when the mouse is moved → mouse moved -> interrupt signal sent to CPU
A software interrupt is generated by the program or process, for example when two programs try to use the same memory → memory conflict -> interrupt raised by software
Division by zero is a hardware interrupt because the CPU does the maths → Division by zero is caused by the running program, so it is a software interrupt, not a hardware interrupt
A key press is a software interrupt because the user is running the program → A key press comes from the keyboard device outside the program, so it is a hardware interrupt, not a software interrupt

Key Term

hardware interrupt vs software interrupt
A hardware interrupt comes from a device outside the program (key press, mouse move); a software interrupt comes from the running program itself (divide by zero, memory conflict).

Fill in the Blanks

1. Event: key press Type: hardware interrupt
Hint: Type the kind of interrupt that a key press causes.
2. Event: division by zero Type: software interrupt
Hint: Type the kind of interrupt that a divide by zero error in a program causes.
3. Software source: the running program
Hint: Type the word for what produces a software interrupt.
4. Event | Type key press | hardware memory conflict | software
Hint: Type the interrupt type that a memory conflict in a program belongs to.
5. Hardware: from outside the program Software: from inside the program
Hint: Type the word that describes where a software interrupt comes from, compared with a hardware interrupt.

Spot the Error

Question 1
A event ← "key press"
B source ← "running program"
C type ← "hardware interrupt"
D OUTPUT type
Line B — A key press is signalled by the keyboard, a device outside the running program. The source should be "keyboard device", not "running program".
Question 2
A event ← "divide by zero"
B source ← "running program"
C type ← "hardware interrupt"
D OUTPUT type
Line C — Divide by zero is caused by the running program itself, so it is a software interrupt. Line 3 should be type ← "software interrupt".
Question 3
A event ← "memory conflict"
B source ← "mouse device"
C type ← "hardware interrupt"
Line A — The source is a mouse device and the type is hardware, so the event must be a hardware event such as "mouse move". A memory conflict is a software interrupt.
Question 4
A IF source = "device" THEN
B type ← "software"
C ELSE
D type ← "software"
E ENDIF
Line B — If the signal comes from a device outside the program, it is a hardware interrupt. Line 2 should be type ← "hardware".
Question 5
A INPUT event
B source ← GetSource(event)
C IF source = "program" THEN
D OUTPUT "hardware interrupt"
E ENDIF
Line C — The output says hardware interrupt, which comes from a device. The condition should test source = "device", because a program source means a software interrupt.

Student with a class code? Join your class →