Paper 1 · Chapter 4 of 6

Software

The programs that bring hardware to life: system and application software, the jobs of the operating system, interrupts, high and low level languages, assembly, compilers and interpreters, and the IDE. Topic 4 of the 0478 / 2210 syllabus in full.

IGCSE / O-Level 0478 · 2210 Paper 1 · Computer Systems

Hardware on its own does nothing. Software is the set of programs that tell the hardware what to do. This chapter looks at the two broad kinds of software, the operating system that manages everything, how the CPU responds to urgent events through interrupts, and the languages and tools programmers use to create software in the first place.

01

System Software vs Application Software

All software falls into two categories, based on who it serves: the computer itself, or the user.

System softwareApplication software
PurposeProvides the services the computer needs to operate and manages the hardwareProvides the services the user needs to complete tasks
Runs onDirectly manages the hardwareRuns on top of the operating system
ExamplesOperating systems (Windows, Linux, macOS), utility programs, device drivers, antivirus, disk defragmenterWord processor, web browser, spreadsheet, games, photo editor
Quick test
Ask "is this for the user or for the machine?" A web browser helps you complete a task, so it is application software. A device driver lets the operating system talk to a printer, so it is system software.

02

Functions of the Operating System

The operating system (OS) is system software that manages the computer's hardware and software resources and provides a platform on which applications can run. You should be able to name and describe its main functions.

FunctionWhat it does
Managing filesOrganises files into directories, handles reading and writing, and manages file permissions
Handling interruptsReceives and prioritises interrupt signals and runs the matching interrupt service routines
Providing an interfaceGives the user a way to interact, either a graphical interface (GUI) or a command-line interface (CLI)
Managing peripherals and driversLoads device drivers so hardware such as a printer or keyboard works with the OS
Managing memoryAllocates RAM to running programs and manages virtual memory
Managing multitaskingAllows several programs to run at once by rapidly switching CPU time between them
Platform for applicationsProvides interfaces so applications can use the hardware without controlling it directly
Managing securityHandles authentication, access control and firewall settings
Managing user accountsCreates and manages user profiles, permissions and login details
In the exam
If asked to "describe" rather than just "state" a function, add what it achieves. For example: "managing memory: the OS allocates areas of RAM to each running program so they do not overwrite one another."

03

Hardware, Firmware and the OS: the Software Layers

Software runs in layers, and each layer depends on the one below it. Understanding this stack explains how a program you click on eventually controls the hardware.

Application Software

The programs the user runs, such as a browser or game

runs on ↓

Operating System

Manages hardware and provides a platform for applications

runs on ↓

Firmware (Bootloader, BIOS or UEFI)

Permanent software in ROM that starts the hardware and loads the OS

runs on ↓

Hardware

The physical components: CPU, memory, storage and devices

Firmware is software permanently stored in ROM on the hardware. The bootloader, which is a piece of firmware, initialises the hardware and loads the operating system when the computer is switched on.


04

Interrupts

An interrupt is a signal sent to the CPU telling it that an event needs immediate attention. The CPU pauses what it is doing, deals with the event, and then carries on exactly where it left off. Interrupts are how a computer responds instantly to things like a key press while still running other programs.

Watch it How the CPU handles an interrupt

Press play to watch the CPU pause its current task, save its state to the stack, run the interrupt service routine, then restore its state and resume.

The steps in handling an interrupt

  1. A device or program generates an interrupt signal
  2. The CPU finishes its current instruction (not the whole task)
  3. The CPU saves its current state, the registers and program counter, onto the stack
  4. The CPU runs the appropriate interrupt service routine (ISR)
  5. When the ISR finishes, the CPU restores the saved state and resumes the original task exactly where it paused

Two kinds of interrupt

Hardware interruptsSoftware interrupts
Generated by a physical deviceGenerated by a running program
Pressing a key on the keyboardAn attempt to divide by zero
Moving the mouseTwo processes trying to access the same memory location
A printer finishing a print jobA program requesting an operating system service (a system call)
Why save the state?
The CPU saves its registers and program counter so that, once the urgent event is dealt with, it can pick up the original task exactly where it left off, as if nothing had happened. Without saving state, the paused task would be lost.

05

High Level and Low Level Languages

Programming languages sit on a scale. High level languages are close to human language and easy to work with. Low level languages are close to the machine and harder for humans but give precise control.

