HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
The Processor and the Fetch-Decode-Execute Cycle
  1. 1The CPU, its units, registers and buses
  2. 2The fetch-decode-execute cycle
  3. 3Performance, instruction sets and embedded systems
  1. Computer Science
  2. /The Processor and the Fetch-Decode-Execute Cycle
  3. /Performance, instruction sets and embedded systems

Course 3.1·Lesson 3 of 3

Performance, instruction sets and embedded systems

Why is one processor faster than another? This lesson explains how the clock, the number of cores and the size of the cache change performance. It then explains the instruction set of a CPU, and what makes an embedded system different from a general purpose computer.

about 25 min1 simulation1 practice question
Lesson 3 of 3Show all lessonsHide
The Processor and the Fetch-Decode-Execute Cycle
  1. 1The CPU, its units, registers and buses
  2. 2The fetch-decode-execute cycle
  3. 3Performance, instruction sets and embedded systems

Try the code and the simulations beside the lesson.

Three things that change performance

Two laptops can run the same program at different speeds. Three parts of the CPU make most of the difference: the clock, the cores and the cache. The number of cores, the size of the cache and the speed of the clock can all affect the performance of a CPU.

The clock

The clock sends out a regular signal. Each tick starts the next small step of work, so every part of the CPU keeps in time.

The clock speed is the number of clock cycles in one second. It is measured in hertz (Hz). One hertz is one cycle each second. A clock of 3 GHz3\ \text{GHz}3 GHz (gigahertz) ticks 3 billion times each second.

A faster clock means more cycles each second, so more instructions can be carried out in the same time. A task of 12 billion cycles takes 12÷2=612 \div 2 = 612÷2=6 seconds at 2 GHz2\ \text{GHz}2 GHz, and 12÷4=312 \div 4 = 312÷4=3 seconds at 4 GHz4\ \text{GHz}4 GHz.

Cores

A core is one complete processing unit, with its own ALU, control unit and registers. Each core can fetch, decode and execute instructions on its own. A dual-core CPU has two cores. A quad-core CPU has four.

More cores means more instructions can be processed at the same time. But it does not always mean a proportional increase in speed. Some parts of a task must be done in order, one step after another, and only one core can do them. The cores also spend some time sharing out the work. So two cores do not always make a program twice as fast.

Cache

Cache is a small amount of very fast memory, in or very close to the CPU. It holds instructions and data that the CPU uses often, or is likely to use next. Fetching from cache is much quicker than fetching from RAM.

A larger cache can hold more of these instructions and data. Then the CPU finds what it needs in the cache more often and waits for RAM less often. So performance improves.

A diagram of a processor with four cores, labelled core 1 to core 4. Each core has its own small cache next to it. Below the cores is a larger shared cache, still inside the processor. Outside the processor, further away, is the main memory (RAM), joined to the processor by the buses.

The picture shows a CPU with four cores. Each core has its own small cache, and the cores share a larger cache. RAM is further away, outside the CPU.

The instruction set

Every CPU understands a fixed list of commands. This list is its instruction set. An instruction set is a list of all the commands that can be processed by a CPU, and the commands are machine code.

The LOAD, ADD, STORE and STOP of this course are a made-up instruction set. A real CPU has many more commands, each one a pattern of binary digits. A program must be in the machine code of the CPU that will run it.

Embedded systems

A washing machine has a processor. So does a car, a burglar alarm and a vending machine. None of them is a general purpose computer.

An embedded system is a computer system built into a larger device, to perform a dedicated function. The program of a washing machine only runs washes. It will not run a game.

  • Examples: domestic appliances such as a microwave oven, cars, security systems, lighting systems and vending machines.
  • Characteristics: it does one dedicated task, it is often small and low in cost, it uses little power, and it often runs with little or no input from a user.
  • The difference: a general purpose computer, such as a personal computer (PC) or a laptop, is used to perform many different functions. You can install new programs on it.

Practise with new numbers

Try it in Python

The program uses a simple model. Each core does one instruction in each clock cycle. Three quarters of the work can be shared between cores, and the rest cannot. It prints the time at two clock speeds and four numbers of cores.

Read it first. Then run it. Does going from 4 to 8 cores halve the time?

1. Change shared = 0.75 to shared = 1. What happens to the time when the cores double now?

2. Change it to shared = 0. Do the cores help at all?

Common mistakes

  • Saying more cores always doubles the speed. Only the work that can be shared between cores speeds up.
  • Calling cache "the hard disk". Cache is a small, fast memory in or near the CPU.
  • Mixing up clock speed and cores. Clock speed is how many cycles each second. The number of cores is how many processing units there are.
  • Calling a laptop an embedded system. A laptop runs many different programs, so it is general purpose.

Remember these

  • The clock speed is the number of cycles each second, in hertz. Faster clock, more instructions each second.
  • More cores, more instructions at the same time, but not always a proportional increase in speed.
  • Larger cache, fewer slow fetches from RAM.
  • An instruction set is the list of all the commands a CPU can process. They are machine code.
  • An embedded system performs a dedicated function inside a larger device.

Check yourself

Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.

  1. A CPU has a clock speed of 2.5 GHz2.5\ \text{GHz}2.5 GHz. How many clock cycles is that each second?
  1. Why can a larger cache make a computer faster?
  1. A program runs no faster on four cores than on one core. Give one reason.
  1. What is an instruction set?
  1. Is a smart television remote control an embedded system or a general purpose computer? Explain.

References

  • Cambridge International, IGCSE Computer Science 0478 syllabus (2026, 2027 and 2028), section 3.1 Computer architecture, outcomes 3 to 5: cores, cache and clock, the instruction set and embedded systems.

Enroll free in The Processor and the Fetch-Decode-Execute Cycle

Every lesson is open to read. Enrolling also lets you:

  • Mark lessons done and carry on where you stopped.
  • Take the tests of this lesson and its course.
  • Count the course towards the certificate for its chapter.
No payment. You can leave at any time.

Problems (4)

A games console has a processor with a clock speed of 3.6 GHz…Easy · High School (9–10) · by StemPy Lab
A video editing task needs 20 billion clock cycles of work on one core…Medium · High School (9–10) · by StemPy Lab
A program makes 1000 fetches of instructions and data…Medium · High School (9–10) · by StemPy Lab
That was the last lessonBack to the course: take the test
← The Processor and the Fetch-Decode-Execute Cycle
← The fetch-decode-execute cycleNext →

Discussion (0)

Log in to join the discussion.

Loading…

1 Python program
5 questions to check yourself

This lesson is free to read. Enroll free to keep your place and take the tests.

A company makes a fridge that keeps its inside at 4 °C…Medium · High School (9–10) · by StemPy Lab

Python Labs (1)

Clock speed, cores and timePython Lab · by StemPy Lab

Question Sets (1)

Inside the Processor: Check Your Understanding10 questions · by StemPy Lab

Notes (1)

The Processor and the Fetch-Decode-Execute Cycle: Quick RevisionNote · by StemPy Lab