Skip to content

Software

IGCSE Computer Science · Topic 4

Train
4.1

Hardware and software

A computer system is made of two parts that work together.

Hardware is the physical parts (CPU, keyboard); software is the programs (apps, OS) Hardware is the physical parts; software is the programs

  • Hardware 硬件 is the physical 物理的 parts of the computer — the parts you can touch. Examples: the CPU, memory, keyboard, screen and hard disk.
  • Software 软件 is the programs 程序 that control the computer and tell the hardware what to do.

Hardware cannot do anything useful on its own. Software needs hardware to run on. Both are needed.

A computer motherboard with its chips, slots and connectors The motherboard and the parts attached to it are hardware — the physical parts you can touch

A desktop operating system on screen An operating system is software — the programs that tell the hardware what to do

Vocabulary Train
English Chinese Pinyin
Hardware 硬件 yìng jiàn
physical 物理的 wù lǐ de
Software 软件 ruǎn jiàn
programs 程序 chéng xù
4.1

Types of software

Syllabus
Candidates should be able to: Notes and guidance
1 Describe the difference between system software and application software and provide examples of each • System software provides the services that the computer requires, including operating system and utility software • Application software provides the services that the user requires
2 Describe the role and basic functions of an operating system • Including: – managing files – handling interrupts – providing an interface – managing peripherals and drivers – managing memory – managing multitasking – providing a platform for running applications – providing system security – managing user accounts
3 Understand how hardware, firmware and an operating system are required to run applications software • Applications are run on the operating system • The operating system is run on the firmware • The bootloader (firmware) is run on the hardware
4 Describe the role and operation of interrupts • Including: – how an interrupt is generated – how it is handled using an interrupt service routine – what happens as a result of the interrupts • Software interrupts include division by zero and two processes trying to access the same memory location • Hardware interrupts include pressing a key on the keyboard and moving the mouse

Source: Cambridge International syllabus

Software is split into two types.

A tree splitting Software into system software (operating system, utilities, drivers, compiler) and application software (word processor, spreadsheet, database, browser) Software divides into system software (runs the computer) and application software (lets the user do a task)

System software

System software 系统软件 controls the computer itself and gives a base for other programs to run on. Examples:

  • operating system 操作系统 (see below);
  • compiler 编译器 and linker 链接器 (tools that turn programs into a form the computer can run);
  • device driver 设备驱动程序 — software that lets the operating system control a piece of hardware;
  • utility software 实用程序 — small tools that look after the computer (for example anti-virus, backup, disk clean-up).

Below the operating system sits firmware 固件 — software stored permanently on ROM or flash that runs the moment the computer is switched on. The BIOS and the bootloader 引导程序 are firmware: they test the hardware and then load the operating system. So the layers stack up hardware → firmware → operating system → application software, each running on the layer below.

Application software

Application software 应用软件 lets the user do a useful task. Examples:

  • word processing 文字处理 software (writing documents);
  • spreadsheet 电子表格 software (working with numbers in a grid);
  • database management system 数据库管理系统 (storing and searching data);
  • web browser 网页浏览器 (viewing web pages).
System software Application software
Job runs and manages the computer helps the user do a task
Used by the computer (in the background) the user (directly)
Examples operating system, drivers, utilities word processor, browser, games
Vocabulary Train
English Chinese Pinyin
System software 系统软件 xì tǒng ruǎn jiàn
operating system 操作系统 cāo zuò xì tǒng
compiler 编译器 biān yì qì
linker 链接器 liàn jiē qì
device driver 设备驱动程序 shè bèi qū dòng chéng xù
utility software 实用程序 shí yòng chéng xù
firmware 固件 gù jiàn
bootloader 引导程序 yǐn dǎo chéng xù
Application software 应用软件 yìng yòng ruǎn jiàn
word processing 文字处理 wén zì chǔ lǐ
spreadsheet 电子表格 diàn zi biǎo gé
database management system 数据库管理系统 shù jù kù guǎn lǐ xì tǒng
web browser 网页浏览器 wǎng yè liú lǎn qì
4.1

The operating system

An operating system (OS) is the main system software. It controls the whole computer and lets the hardware, the application software and the user work together. Without an OS the computer is very hard to use.

