logo

Cambridge IGCSE Computer Science revision notes

Computer architecture Revision Notes

Cambridge IGCSE revision notes for Computer architecture.

At a glance

revision notes

Resource type

Topic

Computer architecture

CambridgeIGCSEComputer ScienceSubject content

Complete revision guide 1 of 5

Function of the Central Processing Unit (CPU) and Definition of a Microprocessor

This note explains the role of the CPU as the core component that executes instructions and processes data within a computer system. It also defines a microprocessor as an integrated circuit that contains the CPU's functions on a single chip, highlighting its significance in modern computing devices.

Syllabus source

Section 3, Topic 3.1, page 16, objective 3.1.1

Open source document ↗

What you should be able to do

  • ✓Understand the primary function of the CPU in a computer system.
  • ✓Identify the main components within the CPU that enable it to perform its tasks.
  • ✓Define what a microprocessor is and how it relates to the CPU.
  • ✓Explain how the CPU interacts with other parts of the computer to execute instructions.
  • ✓Recognize the importance of the CPU and microprocessor in everyday computing devices.
1

Role of the CPU in a Computer

The Central Processing Unit (CPU) is often described as the 'brain' of the computer because it is responsible for executing instructions and processing data. Every task a computer performs, from running applications to managing hardware, depends on the CPU interpreting and carrying out program instructions stored in memory.

The CPU fetches instructions from the computer's memory, decodes what actions are required, and then executes those instructions. This cycle repeats continuously while the computer is powered on and running programs.

Without the CPU, a computer cannot function because there would be no component to process data or control other parts of the system.

  • Executes instructions from programs.
  • Processes data and controls hardware components.
  • Coordinates the operation of the entire computer system.
2

Main Components of the CPU

The CPU consists of several key parts that work together to perform its functions:

The Arithmetic Logic Unit (ALU) performs all arithmetic calculations (such as addition and subtraction) and logical operations (such as comparisons).

The Control Unit (CU) manages the flow of data within the CPU and between the CPU and other components. It directs the fetching, decoding, and execution of instructions by sending control signals to other parts of the computer system.

  • Arithmetic Logic Unit (ALU) for calculations and logic.
  • Control Unit (CU) for managing instruction execution.
  • Registers for temporarily holding data and instructions.
3

Registers and Their Role

Registers are small, fast storage locations within the CPU that temporarily hold data, instructions, or addresses during processing. They enable quick access to data that the CPU needs immediately, improving processing speed.

For example, when adding two numbers, the CPU might load the numbers into registers, perform the addition in the ALU, and then store the result back in a register before writing it to memory.

Registers are essential for efficient instruction execution and data manipulation within the CPU.

  • Hold data and instructions temporarily.
  • Enable fast access during processing.
  • Support the fetch-decode-execute cycle.
4

Definition and Significance of a Microprocessor

A microprocessor is a single integrated circuit (chip) that contains the entire CPU. It combines the ALU, control unit, and registers on one small piece of silicon.

Microprocessors are the foundation of modern computers and many electronic devices because they provide the processing power in a compact, efficient form.

For example, the microprocessor inside a smartphone controls all the operations, from running apps to managing sensors and communication modules.

  • An integrated circuit containing the CPU components.
  • Enables compact and efficient processing units.
  • Used in computers, smartphones, embedded systems, and more.
5

How the CPU and Microprocessor Work Together

The CPU performs the essential task of executing instructions, while the microprocessor is the physical hardware that implements the CPU's functions.

In early computers, the CPU was made from multiple separate components, but modern CPUs are microprocessors, making devices smaller, faster, and more reliable.

Understanding that the microprocessor is the CPU in chip form helps clarify how computing power is embedded in various devices beyond traditional computers.

  • CPU is the functional unit; microprocessor is the physical chip.
  • Microprocessors integrate CPU functions into a single chip.
  • This integration allows for compact and powerful computing devices.

At-a-glance summary

Comparison table

StepDetailExampleExam use
FetchCPU retrieves an instruction from memoryCPU reads an instruction stored at memory address 1000Explain how the CPU obtains instructions
DecodeCPU interprets the instructionCPU determines the instruction is to add two numbersDescribe the role of the control unit
ExecuteCPU performs the instructionALU adds two numbers stored in registersIdentify the function of the ALU
Store resultCPU writes the result back to memory or registerSum stored in register for later useExplain how registers support processing

