A CPU only understands a fixed list of machine code commands: its instruction set. Many CPUs never sit inside a PC at all. They are built into washing machines, cars and vending machines, each doing one dedicated job.
An instruction set is the list of all the commands that a CPU can process. The commands are machine code (binary), each usually made of an opcode (the operation) and an operand (the data or address to use). An embedded system is a microprocessor-based system built into a larger device to perform a dedicated function, for example in a washing machine, car, security system, lighting system or vending machine. A general purpose computer, such as a PC or laptop, performs many different functions.
Fig. 1: a machine code instruction, and an embedded system compared with a general purpose computer
Section 01
The instruction set.
In the lab, pick an opcode and see how the instruction is built from binary. The CPU is designed to recognise every command in its instruction set, and nothing else.
Instruction set: the complete list of commands (machine code instructions) a particular CPU can decode and execute, such as load, add, store, compare and jump.
Machine code: instructions written in binary that the CPU can execute directly, with no translation.
Opcode and operand: the opcode says what operation to do; the operand gives the data, or the address of the data, to use.
Purpose: every program, whatever language it was written in, must be translated into commands from the CPU's instruction set before it can run.
Examiner trap
Different types of CPU can have different instruction sets, so machine code written for one type of processor may not run on another.
Section 02
Embedded systems.
An embedded system is a computer system inside another device. It has a microprocessor (or microcontroller), some memory and the inputs and outputs it needs for its one job.
Dedicated function: it does one specific task, such as controlling a wash cycle or the brakes in a car.
Small and low cost: it only needs enough processing power and memory for its task, so it is cheap to make in large numbers.
Low power: it uses little electricity, so it can run for long periods or on batteries.
Fixed program: its program is usually stored in ROM (firmware) and the user cannot install new software, although some can be updated by the manufacturer.
Reliable, often real time: it responds quickly to inputs from sensors and controls outputs, often with little or no user interface.
Your turn
Give two characteristics of an embedded system.
Any two: performs a dedicated function; small; low cost; low power use; program stored in ROM that the user cannot change; built into a larger device.
Stage 1 · Learn
Check what the sim just showed you
Four quick checks. Each correct answer earns XP and records this skill on your profile.
Quick check+10 XP
What is an instruction set?
Quick check+10 XP
In the lab, which part of an instruction says what operation to carry out?
Quick check+10 XP
Which device is most likely to contain an embedded system?
Quick check+10 XP
Which is a characteristic of an embedded system?
Section 03
Where they are used.
Exam questions often give a list of devices and ask which contain an embedded system, or ask you to explain why a device is embedded rather than general purpose.
Explain why the computer in a vending machine is an embedded system.
It is built into a larger device (the vending machine).
It performs one dedicated function: taking payment, reading the selection and releasing the item.
It runs a fixed program; the user cannot use it for anything else.
Answer: It is a dedicated system built into the machine
Examiner trap
A laptop is not an embedded system even though it contains a microprocessor. Being general purpose, able to run many different programs, is what makes it different.
Stage 2 · Exam
Exam-style questions
Unlocks once the four checks above are done. Worth more XP, written to IGCSE Paper 1 standard.
Finish the four checks above to unlock the exam questions
Exam style+20 XP
In what form are the commands in an instruction set?
Exam style+20 XP
Which describes a general purpose computer?
Exam style+20 XP
Why is an embedded system usually cheaper than a general purpose computer?
Exam style+20 XP
Which list contains only embedded systems?
Skill unlocked
Instruction sets and embedded systems, mastered.
This skill is now recorded on your profile. Keep the chain going.