Pre-requisite

A computer system, in it’s most basic description, is an electronic device that can input, process, and output information. The computer system runs a computer program, which is made up of a set of instructions. These instructions are ran one after another, and this builds up larger algorithms; algorithms are like recipes, they are step by step instructions to achieve a goal.

Inside of a computer system

Computer systems can be boiled down into two main components: a Central Processing Unit (known as the CPU, or the processor), and memory (often referred to as RAM, or Random Access Memory, see 1.2 Memory for more information). The memory stores all the data and information that the computer needs, whilst it is powered on and running; the CPU, on the other hand, performs the processing of that data.

Both the processor and memory work in tandem; the processor fetches information from the memory, it is tranferred back, is decoded, and then finally an action is executed to process that information (thus we call this process the fetch, decode, execute cycle).

Purpose of the CPU

As mentioned in the pre-requisite section, the purpose of the processor is to run the fetch, decode, execute cycle.

Fetch decode execute cycle
Fetch

The processor requires two pieces of information to be able to run an action. It requires an instruction or action, which tells the computer what to do, and also requires information on what data to perform that instruction on. As such, the processor must first "fetch" (this means move the information from one place to another) the instructions and data from the main memory, and move it over back to the processor for decoding and executing.

Note

Beyond GCSE Information

Computer instructions are made up of two parts, one being the instruction or action, and one being the data. The first half of an instruction is known as the opcode, which contains the action to be completed. The second half is known as the operand, which contains the data to be acted upon (whether that be hardcoded data, or a specific memory location to act upon). The instruction is always made up of these two parts, an opcode and an operand.

Decode

The processor must then decode the instruction provided, to ensure it knows what specific action on what specific data must be completed to achieve the desired goal.

Execute

Now the processor understands what is required to be completed, it must carry out that instruction. These instructions might include performing a calculation on a specific set of data, or storing information that it has already processed, or even grabbing more data that it may require.

Fixed and stored program computers

Fixed computer systems have their instructions and programs permanently wired in. This means they can achieve the goal they were designed to do, but it is very difficult to change and achieve anything other than what it was designed to do. Examples of fixed computer systems include calculators. It also includes the Bombe machine designed by Alan Turing, which was a computer system used to break the enigma code during World War II.

John Von Neumann designed a concept for stored program computers, which allow different tasks to be performed with ease, as the program and instructions are not permanently wired into the system. This concept, of being able to use different instructions to control a system, is what all modern desktop computers are based upon.

Von Neumann architecture

The Von Neumann architecture lays out a specific set of elements to a CPU.

Diagram of a Von Neumann architecture

It contains a Control Unit (CU), which tells the memory and other elements of the processor, how to respond to instructions that have been sent (decodes the instruction), along with co-ordinating how the data moves throughout the CPU.

The processor also contains an Arithmetic Logic Unit (ALU), which handles all of the arithmetic, or in other words, handles all of the mathematical calculations required for the computer to work.

Other elements include:

  • PC (Program Counter) - This holds the address of the next instruction

  • MAR (Memory Address Register) - This holds the address of where the data is to be fetched or stored

  • MDR (Memory Data Register) - This holds the data that has been fetched from the memory

  • ACC (Accumulator) - This holds all the results of calculations

  • Cache - A temporary storage of data, which is fast to access

Processors have multiple buses, which are communication system that transfers data between components within the processor. The three main buses found in the processor are the address bus, the data bus, and the control bus. The address bus carries the relevant memory address from the processor to the memory, so it knows what data to load. The data bus transfers the data from the memory, back to the processor, and stores it within the Memory Data Register, or MDR. Finally, the control bus states whether the device should be read to, or written to, along with the size of the data being transferred.

When a computer runs, it completes the following process:

  1. The address of the next instruction is stored within the Program Counter. This is transferred to the Memory Address Register. The Program Counter is then incremented.

  2. The Memory Address Register then sends the relevant address, via the address bus, to the memory.

  3. Once the memory has the data or instruction ready, as requested by the address bus, it sends it via the data bus back to the processor, and stores it within the Memory Data Register.

  4. The Control Unit decodes the information, separating it into the opcode (instruction) and operand (the data).

  5. The instruction is ran, and if arithmetic is required it is ran on the Arithmetic Logic Unit. The instruction might be to fetch more data from the memory, to to write data to the memory, or even to jump to another instruction entirely.

  6. Any processed data is stored in the Accumulator, with a copy being made in the Cache for easy and fast access.

  7. The process repeats, to complete the program or algorithm.

This process repeats many times a second, to complete a program.

How common charactersitics affect the CPUs performance

Clock speed

The clock speed defines how many cycles the processor can perform in a given amount of time. Thus, the larger the clock speed, the more instructions you can fetch and process in a given amount of time.

Note

Beyond GCSE Information

Different CPUs and architectures have different IPCs, or instructions per clock. This means that two different CPUs running at the same clock speed, such as 2GHz, may give different performance. A processor with a high IPC but low clock speed may perform identically to a processor with a low IPC but high clock speed.

As such, we don’t say that 1GHz can perform 1 billion cycles per second, as IPC can affect that value. In terms of theory of processors, it wouldn’t be too far off that number, but IPC does affect it.

Cache size

The cache is a temporary storage space within the CPU itself. When you fetch data or instructions from the memory, or send data back to the memory, a copy is stored in the cache. This means if you are constantly fetching data from the same memory addresses, it can instead pull it from the cache, making it faster.

However, cache is tiny in size. Usually, this is kilobytes (or megabytes) in size. Thus, the larger the cache, the more data it can store locally and save time instead of fetching from memory.

Note

Beyond GCSE Information

Cache has levels. Level 1 cache (L1) is the fastest type, but also the smallest on the processor. Level 3 (L3), on the other hand, can be slightly larger, but is a slower type of cache.

If we take an AMD Ryzen 5 2600X as an example, it’s L1 cache is only 576KB in size, whilst it’s L2 cache is 3MB, and it’s L3 cache is 16MB.

Number of cores

Cores allow the computer to perform multiple tasks simultaneously. This means that whilst one core is performing one task, such as handling operating system tasks, another can be performing a program task. This can theoretically speed up performance by a huge margin.

Single core processors aren’t being produced for modern computer processors. Dual core is the starting amount, with it going up to 8-cores in consumer processors. It even goes further than this in more demanding workloads, in workstation computer systems.

Although it theoretically speeds up performance by a huge margin, there are things that can affect this. The cores have to communicate with one-another, meaning some performance is lost. Additionally, not all applications are written to take advantage of more cores, thus leading to lost performance in that way. Finally, some of the higher core processors lose performance as their clock speeds are lower than their lower core counterparts.

Embedded systems

Embedded systems are computer systems that have a specific dedicated function within a larger mechanical system. In more simple terms, it’s a computer system built to solve only a few specific tasks, and is not easily changed.

The goal of embedded systems are usually to be cheaper and smaller than full-fledged computer systems, with lower power consumption. Since these systems are designed to only achieve a few specific tasks, the hardware can be stripped down, made to only be able to achieve the tasks required.

Specific examples of embedded systems are:

  • Digital cameras

  • Microwave ovens

  • Domestic appliances, such as washing machines

  • Traffic lights

  • Factory equipment

  • Hospital/medical equipment



Return to home…​

1.1 Systems architecture

1.3 Memory