Active recall

Quick check

1. What is the primary function of the CPU?

To execute instructions from programs and process data.

2. Name two main components inside the CPU and their roles.

The Arithmetic Logic Unit (ALU) performs calculations and logic; the Control Unit (CU) manages instruction execution and controls data flow.

3. What is a microprocessor?

A microprocessor is an integrated circuit chip that contains the CPU's functions.

4. Why are registers important in the CPU?

They temporarily hold data and instructions for quick access during processing.

Complete revision guide 2 of 5

Functions of CPU Components and the Fetch-Decode-Execute Cycle

This note explains the roles of the main components within a CPU based on the Von Neumann architecture and details the fetch-decode-execute cycle, illustrating how instructions are processed step-by-step.

Syllabus source

Section 3, Topic 3.1, page 16, objective 3.1.2

Open source document ↗

What you should be able to do

  • ✓Identify the main components of a CPU in Von Neumann architecture.
  • ✓Explain the function of the Arithmetic Logic Unit (ALU), Control Unit (CU), and registers.
  • ✓Describe the fetch-decode-execute cycle and the role of each CPU component during this process.
  • ✓Understand how the Program Counter (PC) and Memory Address Register (MAR) coordinate instruction fetching.
  • ✓Recognise how the CPU executes instructions sequentially and manages data flow internally.
1

Overview of the Von Neumann CPU Architecture

The Von Neumann architecture is a foundational model for most modern computers. It features a single memory space that stores both instructions (program code) and data. The central processing unit (CPU) is the core component responsible for executing instructions stored in memory.

Within the CPU, three main components work together: the Arithmetic Logic Unit (ALU), the Control Unit (CU), and registers. These components collaborate to process instructions and manipulate data efficiently.

  • Single memory stores both data and instructions.
  • CPU contains ALU, CU, and registers.
  • CPU fetches and executes instructions sequentially.
2

Functions of CPU Components

Each CPU component has a specific role: the ALU performs all arithmetic (such as addition and subtraction) and logical operations (such as comparisons). The Control Unit orchestrates the entire process by directing data flow and managing the execution of instructions. Registers are small, fast storage locations inside the CPU that temporarily hold data, instructions, or addresses during processing.

Key registers include the Program Counter (PC), which holds the address of the next instruction to fetch, and the Memory Address Register (MAR), which holds the address of the memory location currently being accessed. The Memory Data Register (MDR) temporarily stores data read from or written to memory.

  • ALU executes arithmetic and logic operations.
  • CU controls instruction execution and data flow.
  • Registers temporarily hold data and addresses.
  • PC tracks the next instruction address.
  • MAR holds the memory address to access.
  • MDR holds data being transferred to/from memory.
3

The Fetch-Decode-Execute Cycle Explained

The fetch-decode-execute (FDE) cycle is the continuous process by which the CPU runs instructions. It consists of three main stages:

1. Fetch: The CPU uses the Program Counter (PC) to find the address of the next instruction. This address is copied to the Memory Address Register (MAR). The instruction stored at that memory address is then read into the Memory Data Register (MDR). Finally, the instruction is transferred to the Current Instruction Register (CIR) for decoding. The PC is incremented to point to the next instruction.

2. Decode: The Control Unit interprets the instruction in the CIR, determining what operation is required and which operands are involved. It prepares the necessary components for execution, such as selecting registers or setting control signals for the ALU or memory access operations. 3. Execute: The ALU or other CPU components carry out the instruction. This might involve performing calculations, moving data between registers, or reading/writing memory. The result may be stored back in a register or memory. After execution, the cycle repeats for the next instruction.

  • Fetch: Retrieve instruction from memory using PC and MAR.
  • Decode: CU interprets instruction and prepares execution.
  • Execute: ALU or CPU components perform the operation.
  • PC increments to next instruction address.
  • Cycle repeats continuously during program run.
4

Example of the FDE Cycle in Action

Consider a simple instruction: ADD R1, R2, R3 — which means add the contents of registers R2 and R3, then store the result in R1.

Fetch: The CPU fetches this instruction from memory at the address in the PC.

