Software 💿
Hardware is just a pile of parts until software tells it what to do. Meet the operating system, the utilities that keep it healthy, the interrupts that juggle everything, and the translators that turn your code into machine code.
🎯 What you'll unlock this chapter
- 🧰 System software vs application software — including utilities and device drivers
- 🖥️ What an operating system does, and how firmware (the BIOS) gets it started
- ⚡ How interrupts and buffers let a computer do many things at once
- 🗣️ High-level vs low-level languages, assembly language and machine code
- 🔁 Compilers, interpreters and assemblers, and the tools in an IDE
- ✏️ Both coursebook activities (every part, auto-marked) and every worked example
🧱 Hardware, firmware and software 4.1.1
⚖️ System vs application software 4.1.1
| Software | What it does |
|---|---|
| Compiler | Translates a high-level language program (source code) into machine code (object code) that can be run again and again |
| Linker | Combines several object files (modules written separately) into one program |
| Device driver | Lets a hardware device communicate with the operating system |
| Operating system | Runs in the background managing the computer's basic functions |
| Utilities | Help manage, maintain and control the computer's resources |
🛠️ Utility programs 4.1.1
🦠 Virus checkers
Check files before they are run or loaded; compare against a database of known viruses; use heuristic checking (looking for virus-like behaviour, to catch new viruses); put suspicious files into quarantine (deleted automatically or by the user — beware false positives). Must be kept up to date, with regular full scans to catch dormant viruses.
🧩 Defragmentation
As files are deleted and extended, their blocks get scattered across an HDD, so the read-write head has to move more. A defragmenter rearranges the blocks into contiguous sectors → faster access. (Not needed for SSDs.)
💾 Back-up
Schedules back-ups and only backs up changed files. Ideally keep three versions: the working copy, a local back-up, and a remote back-up (e.g. the cloud). Windows File History and Mac Time Machine keep restore points and past versions.
🔐 Security · 🖼️ Screensavers · 🧹 Others
Security software manages user accounts and passwords, links to virus/spyware checkers, uses firewalls and encryption, and checks updates are genuine. Screensavers now mostly add security (lock an idle computer) and run background tasks while idle. Others: disk analysis and repair, file management and compression.
🎮 Defragmenter
Track 8 has 12 sectors. Delete a file and extend others to see fragmentation build up, then run the defragmenter. The head-movement count shows how many separate jumps it takes to read every file.
Track 8
Track 11
🔌 Device drivers 4.1.1
Device drivers translate data into a format a hardware device understands. Without one you'd see "device not recognised". When a USB device is plugged in, the OS looks for its driver. USB drivers contain descriptors — the vendor ID (VID), product ID (PID) and a unique serial number — so the computer can ask a new device what it is. Without a serial number, the OS treats the device as new every time it's plugged in.
🖥️ The operating system 4.1.2
The OS provides an environment for applications to run in and an interface between people and the computer, hiding the complexity of the hardware. Examples: Windows, macOS, Android, iOS. It's usually stored on the HDD/SSD (on phones, solid-state). Its main jobs:
| Function | What it involves |
|---|---|
| Human–computer interface | A CLI or a GUI (see below) |
| Memory management | Manages RAM, moves data between RAM and HDD/SSD, keeps track of every location, and provides memory protection so two programs can't use the same locations (which could lose data, give wrong results, create security issues or crash the computer) |
| Security management | OS and anti-virus updates, works with the firewall, user privileges and access rights, data recovery / system restore, preventing intrusion |
| Hardware management | Communicates with devices through drivers, gives each resource a priority, manages queues and buffers (e.g. printer queues), handles device errors and interrupts |
| File management | Naming conventions and extensions; create, open, close, delete, rename, copy, move; directory structures; access control; loading files into memory |
| Handling interrupts | See the Interrupts tab |
| Platform for running applications | Loads and runs programs |
| Multitasking | Several processes share the hardware: each gets resources for a time limit, can be interrupted, and has a priority (pre-emptive multitasking) — though a low-priority process can be starved of resources |
| Managing user accounts | Each user has a username and password, their own settings, folders and files; an administrator can create, delete and restrict accounts |
⌨️ CLI vs 🖱️ GUI 4.1.2
🎮 Same files, two interfaces
Type commands on the left (try help, ls, cd homework, cat notes.txt, mkdir projects, rm old.tmp, cd ..). The GUI on the right shows the same file system — click icons to open folders.
🚀 Running applications — firmware and the BIOS 4.1.3
When a computer is switched on, part of the OS has to be loaded into RAM — booting up (the bootstrap loader). The BIOS (basic input/output system) starts the motherboard, finds the storage device holding the OS, then loads and runs the part of the OS that's needed. The BIOS is firmware: a program that gives low-level control of devices.
Applications run under the control of the OS and use system software such as device drivers while they run; parts of the OS are loaded in and out of RAM as needed.
⚡ Interrupts 4.1.4
An interrupt is a signal from a device or from software to the microprocessor, making it temporarily stop what it's doing to service the interrupt. Causes:
| Cause | Example |
|---|---|
| A timing signal | The clock telling the OS a time slice is up |
| An input/output process | A printer or disk drive needing more data |
| A hardware fault | A paper jam, out of ink |
| User interaction | Pressing keys such as <CTRL><ALT><BREAK> |
| Software errors | A missing .exe file, two processes using the same memory, dividing by zero |
Servicing an interrupt: the computer identifies its type and priority. If it's serviced, the status of the current task (the PC and other registers) is saved, the interrupt service routine (ISR) runs (its start address loaded into the PC), then the saved registers are restored and the task carries on.
🪣 Buffers 4.1.4
A buffer is an area of memory that stores data temporarily — it smooths out the difference in speed between two devices. When streaming a movie, data must arrive in the buffer faster than the player takes it out, or the video freezes. Buffers and interrupts together mean the processor doesn't sit idle waiting for a slow printer:
- Data for the document is sent from memory to the printer buffer.
- The buffer's contents are sent to the printer and printed…
- …while the processor carries on with other tasks.
- When the buffer is empty, the printer sends an interrupt asking for more data.
- The current task is suspended, the interrupt is serviced, and the buffer is refilled — until the whole document is printed.
🎮 Printing with buffers and interrupts
Mike's 40-page document goes to a printer whose buffer holds 10 pages, while he watches a video. Watch the CPU get on with the video and only stop when the printer interrupts. Try the out-of-ink fault too.
Printer buffer
Pages printed
- Press Print.
🗣️ High-level languages 4.2.1
A computer only understands its own machine code, so every program has to be translated. High-level languages (Python, Java, C++, Visual Basic, Pascal…) let programmers focus on the problem, with no knowledge of the hardware or instruction set needed. They're closer to English, so programs are quicker to write, easier to read, debug and maintain — and often portable to different computers.
Sum = First + Second ← one high-level statement ⚙️ Low-level languages 4.2.1–4.2.2
Low-level languages relate to the architecture of one particular type of computer. They're either machine code (binary, usually shown in hex — hard to understand) or assembly language, which uses mnemonics and must be translated by an assembler.
LDA First ← load the value of First into the accumulator ADD Second ← add the value of Second to the accumulator STO Sum ← store the accumulator in Sum
| High-level | Low-level | |
|---|---|---|
| ✅ | Independent of the computer; easier to read, write and understand; quicker to write; easier and quicker to debug; easier to maintain | Can use special hardware and machine-dependent instructions; code takes up little memory; code runs very quickly |
| ⚠️ | Can't use special hardware; may take more memory and run more slowly | Harder and slower to write and debug; machine-dependent; needs knowledge of the hardware |
So programmers choose assembly language to use special hardware or machine-dependent instructions, to save memory, or to make code run very fast.
🎮 From high-level to machine code
Type an assignment like Total = Price + Tax (or with −). See the assembly language and the machine code it becomes, using a made-up 8-bit instruction set.
🔁 Translators 4.2.3
| Compiler | Interpreter | Assembler |
|---|---|---|
| Translates a high-level program into machine code all in one go | Executes a high-level program one statement at a time | Translates a low-level assembly program into machine code |
| One statement → several machine code instructions | One statement may need several machine code instructions to execute | One statement → usually one machine code instruction |
| Errors → an error report instead of a compiled program | Stops at the first error with an error message | — |
| Compiled program is distributed for general use | Programs can't run without the interpreter; often used during development | Assembled program is distributed for general use |
⚖️ Compiler vs interpreter 4.2.4
Compiler
✅ The compiled program can be stored ready to use, run without the compiler, takes up less memory when it runs, and runs faster.
⚠️ Takes longer to write, test and debug during development.
Interpreter
✅ Easier and quicker to debug, test and edit during development.
⚠️ Programs can't run without the interpreter, and take longer to execute (translated every time).
🎮 Compiler vs interpreter
This program has a mistake on line 4. Run it through each translator — then fix it and run it five times to compare.
🧱 Compiler
- …
🗣️ Interpreter
- …
🧑💻 Integrated development environments 4.2.5
An IDE (e.g. PyCharm, Visual Studio, BlueJ) helps programmers write and develop programs:
| Feature | How it helps |
|---|---|
| Code editor | Write and edit without switching to a separate text editor |
| Translator | An interpreter while developing, a compiler for the final version |
| Runtime environment with a debugger | Single-step through a program or set breakpoints, watching the contents of variables — to find logic errors |
| Error diagnostics & auto-correction | Finds possible errors as you type and suggests corrections |
| Auto-completion | Suggests variable names and keywords as you type |
| Auto-documenter & prettyprinting | Explains what code does; colour-codes and lays out code clearly |
🎮 Debugger — single-step and breakpoints
Click a line number to set a breakpoint (red). Use Step to run one line at a time, or Run to run until the next breakpoint. Watch the variables. (The code is prettyprinted — keywords, numbers and strings in colour.)
✏️ Practice hub 2 activities · every example
Both activities from the coursebook chapter, every part auto-marked or with model answers — fresh questions every time you hit 🔀 New questions.
📘 Worked examples
Every type of worked example in the chapter, solved step by step. Hit 🔀 Another example on any of them for a new one.
🃏 Key-term flashcards Tap to flip
🧠 Mini-quiz
📝 Exam-style questions Try, then peek
- ✅ System software controls and manages the hardware and provides a platform for other software; application software lets the user carry out specific tasks.
- ✅ System software runs in the background (e.g. OS, drivers); application software is run by the user when needed (e.g. a spreadsheet).
- ✅ Checks files before they are run or loaded, running in the background.
- ✅ Compares them with a database of known viruses (kept up to date).
- ✅ Heuristic checking for virus-like behaviour catches new viruses.
- ✅ Infected files are quarantined, then deleted automatically or by the user; regular full scans find dormant viruses.
- ✅ The processor identifies the interrupt type and checks its priority.
- ✅ If serviced, the current task’s status (PC and registers) is saved.
- ✅ The interrupt service routine runs (its address loaded into the PC).
- ✅ Afterwards the saved registers are restored and the original task continues.
- ✅ Data arrives from the internet at a varying (sometimes slower) rate than the player uses it.
- ✅ The buffer stores data temporarily so playback can continue smoothly without freezing.
- ✅ Direct communication with the computer; not restricted to pre-set options.
- ✅ Can change configuration settings; uses much less memory.
- ✅ A compiler translates the whole program into machine code in one go; an interpreter translates and executes one statement at a time.
- ✅ A compiler produces an error report of all errors; an interpreter stops at the first error.
- ✅ A compiled program runs without the compiler and runs faster; an interpreted program needs the interpreter every time it runs.
- ✅ Interpreters are easier for debugging during development.
- ✅ The BIOS program is in EEPROM (flash ROM): non-volatile, so it’s there at start-up, but can still be updated.
- ✅ The settings are on a CMOS chip kept powered by a battery, so they can be changed by the user and remembered.
- ✅ Removing the battery resets the settings to factory defaults, but the BIOS program itself survives.
🚀 Going further A Level preview
At A Level you'll see exactly when interrupts are handled: at the end of every fetch–decode–execute cycle the processor checks for interrupts. If one has a higher priority than the current task, the registers are saved (on a stack), the ISR runs, then everything is restored and the cycle resumes. Lower-priority interrupts wait.