Four stacked layers — user on top, then application software, then operating system, then hardware at the base The operating system sits between the hardware and the application software and user, letting them work together

The OS has many roles:

  • managing files — saving, opening, naming, moving and deleting files;
  • handling interrupts (see below);
  • providing a user interface 用户界面 so the user can control the computer;
  • managing memory — deciding what is kept in RAM and where;
  • managing peripherals 外围设备 and their drivers — controlling devices like printers;
  • managing multitasking 多任务处理 — letting several programs run at once;
  • providing a platform 平台 for running application software;
  • managing security — user accounts, passwords and access rights.
Vocabulary Train
English Chinese Pinyin
providing a user interface 用户界面 yòng hù jiè miàn
managing peripherals 外围设备 wài wéi shè bèi
managing multitasking 多任务处理 duō rèn wù chǔ lǐ
providing a platform 平台 píng tái
user interface 用户界面 yòng hù jiè miàn
peripherals 外围设备 wài wéi shè bèi
multitasking 多任务处理 duō rèn wù chǔ lǐ
platform 平台 píng tái
4.1

Interrupts

An interrupt 中断 is a signal sent to the processor 处理器 to tell it that something needs attention now.

An interrupt can come from three sources:

  • hardware — for example a key is pressed, or a printer runs out of paper;
  • software — for example a program tries to divide by zero;
  • the user — for example the user presses a "cancel" key.

When an interrupt arrives, the processor stops what it is doing, saves its place, and services (deals with) the interrupt. When that is done, it goes back to what it was doing before. This lets the computer react quickly to important events.

A cycle: main program running, then on an interrupt the CPU saves its state, runs the interrupt service routine, restores state and resumes On an interrupt the CPU saves its place, runs the interrupt service routine, then restores its place and carries on

Explore

How the CPU handles an interrupt

Step through an interrupt. The CPU pauses what it's doing, deals with the urgent event, then carries on exactly where it left off — which is how one processor juggles the keyboard, printer and timer at once.

Vocabulary Train
English Chinese Pinyin
interrupt 中断 zhōng duàn
processor 处理器 chǔ lǐ qì
4.2

Programming languages

Syllabus
Candidates should be able to: Notes and guidance
1 Explain what is meant by a high-level language and a low-level language, including the advantages and disadvantages of each • Advantages and disadvantages include: – ease of reading and writing code, e.g. low-level is hard to read – ease of debugging code – machine independence – direct manipulation of hardware
2 Understand that assembly language is a form of low-level language that uses mnemonics, and that an assembler is needed to translate an assembly language program into machine code
3 Describe the operation of a compiler and an interpreter, including how high-level language is translated by each and how errors are reported • A compiler translates the whole code at once before executing it, producing an executable file • An interpreter translates and executes the code line-by-line • A compiler provides an error report for the whole code if errors are detected • An interpreter stops execution when an error is found
4 Explain the advantages and disadvantages of a compiler and an interpreter • Including an understanding that an interpreter is mostly used when developing a program and a compiler is used to translate the final program
5 Explain the role of an IDE in writing program code and the common functions IDEs provide • Including: – code editors – run-time environment – translators – error diagnostics – auto-completion – auto-correction – prettyprint

Source: Cambridge International syllabus

All computers process data using the central processing unit 中央处理器 (CPU). To make the CPU do work, people write programs in a programming language 编程语言. There are two kinds.

High-level languages

A high-level language 高级语言 is written in words that look a bit like English (for example Python). It is:

  • easy for people to read, write and fix;
  • independent of the computer — the same program can run on different types of computer.

Low-level languages

A low-level language 低级语言 is close to what the hardware actually uses. It includes:

  • machine code 机器码 — instructions written in binary (0s and 1s), which the CPU runs directly;
  • assembly language 汇编语言 — machine code written with short word codes (mnemonics) instead of binary.

A low-level language relates to the specific 特定的 type of CPU, so a program written for one CPU may not run on another. It is used when the programmer needs full control of the hardware or very fast, small code.

Three stacked layers: high-level language at the top, then assembly, then machine code at the bottom High-level languages are close to human language and run on any computer; low-level languages (assembly and machine code) are close to the hardware and tied to one type of CPU

Explore

Computing concept lab

Classify concrete examples by the computing idea they demonstrate.

