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 | |
|---|---|---|
| 1interrupt signal | Adivide by zero error -> interrupt signal | |
| 2keyboard sends signal | Bkey pressed -> signal -> CPU | |
| 3A running program is a software source that can generate an interrupt when an error happens | CAn interrupt is only generated after an event happens, so the signal cannot be sent before the key press. | |
| 4The order of events when a key is pressed: event, signal, then the CPU is told | DA signal sent to the CPU by a device or a running program to report an event that needs attention | |
| 5CPU -> interrupt signal -> keyboard | EA hardware source generates an interrupt when a key is pressed | |
| 6interrupt signal sent before the key is pressed | FThe direction is wrong: the device sends the interrupt signal to the CPU, not the CPU to the device. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
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.event ← "key press"
SEND interrupt signal TO CPUIF event = "key press" THEN
SEND interrupt signal TO CPU
ENDIFdevice ← keyboard
source ← HARDWAREIF divisor = 0 THEN
source ← SOFTWARE
ENDIFIF event = "key press" THEN
SEND interrupt signal TO CPU
ENDIF