Welcome, everyone, to the first in a series about the CPU. Before diving into how it works, let’s cover some basics to avoid confusion later—this article is for IT professionals and those new to learning technology.
I’ll use “computer” throughout, but every time I mention “computer” it actually includes laptops, desktops, smartphones, tablets, smart displays, and gaming consoles like the PS5.
Names
You might notice the processor has different names—CPU, processor, or simply Central Processing Unit. These terms are interchangeable.
Purpose
Many describe the CPU as a computer’s brain, which is partly true—it handles critical thinking and command execution. If we compare a computer to the human body, the CPU is like a brain, while the motherboard acts as the nervous system, transmitting commands.
However, storage devices like hard drives and SSDs also resemble brain functions, storing long-term memory. So, while the CPU is part of the brain, it’s just one piece of the system. As you can tell I may be simplifying things for non-tech-savvy viewers, but experienced users can still follow along.
Processors handle countless calculations, not just when using a calculator app. I’ll explain that complexity soon, but first, let’s dive into the key topics to cover.
Items to Discuss
We’re covering nine key CPU components.
- Key components for a CPU.
- CPU Cycle.
- ALU – Arithmetic Logic Unit
- Clock speed*
- CPU cache *
- Pipelining
- Parallelism* – multi-core and multi-threading
- Instruction Set Architecture (ISA)
- BUS System
Anything marked with an asterisk will be briefly covered since topics like clock speed and CPU cache deserve their own articles. If you want a high-level overview, this article has you covered. For a deep dive into clock speed, check out my separate articles.
CPU Components
Starting with the control unit (CU), it directs CPU operations and ensures commands activate the right circuitry.
The ALU, responsible for massive calculations, is especially intriguing. Some might assume it only works when using a calculator app, but that’s far from true—its role is constant and vital. The processor is purely a calculating machine, handling billions of calculations per second.
Even in gaming, it constantly processes commands and works with the graphics card. A 1080p screen has over two million pixels, each requiring precise calculations for colour accuracy, making real-time graphics incredibly complex.
Take Spider-Man 2 on the PS5—swinging through New York City involves rapid environmental updates, shading shifts, and pixel adjustments, all requiring immense computational power.
Conintuing on, Registers store temporary data for quick processing.
RAM (Random Access Memory) is separate from the CPU but essential (it is not part of the CPU, but a different part of a computer)—it temporarily holds data the CPU needs to execute commands. RAM plays a crucial role in helping the CPU function efficiently. I’ll cover it in detail in another video, but for now, just know it stores temporary data used during processing.
Fetch, Decode, Execute, and Store Cycle
Next, let’s break down the CPU cycle—how it executes tasks. The process starts with RAM, which stores temporary memory as coded instructions. The CPU pulls this data and executes commands, whether booting Windows, opening Gmail, or running an app.
Fetch: is the first step, where the CPU retrieves instructions from temporary memory. Think of it like throwing a stick and telling Montgomery (your imaginary dog) to fetch. I assume that’s a dog’s name? I don’t have a dog so I’m not sure. The closest thing to a dog in my house I guess would be me. Like when I’m coming downstairs, asking my wife what’s for breakfast, and her responding, “Fetch it yourself”—right before launching a bagel at my head.
At this stage, the program counter (PC) determines where to find the next instruction. Once fetched, the code moves into registers for short-term storage before the next step: decode.
The easiest way to think of fetch is think of this step like grabbing a recipe book—it’s not cooking yet, just retrieving the instructions.
Decode: translates the fetched data into machine language, breaking it down into opcode (operation code) to determine the next steps. This could involve comparing values, deciding execution order, or processing algorithms.
Next is operands, identifying memory locations for the task.
To simplify decode: if fetching was grabbing the recipe, decoding is reading and understanding it—still no cooking yet.
Execute: is the step where the CPU performs the actual command. The ALU may run calculations, determining the next action. One aspect here is branching, where the CPU decides execution order—should step one come before step two, three, or four? Another key process is data movement, directing information to the speakers, microphone, or monitor. If fetching a recipe was retrieving instructions, this is actually cooking.
Store: isn’t always shown in diagrams—many older ones only include fetch, decode, and execute. However, newer diagrams include it, and I think it’s worth mentioning for a deeper understanding.
During store, the CPU may save temporary data in registers, allowing it to recall a command later, or it may write directly to memory. The cycle then repeats rapidly.
If data is stored, the program counter (PC) identifies the next command. Store also acts as a validation step, ensuring the cycle completed properly and data was correctly saved to RAM. If the CPU processes everything efficiently, it’s ready for the next task.
Continuing my recipe and cooking analogy. Store is like saving leftovers of your cooked meal for later.
Quick summary:
Memory holds commands → CPU fetches them → Decode converts them into machine-readable code → Executes instructions → Stores data if needed. And then the process repeats.
Clock Speed
The fetch-decode-execute cycle takes just three clock cycles, with speed depending on the processor’s clock speed.
For example, my first computer had an Intel Pentium II with 400MHz—back before gigahertz processors (GHz). That meant 400 million cycles per second, which was enough to run Doom and just enough to run Doom II. Today’s processors run at gigahertz speeds (GHz), meaning billions of cycles per second. Even basic actions, like clicking a mouse, involve immense processing power—something we often take for granted.
Clock speed isn’t everything. While it’s measured in GHz, other factors affect performance. My i7-4790K, though nearly 11 years old, still outperforms some newer i7 quad-core and six-core laptop processors. Why? Because things like CPU cache and architecture design matter.
Intel processor names include suffixes like K (higher-performance models like my 11 year old processor) and U (Ultrabook models), which help differentiate capabilities. A newer processor isn’t always faster—architecture, cache, and optimization all play a role.
Ultrabook processors prioritize efficiency over raw power, offering lighter laptops with better battery life—something to keep in mind.
Clock speed, measured in gigahertz (GHz), simply reflects how many cycles a processor completes per second, but speed is influenced by more than just GHz.
Cache
One overlooked factor is cache—not “cash-ey,” but pronounced “cash.” It’s short-term memory built directly into the CPU, separate from RAM, and speeds up data retrieval.
Three levels of cache:
- L1 Cache: Smallest, fastest, closest to the core, handling frequently accessed commands.
- L2 Cache: Larger and secondary, storing more data.
- L3 Cache: Largest and shared across multiple cores—critical in multi-core processors.
Cache helps avoid frequent back-and-forth trips to RAM, boosting performance. Instead of retrieving data from memory constantly, the processor stores frequently needed info within the chip, processing commands faster.
Pipelining
Improves the CPU cycle—fetch, decode, execute—by allowing multiple steps to run simultaneously.
Without pipelining, the CPU completes one task at a time:
- Fetches → Stops
- Decodes → Stops
- Executes → Stops
Then repeats the process for the next cycle. This means, the CPU fetches data but waits until decoding and execution finish before moving to the next fetch—inefficient and slow.
With pipelining, tasks overlap. While one instruction is decoding, another is already fetching, and a third is executing. This ensures continuous processing, avoiding idle time.
Imagine an assembly line at a shipping centre—without pipelining, workers handle boxes one step at a time, pausing between tasks.
- One person fetches the box and stops.
- The next seals it, then stops.
- The last person labels it, while the others wait.
With pipelining, tasks overlap:
- While the first person fetches the next box, the second seals the current one.
- The last person labels, while the first is fetching the next box, and the 2nd person is sealing another one, keeping the flow constant.
This method ensures continuous processing, just like a CPU.
Parallelism
One of the biggest misconceptions about speed, many think clock speed (GHz) alone defines performance—it doesn’t. Others believe more cores automatically mean a faster CPU, which isn’t always true.
Back in the 90s, processors had just one core—handling everything solo. Today’s CPUs have multiple cores, but efficiency depends on architecture, multi-threading, and other factors.
Single-core processors are rare today, but they were standard in older computers, smartphones, and tablets. As technology advanced, CPUs gained multiple physical cores on a single chip.
- Dual-core: Two cores splitting tasks simultaneously.
- Quad-core: Four cores handling work in parallel.
- Octa-core: Eight cores, common in smartphones. With concepts of efficiency cores, designed for power-saving.
More cores don’t automatically mean more speed—software must be optimized to use them. Old games like Half-Life ran on single-core processors but performed well because they were built for that hardware. Newer games, like Uncharted, take advantage of multi-core CPUs for better visuals, smoother gameplay, and faster processing—if the system supports it.
Instruction Set Architecture (ISA)
A critical but often overlooked concept. ISA allows software to communicate with the CPU, enabling programs to run efficiently. Without it, applications wouldn’t know how to interact with the processor.
Software, including operating systems, apps, and browsers, interacts with the CPU through instruction set architecture (ISA), telling it what kind of data it’s handling—numbers, text, or other formats.
ISA also defines memory management, guiding how the CPU fetches and processes data from RAM. Additionally, it determines the CPU’s architecture, such as x86 or ARM—widely used in modern devices. These architectures warrant their own discussion, but they significantly impact performance.
If you’ve made it this far, congrats—you deserve a medal.
BUS System
Helping the CPU communicate with other components. There are three key buses:
- Data Bus: Transfers actual data between the CPU, RAM, storage, keyboard, monitor, and even touchscreens.
- Address Bus: Identifies where data needs to go, like a driver navigating bus stops—retrieving data locations to send or receive information.
This system ensures efficient data transfer across a computer’s internal components.
Control Bus is simpler than the others—it manages data transfer and ensures commands are correctly executed. Example: You press “K” in Microsoft Word.
- The Address Bus determines where the data (letter “K”) should go—from keyboard to CPU.
- The Data Bus carries the actual letter “K” to the CPU.
- The Control Bus checks if “K” appears correctly on the screen.
Think of it like a bus system:
- The Address Bus finds the correct stop.
- The Data Bus transports passengers (data).
- The Control Bus verifies the bus arrived at the right destination.
And that wraps up this CPU lesson! Hope this helped. Test your IT friends—most people don’t know these basics, and it’s fun to see them struggle.