Decode: The CU decodes the instruction and recognises it as an addition operation involving registers R2 and R3, with the result to be stored in R1. Execute: The ALU adds the values in R2 and R3. The sum is then stored in R1. The PC increments to the next instruction address, ready to fetch the next instruction.

  • Instruction: ADD R1, R2, R3.
  • Fetch instruction from memory.
  • Decode operation and operands.
  • Execute addition in ALU.
  • Store result in R1.
  • Increment PC for next instruction.
5

Importance of the FDE Cycle and CPU Components

Understanding the FDE cycle and CPU components is essential because it reveals how a computer processes instructions at the hardware level. The cycle ensures instructions are handled one at a time in a controlled sequence, allowing complex programs to run correctly.

Each CPU component plays a vital role: the ALU performs the actual data manipulation, the CU manages the process flow, and registers provide quick access to data and addresses. This organisation allows the CPU to operate efficiently and reliably.

  • FDE cycle controls instruction processing.
  • ALU performs calculations and logic.
  • CU manages control signals and timing.
  • Registers provide fast temporary storage.
  • Together, they enable sequential program execution.

At-a-glance summary

Comparison table

StepDetailExampleExam Use
FetchRetrieve instruction from memory address in PCLoad instruction at address 1000 into MDRExplain how PC and MAR work together
DecodeCU interprets instruction and prepares control signalsCU decodes ADD instruction to add two registersDescribe CU role in decoding
ExecuteALU or CPU components perform operationALU adds values from R2 and R3, stores in R1State ALU function during execution
Increment PCPC updates to next instruction addressPC changes from 1000 to 1001 after fetchMention PC increment after fetch
Repeat cycleProcess repeats for next instructionNext instruction fetched at address 1001Outline continuous nature of FDE cycle

Active recall

Quick check

1. What is the role of the Program Counter during the fetch stage?

It holds the memory address of the next instruction to be fetched.

2. Which CPU component performs arithmetic operations?

The Arithmetic Logic Unit (ALU).

3. What does the Control Unit do during the decode stage?

It interprets the fetched instruction and prepares control signals for execution.

4. After executing an instruction, where is the result typically stored?

In a register or memory location specified by the instruction.

5. Why does the Program Counter increment after fetching an instruction?

To point to the address of the next instruction to be fetched in the following cycle.

Complete revision guide 3 of 5

Understanding CPU Performance: Core, Cache, and Clock Speed

This note explains how the core count, cache memory, and clock speed of a CPU affect its overall performance, with clear examples and reasoning to aid comprehension and exam preparation.

Syllabus source

Section 3, Topic 3.1, page 16, objective 3.1.3

Open source document ↗

What you should be able to do

  • ✓Define what a CPU core is and explain how multiple cores improve performance.
  • ✓Describe the role of cache memory in a CPU and how it reduces data access time.
  • ✓Explain clock speed and how it influences the number of instructions executed per second.
  • ✓Understand how these three factors interact to determine CPU efficiency and speed.
1

CPU Cores: The Building Blocks of Processing Power

A core is an individual processing unit within a CPU capable of executing instructions independently. Modern CPUs often contain multiple cores, such as dual-core, quad-core, or even octa-core processors.

Having multiple cores allows a CPU to perform several tasks simultaneously, known as parallel processing. For example, a quad-core CPU can handle four separate instruction streams at once, improving multitasking and speeding up programs designed to use multiple cores.

However, not all software benefits equally from multiple cores; some applications are single-threaded and mainly use one core. Therefore, more cores improve performance primarily when running multiple programs or software optimized for parallelism.

  • Single core executes one instruction stream at a time.
  • Multiple cores enable parallel processing and multitasking.
  • Software must be designed to use multiple cores effectively.
2

Cache Memory: High-Speed Data Storage Inside the CPU

Cache is a small amount of very fast memory located inside the CPU. It stores frequently used data and instructions to reduce the time needed to access this information compared to fetching it from the slower main memory (RAM).

There are typically multiple levels of cache (L1, L2, L3), with L1 being the smallest and fastest, closest to the cores, and L3 being larger but slower. The CPU checks the cache first when it needs data; if the data is found (a cache hit), it can proceed quickly.

For example, if a program repeatedly accesses the same variables or instructions, storing these in cache avoids delays caused by accessing RAM, thus improving overall CPU speed.

  • Cache stores frequently accessed data and instructions.
  • Multiple cache levels balance speed and size (L1 fastest, smallest; L3 slower, larger).
  • Cache hits reduce data access time, improving CPU efficiency.
