Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1Key pressed on the keyboard while a program runs | Amouse moved -> interrupt signal sent to CPU | |
| 2result = 10 / 0 | BA key press comes from the keyboard device outside the program, so it is a hardware interrupt, not a software interrupt | |
| 3A hardware interrupt is generated by a device and not by the program, for example when the mouse is moved | CA software interrupt, because the running program causes the error itself | |
| 4A software interrupt is generated by the program or process, for example when two programs try to use the same memory | DDivision by zero is caused by the running program, so it is a software interrupt, not a hardware interrupt | |
| 5Division by zero is a hardware interrupt because the CPU does the maths | EA hardware interrupt, because the signal comes from a device outside the running program | |
| 6A key press is a software interrupt because the user is running the program | Fmemory conflict -> interrupt raised by software |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
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).Event: key press
Type: hardware interruptEvent: division by zero
Type: software interruptSoftware source: the running programEvent | Type
key press | hardware
memory conflict | softwareHardware: from outside the program
Software: from inside the program