Vocabulary Train
English Chinese Pinyin
central processing unit 中央处理器 zhōng yāng chǔ lǐ qì
programming language 编程语言 biān chéng yǔ yán
high-level language 高级语言 gāo jí yǔ yán
low-level language 低级语言 dī jí yǔ yán
machine code 机器码 jī qì mǎ
assembly language 汇编语言 huì biān yǔ yán
specific 特定的 tè dìng de
4.2

Translators

The CPU can only run machine code. A high-level program must first be changed into machine code. The software that does this is a translator 翻译程序. There are three types: a compiler and an interpreter (for high-level code), and an assembler (for low-level code).

Compiler

A compiler translates the whole program into machine code before it is run. After translating, the machine code can be run many times without translating again.

  • translation happens once, in full;
  • it reports all the errors together, at the end of translating;
  • the finished program runs fast and does not need the compiler to run.

Interpreter

An interpreter 解释器 translates and runs the program one line at a time.

  • it stops at the first error it finds, which helps when testing;
  • the program runs more slowly, because it is translated each time it runs;
  • the interpreter must be present every time the program runs.
Compiler Interpreter
Translates the whole program at once one line at a time
Errors all reported at the end stops at the first error
Speed of finished program faster slower
Needed to run later? no yes

Use a compiler when you want to share a fast, finished program. Use an interpreter when you are writing and testing a program and want to find errors easily.

Assembler

An assembler 汇编器 translates a low-level assembly-language program (written in mnemonics such as LDA, ADD) into machine code. Each mnemonic becomes one machine instruction — a direct one-to-one translation, unlike a compiler or interpreter, which work on high-level code.

Compiler translating a whole program once into machine code that runs many times, versus an interpreter translating and running one line at a time A compiler translates the whole program once into machine code; an interpreter translates and runs one line at a time

Worked example. A team is writing a program. While developing it they want to find and fix errors quickly; when they ship it they want customers to run it fast without seeing the source code. Which translator suits each stage? While developing, use an interpreter: it translates and runs one line at a time and stops at the first error, so a mistake is easy to locate. To ship, use a compiler: it translates the whole program once into machine code, which then runs quickly with no translator present, and the customer receives only the executable rather than the source. The two are not rivals - name the stage and give the reason, because "a compiler is faster" on its own earns nothing.

Vocabulary Train
English Chinese Pinyin
translator 翻译程序 fān yì chéng xù
interpreter 解释器 jiě shì qì
assembler 汇编器 huì biān qì
4.2

Integrated development environment (IDE)

An integrated development environment 集成开发环境 (IDE) is software that helps you write programs. It puts many useful tools in one place:

  • a code editor 代码编辑器 — for typing in your program;
  • a run time environment 运行时环境 — for running the program to test it;
  • a translator — a compiler or interpreter to turn your code into machine code;
  • error diagnostics 错误诊断 — messages that help you find and understand mistakes;
  • auto-completion 自动补全 and auto-correction 自动纠错 — the IDE finishes or fixes code as you type;
  • prettyprinting 美化打印 — laying out the code neatly with colour and indentation so it is easy to read.
Vocabulary Train
English Chinese Pinyin
integrated development environment 集成开发环境 jí chéng kāi fā huán jìng
code editor 代码编辑器 dài mǎ biān jí qì
run time environment 运行时环境 yùn xíng shí huán jìng
error diagnostics 错误诊断 cuò wù zhěn duàn
auto-completion 自动补全 zì dòng bǔ quán
auto-correction 自动纠错 zì dòng jiū cuò
prettyprinting 美化打印 měi huà dǎ yìn
4.2

Exam tips

  • Hardware is the physical parts; software is the programs. System software runs the computer (OS, drivers, utilities); application software does a task for the user.
  • A compiler translates the whole program at once (the finished program runs fast, and all errors are reported at the end); an interpreter translates line by line (it stops at the first error, runs slower, and is needed every time).
  • High-level languages are close to English and run on any computer; low-level languages (assembly, machine code) are tied to one type of CPU.
  • An interrupt is a signal that makes the CPU stop, save its place, service the event, then carry on where it left off.
  • Learn the operating system's roles: managing files, memory, peripherals, multitasking, security and the user interface.

Log in or create account

IGCSE & A-Level