3

Clock Speed: The CPU’s Operating Frequency

Clock speed, measured in gigahertz (GHz), indicates how many cycles the CPU can perform per second. Each cycle allows the CPU to execute parts of instructions or complete simple instructions.

For instance, a CPU with a clock speed of 3 GHz can perform 3 billion cycles per second. Generally, a higher clock speed means the CPU can process instructions faster, but this is not the only factor affecting performance.

Clock speed alone does not guarantee better performance if the CPU has fewer cores or smaller cache. Also, increasing clock speed raises power consumption and heat output, which can limit practical maximum speeds.

  • Clock speed is measured in GHz (cycles per second).
  • Higher clock speeds usually mean faster instruction execution.
  • Performance depends on clock speed combined with cores and cache.
4

Interplay of Core Count, Cache, and Clock Speed

CPU performance depends on the balance between cores, cache, and clock speed. For example, a CPU with many cores but low clock speed may excel at multitasking but perform slower on single-threaded tasks.

Similarly, a CPU with a high clock speed but small cache might process instructions quickly but suffer delays when accessing data from RAM.

An ideal CPU for a given use case balances these factors. For gaming, high clock speed and sufficient cache are important, while for video editing or running multiple applications, more cores improve performance.

  • Multiple cores improve multitasking and parallel processing.
  • Cache reduces delays caused by accessing main memory.
  • Clock speed determines how fast each core executes instructions.
  • Balanced CPU design depends on intended use and software optimization.

At-a-glance summary

Comparison table

ComponentFunctionExampleExam Use
CoreExecutes instructions independentlyQuad-core CPU runs four tasks simultaneouslyExplain how multiple cores improve multitasking
CacheStores frequently used data close to CPUL1 cache stores instructions for immediate useDescribe cache reducing data access time
Clock SpeedNumber of cycles per second CPU runs3 GHz means 3 billion cycles per secondExplain clock speed effect on instruction execution
Overall PerformanceCombination of cores, cache, and clock speedHigh clock speed + multiple cores + large cache = faster CPUEvaluate how these factors influence CPU efficiency

Active recall

Quick check

1. What is the role of a CPU core?

A core executes instructions independently, allowing the CPU to perform multiple tasks simultaneously if it has multiple cores.

2. How does cache improve CPU performance?

Cache stores frequently accessed data and instructions close to the CPU, reducing the time needed to fetch them from main memory.

3. What does a clock speed of 2.5 GHz mean?

It means the CPU can perform 2.5 billion cycles per second, with each cycle allowing instruction execution steps.

4. Why might a CPU with fewer cores but higher clock speed perform better on some tasks?

Because some tasks are single-threaded and benefit more from faster instruction execution per core than from multiple cores.

Complete revision guide 4 of 5

Understanding the CPU Instruction Set

The instruction set of a CPU is the complete collection of machine code commands that the processor can execute. It defines the operations available to the CPU, directly influencing its capabilities and performance.

Syllabus source

Section 3, Topic 3.1, page 16, objective 3.1.4

Open source document ↗

What you should be able to do

  • ✓Define what an instruction set is in the context of a CPU.
  • ✓Explain the role of machine code instructions within the instruction set.
  • ✓Describe how the instruction set affects CPU functionality and performance.
  • ✓Identify examples of operations included in a CPU's instruction set.
1

What is an Instruction Set?

An instruction set is a predefined list of all the commands that a CPU can understand and execute directly in machine code. Machine code consists of binary patterns that represent specific operations. Each instruction tells the CPU to perform a particular task, such as arithmetic calculations, data transfer, or controlling program flow.

For example, an instruction might tell the CPU to add two numbers stored in registers or to move data from memory to a register. The instruction set acts as the CPU’s vocabulary, defining what it can do at the most fundamental level.

  • Contains all machine code commands executable by the CPU.
  • Defines the CPU’s operational capabilities.
  • Is specific to each CPU architecture.
2

Components of an Instruction Set

Instruction sets typically include several categories of commands: arithmetic operations (like addition and subtraction), logic operations (such as AND, OR, NOT), data transfer instructions (moving data between registers and memory), and control instructions (like jumps and branches that alter the sequence of execution).

