GCSE

Computer Science

0 / 35 Lessons
0%
  1. Introduction to GCSE Computer Science
  2. 1. Computer Systems

  3. 1.1 Systems Architecture
  4. 1.2 Memory and Storage
  5. 1.3 Computer Networks, Connections and Protocols
  6. 1.4 Network Security
  7. 1.5 Systems Software
  8. 1.6 Ethical, Legal, Cultural and Environmental Impacts of Digital Technology
  9. 2. Computational Thinking, Algorithms and Programming
  10. 2.1 Algorithms
  11. 2.2 Programming Fundamentals
  12. 2.3 Producing Robust Programs
  13. 2.4 Boolean Logic
  14. 2.5 Programming Languages and Integrated Development Environments
Module Progress
0 / 35 Lessons
0%
Learning
Summary
Revision
Study

In this lesson, we will explore the essential components of a Central Processing Unit (CPU) and understand how they work together to execute instructions. We will also delve into the Von Neumann architecture, which forms the foundation of modern computer systems.

A Computer System

A computer system consists of hardware and software that work together to process data and perform tasks. At its core, a computer follows a simple pattern: it takes an input, processes that input, and produces an output for the user. This process is essential for everything a computer does, from running applications to controlling external devices.

Computers receive data through input devices like keyboards, mice, or controllers. The CPU processes this data by following programmed instructions, performing calculations, making decisions, and manipulating information as needed. The processed result is then sent to an output device, such as a monitor or speaker, allowing the user to see, hear, or interact with the outcome. This rapid sequence enables computers to function efficiently and respond to user actions in real time.

The Purpose of the CPU

The CPU is at the centre of a computer system, responsible for executing instructions and performing arithmetic and logical operations on data. The CPU fetches, decodes, and executes instructions through a series of steps known as the “fetch-execute cycle”, and through this cycle, is able to control all the other parts of the computer.

Figure 1. A person holding an Intel CPU.
The Fetch-Execute Cycle

The fetch-execute cycle is the process through which the CPU retrieves instructions from memory, interprets them, and carries out the specified operations.

Figure 2. The fetch-execute cycle.

This cycle consists of the following stages:

  1. Fetch: The CPU fetches the next instruction from the memory. It uses a component called the “Program Counter” to keep track of the memory address of the next instruction.
  2. Decode: The fetched instruction is then decoded by the CPU’s “Control Unit” to understand the operation it represents and the data it requires.
  3. Execute: In this stage, the CPU carries out the operation specified by the instruction using the data obtained from registers or memory.
  4. Store: If the instruction alters data, the results are stored back into memory or registers, depending on the specific operation.

The fetch-execute cycle continues repeatedly, allowing the CPU to execute a series of instructions, making the computer perform various tasks.

Common CPU Components and Their Functions

To fully understand the common components of a CPU, we must first learn about their different functions during the fetch-execute cycle.

Figure 3. Components of the CPU.

Arithmetic Logic Unit (ALU): The ALU is a fundamental component of the CPU responsible for performing arithmetic operations (e.g., addition, subtraction) and logical operations (e.g., AND, OR) on data. During the “Execute” stage of the fetch-execute cycle, the ALU receives data from registers and carries out the specified operation according to the decoded instruction.

Control Unit (CU): The CU is responsible for coordinating and managing the fetch-execute cycle. During the fetch stage, the CU retrieves the instruction from memory using the Program Counter (PC) and sends it to the instruction register for decoding. It then controls the flow of data and signals between various CPU components, ensuring the proper execution of instructions.

Cache: Cache is a small, high-speed memory located within the CPU. It stores frequently used data and instructions to improve the overall performance of the system. When the CPU needs data during the fetch-execute cycle, it first checks the cache. If the data is found in the cache (cache hit), the CPU can access it much faster than fetching it from the main memory (RAM).

Registers: Registers are small, high-speed storage units within the CPU that hold data temporarily during the fetch-execute cycle. They are the fastest form of memory and play a crucial role in speeding up data access for the CPU. There are several types of registers, such as:

  • Memory Address Register (MAR): This register holds the memory address of the data or instruction being fetched from or stored into memory. During the fetch stage, the MAR holds the address of the instruction to be fetched.
  • Memory Data Register (MDR): The MDR holds the actual data or instruction fetched from memory or the data/instruction that is ready to be written into memory. It acts as a buffer between the CPU and memory, holding the data during data transfer.
  • Program Counter (PC): The Program Counter is a special register that keeps track of the memory address of the next instruction to be fetched. During each fetch stage, the PC gets updated to point to the next instruction in memory.
  • Accumulator: The accumulator is a register that stores intermediate results during arithmetic and logical operations. It holds the output of ALU operations and is used for further processing or for storing the final result.

These registers are key features of the Von Neumann architecture, which we will explore below. For each of the four registers, you must know their names, their acronyms, and their purposes.

Von Neumann Architecture

The Von Neumann architecture describes the structure of modern computer systems. It is named after the renowned mathematician and computer scientist John von Neumann.

Figure 4. Von Neumann architecture.

The key features of the Von Neumann architecture include:

  • Central Processing Unit (CPU): The CPU is the core component of the Von Neumann architecture, responsible for executing instructions and data processing.
  • Memory: The Von Neumann architecture has a unified memory system that stores both data and instructions. This means that data and program instructions are stored in the same memory, and they are accessed using memory addresses.
  • Input/Output (I/O) Devices: These devices facilitate communication between the computer and the external world. They allow data to be put into the computer (input) and the output to be presented to users.
  • Bus: The bus is a communication pathway that enables data and instructions to be transferred between the CPU, memory, and I/O devices.

Note

Whilst the CPU is responsible for executing instructions, how it operates within the broader Von Neumann architecture defines its interactions with memory, buses, and I/O devices to form a complete computer system.

Key