Worth about 8 of the 75 marks on a typical Paper 1. Compilers vs interpreters and interrupts come up most.
1. System and application software
| System software | Application software | |
|---|---|---|
| Purpose | Provides the services the computer needs to run | Provides the services the user needs to do a task |
| Examples | Operating system; utility software such as anti-virus, disk defragmenter, backup and compression tools | Word processor, spreadsheet, web browser, games, photo editor |
2. The operating system
The operating system (OS) manages the hardware and lets the user and applications use it.
| Function | What it means |
|---|---|
| Managing files | Creating, naming, saving, moving and deleting files and folders |
| Handling interrupts | Responding to signals from hardware and software that need the CPU’s attention |
| Providing an interface | A GUI or command line so the user can interact with the computer |
| Managing peripherals and drivers | Using drivers to communicate with devices such as printers and keyboards |
| Managing memory | Deciding which programs and data are held in RAM, and where |
| Managing multitasking | Sharing CPU time so several programs appear to run at once |
| Providing a platform for applications | Applications run on top of the OS and use its services |
| Providing system security | Passwords, firewalls and keeping the system updated |
| Managing user accounts | Separate logins, settings and access rights for each user |
3. Hardware, firmware and the OS
Applications run on the operating system. The operating system runs on the firmware: the bootloader, stored in ROM, which loads the OS when the computer starts. The firmware runs on the hardware.
4. Interrupts
An interrupt is a signal from hardware or software asking the CPU for attention.
| Type | Examples |
|---|---|
| Hardware interrupt | Pressing a key, moving the mouse, a printer running out of paper |
| Software interrupt | Division by zero; two processes trying to access the same memory location |
- The device or program sends an interrupt signal to the CPU.
- At the end of each fetch–decode–execute cycle, the CPU checks for interrupts.
- If the interrupt has a higher priority than the current task, the CPU saves the state of the current task (its register values).
- The CPU runs the interrupt service routine (ISR) that deals with that interrupt.
- When the ISR finishes, the saved state is restored and the original task carries on.
5. High- and low-level languages
| High-level language | Low-level language | |
|---|---|---|
| Examples | Python, Java, Visual Basic | Machine code, assembly language |
| Reading and writing | Easy: uses English-like words | Hard: uses binary or mnemonics |
| Debugging | Easier to find and fix errors | Harder to debug |
| Machine independence | Runs on different types of computer (once translated) | Written for one type of CPU |
| Hardware control | Cannot directly manipulate hardware | Can directly manipulate hardware and memory; efficient, fast code |
6. Assembly language
Assembly language is a low-level language that uses short mnemonics instead of binary, for example LDA 5 (load), ADD 6 (add) and STO 7 (store). Each mnemonic matches one machine code instruction. An assembler translates assembly language into machine code.
7. Compilers and interpreters
| Compiler | Interpreter | |
|---|---|---|
| How it translates | The whole program at once, before it runs | One line at a time, running each line straight away |
| Output | An executable file that runs without the compiler | No executable; the code is interpreted every time it runs |
| Errors | An error report for the whole program after translation | Stops at the first error it finds |
| Best for | Translating the finished program to give to users | Developing and testing, because errors are found line by line |
Try it: compiler vs interpreter
This program has two errors. Translate it both ways and compare what happens.
8. Integrated development environments (IDEs)
An IDE is software that provides the tools a programmer needs in one place.
| Function | How it helps |
|---|---|
| Code editor | Where code is typed, often with colour-coded keywords |
| Run-time environment | Lets the program be run and tested inside the IDE |
| Translators | A built-in compiler and/or interpreter |
| Error diagnostics | Highlights errors and explains them, e.g. the line number |
| Auto-completion | Suggests the rest of a keyword or variable name as you type |
| Auto-correction | Fixes common typing mistakes automatically |
| Prettyprint | Formats code with consistent indentation and colours so it is easier to read |
9. Examiner tips
- Describe how a compiler or interpreter works when asked about the operation, not its advantages.
- Don’t mix up high- and low-level languages. Assembly is low-level.
- An assembler translates assembly language; a compiler or interpreter translates high-level code.
- Don’t repeat the question. If it says “a translator is used”, answering “a translator” scores nothing.
- Interrupts are checked at the end of each FDE cycle, and the current state is saved before the ISR runs.
- System vs application: anti-virus is utility (system) software, not an application.
- Give OS functions in context: e.g. “manages memory by deciding which programs are held in RAM”.
- The bootloader is firmware stored in ROM; it loads the OS.
10. Practice questions
Practice: answer and check instantly
Type a short answer, then press Check or Enter.
Show answer
System software.
Show answer
An interrupt service routine (ISR).
Show answer
Division by zero (or two processes trying to access the same memory location).
Show answer
An assembler.
Show answer
An interpreter.
Show answer
A compiler.
Show answer
Auto-completion.
Show answer
The bootloader.
Exam-style questions
9. Describe how an interrupt is handled by the CPU. [4]
Show mark guide
Any four: an interrupt signal is sent to the CPU · the CPU checks for interrupts at the end of each FDE cycle · the interrupt’s priority is checked · the current task’s state/registers are saved · the interrupt service routine is run · the saved state is restored and the original task resumes.
10. A programmer is writing a new game. Explain why they would use an interpreter while writing it and a compiler for the final version. [4]
Show mark guide
Interpreter: translates line by line and stops at each error [1], so errors can be found and fixed as the code is developed [1]. Compiler: produces an executable file [1], so users can run the game without a translator, and the source code is not shared [1].
11. Topic test: predict your grade
Topic test: predict your grade
15 questions, about 10 minutes. Answer them all, then press Mark my test.
Frequently asked questions
What is the difference between system software and application software?
System software, such as the operating system and utilities, runs and manages the computer. Application software, such as a word processor or web browser, lets users do specific tasks.
What is the difference between a compiler and an interpreter?
A compiler translates the whole program into machine code before it runs and reports all errors at the end. An interpreter translates and runs one line at a time and stops at the first error.
What is an interrupt?
An interrupt is a signal from hardware or software that tells the processor something needs attention, such as a key press. The processor saves its current task, runs an interrupt service routine, then carries on.