The principle: software makes hardware useful
Hardware on its own does nothing. A processor, a hard drive, a keyboard - all of these are inert until software gives them instructions. This is the foundational idea behind the Software section of the Cambridge IGCSE Computer Science syllabus (0478). Every piece of software exists because some task needs to be performed, and the distinction between different types of software comes down to what kind of task that is and who the task serves. Once you grasp this cause-and-effect chain, the categories and definitions in this topic become logical rather than arbitrary.
Types of software
System software vs application software
All software falls into one of two broad categories. System software manages the computer itself. Application software performs tasks for the user. The distinction matters because exam questions regularly ask you to classify examples or explain the difference.
| Feature | System software | Application software |
|---|---|---|
| Purpose | Manages hardware and provides a platform for applications | Performs specific tasks for the user |
| User interaction | Mostly runs in the background | Directly used by the end user |
| Examples | Operating systems, device drivers, utility programs | Word processors, web browsers, spreadsheets, games |
| Dependency | Required for the computer to function | Requires system software to run |
Think of system software as the foundation of a building. Application software is the rooms inside the building where people actually live and work. Without the foundation, the rooms cannot exist. Without the rooms, the building serves no practical purpose for its occupants.
The operating system
The operating system (OS) is the most important piece of system software. It sits between the hardware and the application software, managing resources and providing services that applications depend on. The IGCSE syllabus expects you to know six core functions of an operating system.
Memory management: The OS decides which processes get which portions of RAM, loads programs into memory when they start, and frees up memory when they finish. Without this, two programs could try to use the same memory addresses, corrupting each other's data.
Process management: Multiple programs often run at once. The OS allocates CPU time to each process, decides the order of execution, and handles switching between them. On a single-core processor, only one process truly runs at any instant, but the OS switches so rapidly that it appears simultaneous.
File management: The OS organises data on storage devices using a file system. It tracks where each file is stored on disk, manages folder structures, and controls permissions that determine who can read, write, or execute a file.
I/O management: Input and output devices (keyboards, monitors, printers) all communicate differently. The OS provides a standard interface so that software does not need to know the specific details of each hardware device. Device drivers bridge the gap between the OS and the hardware.
User interface: The OS provides the way a user interacts with the computer. This could be a graphical user interface (GUI) with windows and icons, or a command-line interface (CLI) where the user types text commands.
Security: The OS manages user accounts, passwords, and access controls. It ensures that one user cannot access another user's files without permission, and it provides the first line of defence against unauthorised access.
The platform equation
Hardware + firmware + operating system = the platform on which application software runs. Firmware is low-level software permanently stored in ROM that initialises hardware when the computer first powers on (the BIOS or UEFI). The operating system loads after firmware has done its job. Applications then run on top of the OS. Each layer depends on the one below it.
Utility software
Utility programs are a subcategory of system software. They perform specific maintenance or optimisation tasks. The IGCSE syllabus names four key utilities.
Disk defragmenter: Over time, files stored on a hard disk drive become fragmented, meaning parts of a single file are scattered across different physical locations. A defragmenter rearranges these fragments so each file occupies contiguous space, which speeds up read times. This utility applies to traditional magnetic HDDs, not solid-state drives.
Antivirus software: Scans files and programs for patterns that match known malware signatures. It can quarantine or delete infected files and often runs scheduled scans in the background. It works reactively (matching known threats) and sometimes heuristically (detecting suspicious behaviour).
Backup software: Creates copies of files and stores them in a separate location. If the original data is lost or corrupted, the backup can be used to restore it. Full backups copy everything; incremental backups copy only what has changed since the last backup.
Compression software: Reduces the file size of data so it takes up less storage space and can be transferred more quickly. Lossless compression preserves all original data. Lossy compression discards some data to achieve smaller sizes, which is acceptable for media files where minor quality loss is tolerable.
Interrupts
What an interrupt is
An interrupt is a signal sent to the processor that tells it to stop its current task and deal with something more urgent. The logic is straightforward: the CPU cannot check every device and every process constantly, so instead, devices and software send interrupts when they need attention.
Interrupts and the fetch-decode-execute cycle
The CPU runs the fetch-decode-execute (FDE) cycle continuously. At the end of each cycle, the processor checks for pending interrupts. If an interrupt is waiting, the CPU pauses its current work, saves the current state (the contents of registers and the program counter) to a stack, and jumps to the interrupt service routine (ISR) for that interrupt. Once the ISR completes, the CPU restores the saved state and resumes the original task from where it left off.
Types of interrupts
Hardware interrupts: Generated by physical devices. A keyboard sends an interrupt when a key is pressed. A printer sends an interrupt when it runs out of paper. These signals travel along the system bus to reach the processor.
Software interrupts: Generated by programs. A program might trigger an interrupt when it encounters an error (such as division by zero) or when it needs to request a service from the operating system.
Timer interrupts: Generated by an internal clock at regular intervals. The OS uses timer interrupts to manage process scheduling. When a timer interrupt fires, the OS can switch from one process to another, which is the mechanism behind multitasking.
Interrupt priorities
Not all interrupts are equally urgent. A power failure interrupt must be handled immediately, while a keyboard press can wait a few milliseconds. The processor uses a priority system: if a higher-priority interrupt arrives while a lower-priority ISR is running, the lower-priority ISR is itself interrupted. The higher-priority ISR runs first, then the lower-priority one resumes, and finally the original program continues. This nesting ensures that critical events are never delayed by routine ones.
Programming languages
High-level languages
High-level languages are designed for humans. They use English-like syntax, meaningful variable names, and structured control flow (loops, conditionals, functions). Python, Java, and Visual Basic are common examples on the IGCSE syllabus.
Advantages: Easier to read, write, and debug. Portable across different hardware platforms (the same Python code runs on Windows, macOS, and Linux). Faster development time because one high-level statement can represent many machine-code instructions.
Disadvantages: Must be translated before the processor can execute them, which adds an overhead step. Generally produce slower-running programs compared to hand-optimised low-level code. Less direct control over hardware.
Low-level languages
Low-level languages are close to what the processor natively understands. There are two forms.
Machine code: Binary instructions (sequences of 0s and 1s) that the CPU executes directly. Every processor architecture has its own machine code instruction set. Writing in machine code is extremely tedious and error-prone, but it produces the fastest possible execution because no translation step is needed.
Assembly language: Uses short mnemonics (like LDA, STO, ADD, BRA) to represent machine code instructions. Each mnemonic maps to exactly one machine code instruction. Assembly language is specific to a processor architecture, so code written for one processor type will not run on a different one.
Comparison table
| Feature | High-level language | Low-level language |
|---|---|---|
| Readability | Easy to read and understand | Difficult to read (binary or mnemonics) |
| Portability | Portable across platforms | Specific to one processor type |
| Translation | Needs a compiler or interpreter | Machine code needs none; assembly needs an assembler |
| Execution speed | Slower (translation overhead) | Faster (closer to hardware) |
| Hardware control | Limited direct hardware access | Full control over hardware resources |
| Development speed | Faster to write and test | Slower, more lines of code needed |
| Use cases | General applications, web apps, data analysis | Device drivers, embedded systems, real-time systems |
Translators
Since processors only execute machine code, any program written in a higher-level language must be translated. Three types of translator exist, and each works differently.
Compiler
A compiler translates the entire source code into machine code in one go, producing a standalone executable file. The translation happens once. After that, the executable runs directly on the processor without needing the compiler or the original source code. Compiled programs run faster at runtime because the translation work is already done. The trade-off is that compilation can take time, and if there is an error, the compiler reports it after analysing the whole program, which can make finding the specific line harder for beginners.
Interpreter
An interpreter translates and executes source code one line at a time. It reads a line, translates it to machine code, executes it, then moves to the next line. This means the interpreter must be present every time the program runs. Interpreted programs run more slowly because translation happens during every execution. The advantage is that errors are reported as soon as the problematic line is reached, which makes debugging easier during development.
Assembler
An assembler translates assembly language (mnemonics) into machine code. Because each mnemonic corresponds to exactly one machine code instruction, the translation is a direct one-to-one mapping. Assemblers are simpler than compilers because there is no complex syntax to parse - just a lookup from mnemonic to binary equivalent.
Translator comparison table
| Feature | Compiler | Interpreter | Assembler |
|---|---|---|---|
| Input | High-level source code | High-level source code | Assembly language |
| Output | Standalone executable | No separate file produced | Machine code |
| Translation method | Entire program at once | Line by line during execution | One-to-one mnemonic mapping |
| Runtime speed | Fast (pre-translated) | Slow (translates each time) | Fast (minimal translation step) |
| Error reporting | After full analysis | Stops at first error found | Reports errors per instruction |
| Needed at runtime? | No | Yes | No |
Integrated development environment (IDE)
An IDE is a software application that provides a complete set of tools for writing, testing, and debugging programs in one place. Instead of using separate tools for editing code, compiling, and finding errors, an IDE combines them into a single interface. The IGCSE syllabus expects you to describe the following features.
Code editor: A text editor designed for writing source code, typically with line numbering and the ability to handle multiple files.
Syntax highlighting: The editor displays different parts of the code in different colours. Keywords might appear in blue, strings in green, and comments in grey. This makes the code easier to scan visually and helps the programmer spot structural errors.
Auto-complete: As the programmer types, the IDE suggests possible completions for variable names, function names, and keywords. This speeds up coding and reduces spelling mistakes in identifiers.
Error diagnostics: The IDE flags syntax errors and sometimes logic warnings as you type, often by underlining the offending line in red. It provides error messages that describe what went wrong and where.
Compiler or interpreter: Built into the IDE so the programmer can translate and run their code without switching to a separate tool.
Debugger: Allows the programmer to step through code one line at a time, set breakpoints (points where execution pauses), and inspect the values of variables at each step. This is invaluable for finding logic errors that do not produce syntax errors but cause incorrect output.
Run-time environment: Provides the environment in which the program executes, including console output and input handling, so the programmer can test the program within the IDE.
Worked exam-style question
Question: A student writes a program in Python. She uses an IDE to develop and test her program.
(a) Python is a high-level language. State two advantages of using a high-level language rather than a low-level language. [2 marks]
(b) The student's program contains a syntax error. Describe how the IDE helps her find and fix the error. [3 marks]
(c) Explain the difference between a compiler and an interpreter. State which one would be more suitable during the development phase and justify your answer. [4 marks]
(a) A high-level language is easier to read and write because it uses English-like syntax, which reduces development time. It is also portable, meaning the same code can run on different types of hardware without modification.
(b) The IDE's error diagnostics feature underlines or highlights the line containing the syntax error. It displays an error message describing the problem (for example, "unexpected indent" or "missing colon"). The student can then use the code editor to navigate to the highlighted line and correct the mistake. The debugger allows her to re-run the program and confirm the error is fixed.
(c) A compiler translates the entire source code into an executable file in one pass. The program then runs without needing the compiler. An interpreter translates and executes the code one line at a time and must be present each time the program runs. During development, an interpreter is more suitable because it stops at the first error it encounters, allowing the programmer to fix errors one at a time and test changes immediately without waiting for the entire program to be recompiled.
Common mistakes
- Confusing system software with application software. An antivirus program is system software (utility), not application software, because its purpose is to maintain the computer system rather than perform a user task. A web browser is application software because the user interacts with it to browse the internet.
- Listing OS functions without explaining them. Writing "memory management" alone does not earn marks. You need to explain what it does: the OS allocates RAM to processes and deallocates it when processes finish.
- Saying an interpreter "compiles" line by line. Compiling means producing a complete executable. An interpreter translates and executes one line at a time. It never produces an executable file. Use precise vocabulary.
- Forgetting that assembly language still needs translation. Students sometimes state that low-level languages do not need translators. Machine code does not, but assembly language requires an assembler. The distinction between the two forms of low-level language matters.
- Mixing up interrupts with polling. An interrupt is a signal sent by a device to the CPU. Polling is the CPU repeatedly checking devices for input. The exam question asks about interrupts specifically, so describe the signal-and-respond mechanism, not continuous checking.
- Omitting the state-save step in the interrupt process. The CPU must save its current state before running the ISR and restore it afterwards. Without these steps, the interrupted program would lose its data when execution resumes.
Self-check questions
- A school computer runs a word processor, a spreadsheet application, and an operating system. Classify each as either system software or application software and give one reason for each classification.
- Describe three functions of an operating system. For each function, explain what would happen if the OS did not perform it.
- A hardware interrupt is generated when a user presses a key on the keyboard. Describe the sequence of events that occurs from the moment the interrupt is generated until the CPU resumes its original task.
- A company has finished developing a program and wants to distribute it to customers who do not have a programming environment installed. Should the company use a compiler or an interpreter to prepare the program for distribution? Justify your answer.
- Name three features of an IDE and explain how each one helps a programmer during software development.
A comprehensive guide to the Software topic in Cambridge IGCSE Computer Science (0478), covering system and application software, operating system functions, interrupts and the interrupt service routine, high-level and low-level programming languages, translators, and IDE features, with worked exam questions and self-check exercises.
Kommentar(e)