CPU Architecture and the Fetch–Decode–Execute Cycle: Question 5

Syllabus 3.1

Structured 6 marks

An electronics hobbyist buys a single-board computer for a robotics project. The board's spec sheet states: "Single microprocessor, instruction set of 58 machine-code instructions, clock speed 1.4 GHz."

(a) State what is meant by a microprocessor. [1]

(b) State what is meant by the instruction set of a CPU, referring to the spec sheet above. [2]

(c) The hobbyist writes their robot's control program in a high-level language, but the CPU can only directly execute the 58 instructions in its instruction set. Explain why the hobbyist's program must be translated before the CPU can run it. [3]

Show worked solution Hide worked solution

Worked solution

Part (a): What a microprocessor is

A microprocessor is a single integrated circuit, one chip, that contains a complete central processing unit. It is what allows a small device like this single-board computer to have full CPU functionality on one compact component.

Part (b): What an instruction set is

The instruction set is the complete list of machine-code commands that a CPU is designed to recognise and carry out directly. [1] Applying this to the spec sheet, it means the board’s CPU has exactly 58 such machine-code instructions built into it. It is not able to directly carry out any command outside that fixed list of 58. [1]

Part (c): Why the program must be translated

A CPU’s hardware is only able to fetch, decode and execute instructions written in machine code, using the specific instructions from its own instruction set. [1] The hobbyist’s control program is written in a high-level language, whose statements are far more human-readable but are not directly recognised by the CPU circuitry at all. [1] Because none of the high-level statements are already one of the 58 machine-code instructions, the whole program must first be translated, for example by a compiler or an interpreter, into machine code drawn from the CPU’s instruction set, before the CPU is able to fetch, decode and execute any of it. [1]

Final answers

  • (a) A microprocessor is a single chip containing a complete CPU.
  • (b) The instruction set is the fixed list of machine-code commands a CPU can carry out directly, 58, in this case.
  • (c) The program must be translated into machine code because the CPU can only directly execute instructions from its own instruction set, not high-level language statements.