For example, a CPU might have an instruction to increment a register value by one or to compare two values and branch if one is greater. These instructions are encoded in binary and decoded by the CPU during execution.

  • Arithmetic and logic operations.
  • Data movement commands.
  • Control flow instructions (jumps, branches).
3

Significance of the Instruction Set

The instruction set determines what tasks a CPU can perform and how efficiently it can do them. A richer instruction set can allow more complex operations to be done with fewer instructions, potentially improving performance.

However, more complex instruction sets can also increase the CPU design complexity and execution time per instruction. Conversely, simpler instruction sets may require more instructions to perform a task but can be executed faster or with simpler hardware.

For example, Reduced Instruction Set Computing (RISC) CPUs use a smaller, simpler instruction set to achieve high performance through faster instruction execution.

  • Defines CPU capabilities and limitations.
  • Impacts CPU design complexity and speed.
  • Influences software compatibility and performance.
4

Instruction Set and Machine Code

Machine code is the binary representation of instructions from the instruction set. Each instruction has a unique binary code that the CPU fetches and executes during the fetch-decode-execute cycle.

For example, an instruction to add two registers might be represented as a specific 8-bit or 16-bit binary pattern. The CPU’s control unit decodes this pattern to activate the appropriate circuits to perform the operation.

Understanding machine code is essential for low-level programming and for understanding how software interacts directly with hardware.

  • Machine code encodes instructions in binary.
  • Each instruction corresponds to a unique binary pattern.
  • CPU decodes and executes machine code instructions.
5

Example Instruction Set Operations

Consider a simple CPU with the following instructions:

LOAD: Move data from memory to a register (e.g., LOAD R1, 1000).

ADD: Add values in two registers and store the result (e.g., ADD R1, R2). STORE: Move data from a register back to memory (e.g., STORE R1, 1000). JUMP: Change the program counter to a specified address (e.g., JUMP 200). Each of these instructions is represented in machine code and executed by the CPU to perform the intended operation.

  • LOAD, ADD, STORE, JUMP as typical instructions.
  • Each instruction has a binary machine code equivalent.
  • Instructions control data movement and processing.

At-a-glance summary

Comparison table

StepDetailExampleExam Use
Instruction Set DefinitionComplete set of commands a CPU can executeArithmetic, logic, data transfer instructionsDefine instruction set clearly
Instruction CategoriesTypes of operations includedADD (arithmetic), AND (logic), LOAD (data transfer)Describe instruction types
Impact on CPUDetermines CPU capabilities and performanceRISC vs CISC instruction setsExplain significance of instruction set
Machine Code RelationBinary encoding of instructionsADD instruction represented as 0001 0010Link instruction set to machine code

Active recall

Quick check

1. What does an instruction set define for a CPU?

It defines all the machine code commands the CPU can execute.

2. Give two examples of operations included in a CPU's instruction set.

Arithmetic operations like ADD, and data transfer operations like LOAD.

3. How does the instruction set affect CPU performance?

It determines what operations the CPU can perform and how efficiently it can execute tasks.

4. What is machine code in relation to the instruction set?

Machine code is the binary representation of the instructions in the instruction set.

Complete revision guide 5 of 5

Embedded Systems: Definition, Purpose, Characteristics, and Examples

This note explains what embedded systems are, their purpose within devices, key characteristics that distinguish them from general-purpose computers, and common examples of devices that use embedded systems. It clarifies the role of embedded systems in everyday technology and highlights their importance in dedicated control and automation tasks.

Syllabus source

Section 3, Topic 3.1, page 16, objective 3.1.5

Open source document ↗

What you should be able to do

  • ✓Define an embedded system and understand its role within a larger device.
  • ✓Explain the primary purpose of embedded systems in controlling or monitoring specific functions.
  • ✓Identify and describe key characteristics of embedded systems such as real-time operation, reliability, efficiency, and low power consumption.
  • ✓Recognise common devices and applications that incorporate embedded systems.
1

What is an Embedded System?

An embedded system is a specialised computer designed to perform a dedicated function or set of functions within a larger mechanical or electrical system. Unlike general-purpose computers, which can run a wide range of software applications, embedded systems are built to carry out specific control, monitoring, or processing tasks. They are integrated into the device they control and are not usually visible as separate units to the user.