High level languageLow level language
ReadabilityEnglish-like syntax, easy to read and writeUses mnemonics or binary, hard to read
DebuggingEasier, the code is logical and structuredHarder, you must trace binary or mnemonics
Machine independencePortable, runs on different machines with the right translatorMachine specific, written for one type of CPU
Hardware controlCannot directly control hardwareDirect access to hardware registers and memory
SpeedSlightly slower after translationVery fast, runs directly or almost directly
ExamplesPython, Java, C++, VB.NETAssembly language, machine code

06

Assembly Language

Assembly language is a low level language that uses mnemonics, short human-readable codes, to represent machine code instructions. It is much easier to follow than raw binary while still giving direct control over the hardware.

; A short assembly program
LDA 5       ; Load the value from memory address 5 into the accumulator
ADD 3       ; Add the value from address 3 to the accumulator
STA 10      ; Store the result into memory address 10
HLT         ; Halt, stop execution
Key fact
One assembly instruction corresponds to exactly one machine code instruction. This is different from a high level language, where a single line may produce many machine code instructions.

07

Compilers and Interpreters

A high level language cannot be run directly by the CPU. It must first be translated into machine code. There are two ways to do this, and the difference is a frequent exam topic.

Watch it Compiler vs interpreter, side by side

Play to compare. The compiler translates the whole program at once before running. The interpreter translates and runs one line at a time, stopping at the first error.

Notice the interpreter halts the moment it reaches the error on line 3, while the compiler reports all errors together at the end.
CompilerInterpreter
How it translatesThe entire source code at onceOne line at a time, executing as it goes
OutputProduces a standalone executable fileNo executable file is produced
Speed when runningFaster, it is already translatedSlower, it translates every time it runs
ErrorsReports all errors together after compilingStops at the first error it meets
Typically used forThe final released version of a programDeveloping and testing a program
The exam distinction
Compiler: full error report after compiling, used for the final release. Interpreter: stops at the first error, easier for testing during development. Learn this pairing, it comes up almost every year.

08

Assemblers

An assembler is the translator for assembly language. It converts an assembly language program into machine code. Because each assembly instruction maps to exactly one machine code instruction, the assembler's job is a direct one-to-one translation.

The three translators
A compiler and an interpreter both translate high level languages. An assembler translates assembly language. All three turn human-written code into machine code the CPU can run.

09

Integrated Development Environments (IDEs)

An IDE is an application that gives programmers a complete set of tools for writing, testing and debugging code, all in one place. Instead of switching between separate programs, everything is combined.

FeatureWhat it does
Code editorA text editor with syntax highlighting and formatting for writing code
Run-time environmentLets the program be run and tested inside the IDE
TranslatorA built-in compiler or interpreter to translate and run the code
Error diagnosticsHighlights syntax errors as you type and shows error messages
Auto-completionSuggests completions for variable names, functions and keywords
Auto-correctionSuggests or applies fixes for common mistakes automatically
PrettyprintAutomatically formats code with correct indentation and spacing

10

Exam Practice

4 marks
Q1. Describe the difference between system software and application software, giving two examples of each.
Answer

System software provides the services the computer needs to operate and manages the hardware, for example an operating system and a device driver. Application software provides the services the user needs to complete tasks and runs on top of the operating system, for example a word processor and a web browser.

4 marks
Q2. State four functions of an operating system.
Answer

Any four of: managing files, handling interrupts, providing a user interface, managing peripherals and drivers, managing memory, managing multitasking, providing system security, and managing user accounts.

5 marks
Q3. Describe the steps the CPU takes when it receives an interrupt.
Answer

A device or program generates an interrupt signal. The CPU finishes its current instruction, then saves its current state, the registers and program counter, onto the stack. It runs the appropriate interrupt service routine to deal with the event. Once the routine finishes, the CPU restores the saved state and resumes the original task from where it paused.

2 marks
Q4. Give one hardware interrupt and one software interrupt.
Answer

A hardware interrupt is a physical event such as pressing a key on the keyboard or a printer finishing a job. A software interrupt is generated by a program, such as an attempt to divide by zero or a request for an operating system service.

4 marks
Q5. Compare how a compiler and an interpreter translate a high level language program and report errors.
Answer

A compiler translates the entire source code at once and produces a standalone executable file, then reports all the errors it found together after compilation. An interpreter translates and executes the code one line at a time, producing no executable file, and stops as soon as it reaches the first error.

3 marks
Q6. Explain what an IDE is and describe two features it provides.
Answer

An IDE is an application that provides a complete set of tools for writing, testing and debugging code in one place. Two features, for example: a code editor with syntax highlighting for writing code, and error diagnostics that highlight syntax errors as the programmer types.

Scroll to Top