The part that follows instructions
The processor, more formally the central processing unit or CPU, is the chip that carries out a program’s instructions. It does not understand pictures, music or documents. It understands a small, fixed set of simple operations on numbers, and everything else is built by combining those operations in huge quantities.
What a CPU actually calculates
A CPU’s basic operations fall into a few groups:
- Arithmetic: adding, subtracting, multiplying and dividing numbers.
- Logic and comparison: checking whether one value is larger than another, or whether two things are equal, and combining yes/no results.
- Moving data: copying numbers between its own tiny storage spots, called registers, and memory.
- Controlling the flow: choosing which instruction to do next based on a result, or repeating a section.
That is more or less all. Loading a web page, applying a photo filter and running a spreadsheet formula are all made of long chains of these small steps. What looks like intelligence is the result of doing enormous numbers of steps in a carefully arranged order.
The cycle: fetch, decode, execute
The CPU works in a repeating cycle:
- Fetch the next instruction from memory.
- Decode it, working out what it asks for.
- Execute it, for example by adding two numbers.
- Store the result, then move on to the next instruction.
Modern processors overlap these stages like an assembly line, so a new instruction can start before the last one finishes. They also try to guess which instruction comes next so they can prepare it early. These tricks are why two processors with the same clock speed can perform very differently.
Clock speed
A processor’s circuits are paced by a clock that ticks at a steady rate. The rate is measured in hertz, and for modern chips in gigahertz (GHz), where one gigahertz is a billion ticks each second. A chip described as 3 GHz has about three billion ticks per second.
It is tempting to treat this as the speed of the computer, but it only tells part of the story. The amount of work done per tick varies between designs. Some instructions take a single tick and others take several. A newer processor at a lower clock speed can easily outperform an older one at a higher clock speed. Clock speed is most useful for comparing chips of the same family and generation.
Most chips also change their speed on the fly. They run faster for short bursts when there is work and temperature allows, and slow down to save power and reduce heat. This is why a laptop can feel quick at first and then slow under a long heavy task.
Cores
A core is an individual processing unit. Early consumer chips had one. Today most have several, often anywhere from two to well over a dozen in everyday machines. Each core can follow its own stream of instructions, so a multi-core chip can handle several tasks at once.
More cores help in two main situations:
- When you run many things at the same time, such as a video call, a browser and a music player.
- When a single program is written to split its work into pieces that run in parallel, as many video editors and some games do.
They help less when a task is a single sequence that cannot be divided, because it will then run on one core while the others stand idle. So doubling the cores does not double the speed of everything. How much you gain depends on the software.
You may also see the term threads. Some cores can juggle two streams of instructions at once, so a chip may report more threads than cores. This helps keep the core busy, though two threads on one core are not as good as two full cores.
Cache: keeping data close
The CPU can work far faster than main memory can supply data. To avoid waiting, it contains small, very fast memory areas called cache, which hold recently used instructions and data. When the data needed is in the cache, work continues without delay. When it is not, the CPU must wait for the much slower trip to RAM. Larger or better-designed caches are one reason some chips do more with the same clock speed.
What else affects speed
A processor is only one part of the system. If it is waiting for data, its raw ability does not matter. Common limits include:
- Too little memory, which forces the computer to lean on slower storage.
- A slow drive, which delays loading programs and files.
- Heat, which makes the chip reduce its speed to protect itself.
- Software that cannot use more than one core.
For this reason, general computer performance is a result of the whole machine working together, and upgrading one component brings gains only if that component was the bottleneck.
Processors beyond the desktop
Phones, tablets and some laptops (where a laptop battery rewards efficient chips) usually use chips that combine the CPU with other parts, such as graphics, memory controllers and specialised circuits for tasks like video or AI, on one piece of silicon. Such a design saves space and power. Some use a mix of larger, faster cores and smaller, efficient ones, so light tasks use little energy and demanding ones can call on more power. Different chip families use different instruction sets, which is why a program built for one type of processor generally needs to be rebuilt for another.
Reading a spec sheet sensibly
When comparing processors, a few habits help:
- Compare chips from the same generation and maker where possible.
- Look at independent test results for the work you do rather than relying on clock speed or core count alone.
- Consider battery life and heat if you are buying a laptop.
- Remember that a mid-range processor is usually enough for web, email and documents.
The processor is the part that does the arithmetic, but a well-balanced computer rarely depends on that one chip alone.