For example, the microcontroller inside a digital thermostat is an embedded system that regulates temperature by reading sensors and controlling heating or cooling devices. It does not perform unrelated tasks like running a web browser or word processor.

  • Embedded systems are specialised computers within larger devices.
  • They perform dedicated, narrowly defined tasks.
  • They are integrated and often invisible to the end user.
2

Purpose of Embedded Systems

The main purpose of an embedded system is to control, monitor, or assist the operation of the device it is embedded in. This can include managing inputs from sensors, processing data, and controlling outputs such as motors, displays, or alarms.

Embedded systems enable automation and precise control, improving the functionality and efficiency of devices. For instance, in a washing machine, the embedded system controls the wash cycle timing, water temperature, and spin speed based on user settings and sensor feedback.

Because they focus on specific tasks, embedded systems can be optimised for performance and reliability in their particular application.

  • Control and monitor device functions.
  • Process sensor inputs and manage outputs.
  • Enable automation and improve device efficiency.
  • Optimised for specific tasks rather than general computing.
3

Key Characteristics of Embedded Systems

Embedded systems have several defining characteristics that distinguish them from general-purpose computers:

Real-time operation: Many embedded systems must respond to inputs and events within strict time constraints to function correctly. For example, an airbag control system in a car must deploy airbags within milliseconds of detecting a collision.

Reliability: Since embedded systems often operate critical functions, they must be highly reliable and robust against failures or errors over long periods without maintenance or rebooting, such as in medical devices or automotive controls. Efficiency: Embedded systems are designed to use minimal resources, including processing power, memory, and energy, to reduce cost and power consumption. This is important in battery-powered devices like wearable fitness trackers. Dedicated hardware and software: The hardware and software are tailored specifically for the task, often using microcontrollers with limited instruction sets and memory. Low power consumption: Many embedded systems operate on limited power sources and must conserve energy to extend battery life or reduce heat generation.

  • Real-time operation with strict timing requirements.
  • High reliability and fault tolerance.
  • Resource efficiency in processing, memory, and power.
  • Dedicated hardware and software optimised for specific tasks.
  • Low power consumption for battery-operated devices.
4

Common Devices Using Embedded Systems

Embedded systems are ubiquitous in modern technology and can be found in a wide range of everyday devices. Some common examples include:

Household appliances such as washing machines, microwave ovens, and dishwashers, where embedded systems control cycles, timing, and user interfaces.

Automotive systems including engine control units (ECUs), anti-lock braking systems (ABS), and airbag controllers, which manage safety and performance functions in real time. Consumer electronics like digital cameras, smart TVs, and fitness trackers, where embedded systems handle user inputs, display control, and sensor data processing. Industrial machines and robotics, where embedded systems automate manufacturing processes and monitor equipment status. Medical devices such as pacemakers and infusion pumps, which require reliable and precise control to ensure patient safety.

  • Household appliances (washing machines, microwaves).
  • Automotive control systems (engine management, ABS).
  • Consumer electronics (digital cameras, smart devices).
  • Industrial automation and robotics.
  • Medical devices requiring precise control.

At-a-glance summary

Comparison table

StepDetailExampleExam Use
DefinitionWhat an embedded system isA microcontroller in a microwave oven controlling heating timeDescribe embedded systems as specialised computers for dedicated tasks
PurposeWhy embedded systems are usedControlling wash cycles in a washing machineExplain embedded systems control or monitor device functions
CharacteristicKey features of embedded systemsReal-time response in car airbag deploymentIdentify characteristics like real-time operation and reliability
Example DeviceCommon devices using embedded systemsAnti-lock braking system in carsList devices such as household appliances and automotive systems

Active recall

Quick check

1. What distinguishes an embedded system from a general-purpose computer?

An embedded system is designed to perform a specific dedicated function within a larger device, whereas a general-purpose computer can run many different applications.

2. Name two key characteristics of embedded systems.

Real-time operation and high reliability.

3. Give an example of a device that uses an embedded system and describe its role.

A washing machine uses an embedded system to control the wash cycle timing, water temperature, and spin speed based on user input and sensor data.

4. Why is low power consumption important in embedded systems?

Because many embedded systems operate on limited power sources like batteries, low power consumption extends device life and reduces heat.

Related topics

Study nearby topics next

Revision hubs

Keep studying from the right hub