A computer system is made of two parts that work together.
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.
The motherboard and the parts attached to it are hardware — the physical parts you can touchAn operating system is software — the programs that tell the hardware what to do
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.
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);
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.
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.
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.
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.
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
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.
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.
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.
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.
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.