The Central Processing Unit (often shortened to just Processor or Chip) is sometimes considered the 'brains' of the computer. This section will not discuss the chip in significant detail as the Chip Guru goes into much more detail, including CPU history, architecture, optimisation strategies and comparisons. Therefore, what you will find here is a brief introduction to what the chip does.

But now: the short, short version...

AMD Athlon Thunderbird

The main job of the CPU is to 'talk' to memory and other peripherals (such as graphics cards and network cards) and to perform instructions asked of it. (It communicates to memory and other devices using the data and address buses. These will be explained in the Buses section.) How does it do this?

Well, the first part of the puzzle is the Registers. The CPU has a number of registers which store immediate data. Data is fetched from memory and stored in these registers. Once in the registers, the CPU can perform a number of tasks (called instructions) on the data held in these registers. The CPU actually only understands a predefined set of instructions and each instruction is defined by a particular binary number. Unsurprisingly, this set of instructions is called the Instruction Set and is CPU-specific. Modern CPUs understand several hundred instructions and each instruction is very specific. For example, one of the most simple Intel (a popular CPU manufacturer) instructions is defined by the binary code 0100 0000B (40H) which actually means: increment Register AX by 1. (Registers are identified by specific names rather than binary addresses.) Some instructions are much more complicated.

There are instructions for mathematical operations (such as addition, subtraction and multiplication), for logical operations (such as AND and OR), for information exchange with memory and peripherals, and more recently, for specific multimedia operations (especially where enhancing graphics performance is concerned).

At its lowest level, a program stored in memory is simply a long list of machine code instructions. The CPU fetches one of these instructions from memory and then performs that instruction. The CPU then fetches the next instruction asked of it. Essentially, that's all there is to a program! How does the CPU know what order to perform the instructions listed in a program? Well, this is the job of a special register in the chip called the Instruction Pointer which simply keeps track of which instruction it is performing and then "points" to the next instruction in sequence...

To learn more about how instructions are handled, visit the Chip Guru.

Chip speeds are quoted as clock speed in Hertz (Hz). 1 Hz = 1 cycle per second. This cycle is smallest measurement of time that can be allocated to a CPU. No task (i.e. instruction) can be completed in less than one clock cycle. (Well, actually they can, kind of, but it's semantics really.) You will notice that clock speeds are usually given in terms of MHz (mega-Hz). The prefix mega represents 1x106 (1 million) and so we can see that an 800MHz chip actually runs at 800 million cycles per second. Older Intel 486 chips typically ran at 25 to 100MHz. The prefix giga represents 1x109 (1000 million in English currency!) Newer Intel PIII/P4 and AMD Athlon chips exceed the 1GHz (and even 2-3GHz!) threshold. Note that it is not only the clock speed that defines the overall speed of a chip. Just because one chip runs at a higher clock speed than another doesn't necessarily make the former chip quicker. For example, an AMD Athlon running at 800MHz would easily outperform a Pentium III running at 900MHz, simply because of the design of the chips. Lastly, you may on occasion see a CPU's speed rated in Dhrystone MIPs - Millions of Instructions per second. This is an old unit of measure that is not much used now (since there are preferred measures, such as MFlops and other funny sounding units!) but has been favoured in the past and is therefore useful for comparisons of older generations of CPU. Do not confuse this with clock speed. Traditionally, the MIP rating of a CPU could not be greater than the clock speed. This was because the original von Neumann CPU architecture stated that a CPU could not perform more than one instruction in any given interval, with the shortest interval being a clock cycle. However, with today's superscalar CPU architecture, this is no longer true. Watch this space...

It's time to move this up a gear as we try and get to grips with memory.