The shape of the lesson
By the end of the lesson, learners can
- The instruction set: In the lab, pick an opcode and see how the instruction is built from binary.
- Embedded systems: An embedded system is a computer system inside another device.
- 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.
- Instruction set: all the machine code commands a CPU can process.
- Instruction: opcode (what to do) and operand (data or address).
- Embedded: dedicated function, built into a device, small, cheap, low power, fixed program.
- General purpose: PC or laptop, many functions, user installs software.
One picture every idea returns to
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.
Forty-five minutes, phase by phase
| Time | Phase | What happens in the room | Grouping |
|---|---|---|---|
| 0 to 5 min | Hook: predict | Open with the question in the title, One job, done well.. A CPU only understands a fixed list of machine code commands: its instruction set. Put the figure on the board: it is the one picture every idea in the lesson returns to. | Whole class, then pairs |
| 5 to 13 min | Teach and check: The instruction set | In the lab, pick an opcode and see how the instruction is built from binary. Project tab 4 of the lab (Instruction sets and embedded systems) and let a student drive it while the class predicts. | Whole class, then pairs |
| 13 to 21 min | Teach and check: Embedded systems | An embedded system is a computer system inside another device. Your turn: Give two characteristics of an embedded system. | Pairs |
| 21 to 30 min | Teach and check: 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. Model the worked example Embedded or not? on the board, one line at a time. | Rally Robin |
| 30 to 36 min | Check | The four Stage 1 questions from the student lesson, answered on mini whiteboards or by show of fingers. Re-teach the one most get wrong. | Individual, then whole class |
| 36 to 43 min | Plenary | The exam-style questions from Stage 2, one at a time: thirty seconds alone, then a random call. The feedback lines in the key give the examiner's wording. | Individual, random call |
| 43 to 45 min | Exit and homework | Set the worksheet below (6 questions, 14 marks). Learners self-assess against the objectives before they leave. | Individual |
Protect the parts that carry the learning
The sequence carries about fifty minutes of material, so the lab is driven by one student while the class predicts rather than explored freely. Times are a guide.
Protected: the check at 30 minutes. It is the only individual read on whether the key idea landed, and it is not cut.
Cut first if the build overruns: the last check in Where they are used, never the check or the plenary.
In a 60 minute block: run worksheet questions 1 to 3 in class as a Rally Coach set and model both the hardest worked example and its check live.
Rally Robin
Pairs take turns to say one item each, back and forth: a definition, a unit, a step of the method. Keep it fast and oral; the point is retrieval, not writing.
The full structure, with its variations and the other twelve, is on the cooperative-learning page.
What to head off, and how
| Trap learners fall into | Teaching move that pre-empts it |
|---|---|
| Different types of CPU can have different instruction sets, so machine code written for one type of processor may not run on another. | Return to The instruction set: ask a pair to state the correct version and show it on the lab before moving on. |
| 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. |
Instruction sets and embedded systems: worksheet
6 questions, 14 marks. Written in the style of the papers; no past paper question is reproduced.
State what is meant by an instruction set and give the form its commands are in.
An instruction is made of an opcode and an operand. Describe each part.
Describe what is meant by an embedded system.
Identify three devices that commonly contain an embedded system.
Explain three differences between an embedded system and a general purpose computer such as a laptop.
A smart thermostat controls the heating in a house. Explain why it is an example of an embedded system.
Answer key and marking notes
- A list of all the commands that can be processed by a CPU.
- The commands are machine code (binary).
- Opcode: the operation to be carried out (for example ADD or LOAD).
- Operand: the data, or the address of the data, the operation uses.
- A computer system (microprocessor) built into a larger device.
- That performs a dedicated function.
- Any three, e.g. washing machine / microwave / fridge.
- Car (engine management, ABS, airbags) / security system.
- Lighting system / vending machine / traffic lights.
- Embedded performs one dedicated function; a laptop performs many different functions.
- Embedded usually has a fixed program in ROM; a laptop user can install and run different software.
- Embedded is usually smaller, cheaper and uses less power than a laptop.
- It is a microprocessor built into the heating system/device.
- It performs one dedicated function: reading the temperature and switching the heating on or off.
6 multiple-choice questions on this lesson
From the topic question bank. Assign them in the app for a marked score in your gradebook, or run the topic as a class game.
What is an instruction set?
- Athe list of all the machine code commands that a particular CPU can process
- Bthe set of programs that are installed on a computer
- Cthe order in which the fetch, decode and execute stages happen
- Dthe rules for writing a program in a high-level language
In the instruction ADD 26, what is 26?
- Athe operand: the address of the data to use
- Bthe opcode: the operation to carry out
- Cthe instruction set: the list of commands
- Dthe program counter: the next address
Which device contains an embedded system?
- Aa microwave oven
- Ba laptop
- Ca desktop PC
- Da tablet that runs apps
A machine code program runs on one computer but will not run on another computer that has a different type of processor. What is the most likely reason?
- AThe two processors have different instruction sets
- BThe second computer does not have enough secondary storage
- CMachine code can only ever run once before it must be translated again
- DThe second processor has a lower clock speed
A simple CPU uses 8-bit instructions. The first 3 bits are the opcode and the remaining 5 bits are the operand. What is the greatest number of different commands its instruction set can contain?
- A8
- B32
- C256
- D6
Which set of characteristics best describes a typical embedded system, such as the controller in a car's anti-lock brakes?
- Adedicated function, low power, program held in ROM, responds quickly to sensor inputs
- Bgeneral purpose, high power, user installs new programs, large touch screen interface
- Cdedicated function, high cost, program loaded from a hard disk each time it starts
- Dgeneral purpose, low power, program stored in RAM so the driver can change it
Quiz key
An instruction set is the complete list of commands (in machine code) that a CPU is designed to decode and execute, such as load, add, store, compare and jump. The installed programs are software, not the instruction set. The FDE order is the cycle, and the rules of a high-level language are its syntax: such programs must be translated into the instruction set before they run.
An instruction is made of an opcode (here ADD, the operation) and an operand (here 26, the data or the address of the data to use). 26 is not the operation, so it is not the opcode. The instruction set is the whole list of commands the CPU knows, and the PC is a register, not part of the instruction.
The microprocessor in a microwave oven is built into the appliance and performs one dedicated function (controlling the cooking), so it is an embedded system. A laptop, desktop PC and app-running tablet all contain microprocessors, but they are general purpose computers able to run many different programs.
Machine code uses commands from one CPU's instruction set. A different type of processor may have a different instruction set, so it cannot decode those commands. A small program does not need much storage; machine code can be run again and again without retranslation; and a slower clock would make the program run more slowly, not stop it running.
Each opcode pattern is a different command, and 3 bits give 23 = 8 patterns. 32 is 25, the number of different operands (addresses 0 to 31), not commands. 256 is 28, using the whole instruction as if it were all opcode, and 6 doubles 3 instead of raising 2 to the power 3.
An embedded system performs one dedicated task, uses little power, keeps a fixed program in ROM (firmware) and often reacts in real time to sensors, as brakes must. 'General purpose' with user-installed programs describes a PC or laptop. Embedded systems are low cost and do not normally boot from a hard disk, and their program is not in RAM where it would be lost without power.
What to project
The student lesson embeds these tabs. Open them full screen on the projector; every slider has a drag handle on the stage.
Slides for this lesson
A projectable deck for every pack is on the way. Until then, present the student lesson full screen: its sections, figure and lab tabs follow the same order as the plan above.