Hardware

CPU

A CPU is the brain of the computer. It consists of a chip with many transistors, known as an integrated circuit.

The CPU performs two types of calculations, logic and arithmetic. All CPU's have an integer unit and a floating point unit that it can use to perform mathematical operations such as Addition, Subtraction, Division and Multiplication.

The integer unit is also used to calculate logical calculations as well, such as (x <= 0). The result of these logical operations is output in Boolean, meaning true or false.

Speed and performance of the CPU

The speed of the processor is measured in MIPS and MFLOPS. MIPS stands for Millions of Instruction per second and is the way of measuring how many instructions a processor can process in a second. Although this is not an accurate way of measuring how capable a processor actually is.

MFLOPS stands for millions of floating point operations per second. MIPS numbers are often very high because of how processors work, but in fact the number tells you absolutely nothing about what the processor can actually do or how it works (ie. a processor with a lower MIPS rating may actually be a better chip because its instructions are doing more work per clock cycle).

A fast CPU may sound impressive, and PR people will always talk in terms of theoretical peak performance, etc., but in reality a CPU's best possible performance totally depends on the rate at which it can access data from the various kinds of memory (L1 / L2 cache and main RAM).

A fast CPU in a system with low memory bandwidth will not perform anywhere near its theoretical peak, due to the limitation of the memory and the speed of the BUS.

Processor speed depends on the following attributes:

Processor Architecture

The image below is a theoretical model to represent the Von Neumann architecture.

The von Neumann architecture, which is also known as the von Neumann model and Princeton architecture, is a computer architecture based on the 1945 description by the mathematician and physicist John von Neumann and others in the First Draft of a Report on the EDVAC.

Whilst this may be the case, the first recorded stored program computer was devised by Sir Charles Babbage who was assisted by Ada Lovelace. His Differnece Engine and the Analytical Engine inspired Sir Alan Turing and colleagues when attempting to decypher the Enigma Codes at Bletchley Park during WWII.

CPU diagram

A simplified model of the CPU

ALU (Arithmetic Logic Unit)

A digital circuit that performs arithmetic and logical operations. A single component may contain several ALU's. In computing, an arithmetic logic unit (ALU) is a digital circuit that performs arithmetic and logical operations. The ALU is a fundamental building block of the central processing unit (CPU) of a computer, and even the simplest microprocessors contain one for purposes such as maintaining timers. The processors found inside modern CPUs and graphics processing units (GPUs) accommodate very powerful and very complex ALUs; a single component may contain a number of ALUs.

Accumulator

Accumulator is where the arithmetic/logic results are stored.

Registers

Registers store the information in order

Instruction Register

The instruction register holds instructions while they are decoded

Memory Address Register (MAR)

The Memory Address Register (MAR) is the CPU register that either stores the memory address from which data will be fetched from the CPU, or the address to which data will be sent and stored. In other words, MAR holds the memory location of data that needs to be accessed.

Memory Data Register (MDR)

A memory buffer register (MBR) or memory data register (MDR) is the register in a computer's processor, or central processing unit, CPU, that stores the data being transferred to and from the immediate access storage. It contains the copy of designated memory locations specified by the memory address register.

Program Counter (PC)

All data and instructions in memory have a unique and specific address. As each instruction is processed, the software that is currently running, updates the program counter with the address of the next instruction to fetch.

The program counter then passes this next address to the memory address register as part of the standard fetch/decode/execute cycle

Normally the address of the next instruction will be only one location higher than the current one. Sometimes though, it is instructed to jump to a completely different address. This is called a branch instruction.

The software that is currently running controls the program counter.

The Fetch Decode Execute Cycle will be discussed in more detail on another page but it is important to show you this so that it forms a relationship with the explanation of the various components of the CPU.

Heatsink & fan

Whilst not part of the CPU this is a vital componenet in modern computers where clock speed are high as this generates a significant amoutn of heat.

A heat sink can be a block of heat conductive metal, a fine smear of Thermal Paste is placed between the CPU and heatsink to help transfer the heat energy away from the CPU and to avoid a short circuit. This is generally combined with a small fan which draws fresh air and exhausts hot air away from the CPU and motherboard.

Simulator for the 6502 proessor

How do the Characteristics of a CPU Affect its Performance?

Clock Speed:

Cache Size:

Number of cores: