CPUs, GPUs, and TPUs Explained for Beginners
Welcome! If you’ve ever heard people talk about “needing a good GPU” for gaming, or “training a model on a TPU,” and felt lost — this post is for you. We’ll build up your understanding from zero, one idea at a time, using everyday analogies.
By the end, you’ll understand:
- What a CPU, GPU, and TPU actually are
- How each one works, at a high level
- Why they’re different, and why that difference matters
- When to use which one
No prior computer hardware knowledge required.
The Big Picture
Every computer — your laptop, your phone, a giant data center server — needs something that actually does the thinking. That “something” is a processor: a chip made of billions of tiny electronic switches (called transistors) that turn electrical signals on and off to perform calculations.
There isn’t just one kind of processor. Over time, engineers realized that different types of tasks are solved better by different chip designs:
- CPU (Central Processing Unit) — the all-purpose brain of a computer. Good at doing a wide variety of tasks, one after another, very quickly and intelligently.
- GPU (Graphics Processing Unit) — originally built to draw images on screen, now used for any task that can be broken into thousands of small, simultaneous pieces.
- TPU (Tensor Processing Unit) — a chip built by Google specifically to accelerate a narrow but very important task: the math behind modern Artificial Intelligence (AI).
Think of it this way: a CPU is a generalist, a GPU is a specialist in parallel work, and a TPU is a specialist in one very specific kind of parallel work (AI math).
graph TD
A[Processors] --> B[CPU - General Purpose]
A --> C[GPU - Parallel Processing]
A --> D[TPU - AI-Specific Processing]
B --> B1[Runs your OS, apps, web browser]
C --> C1[Renders graphics, runs many tasks at once]
D --> D1[Accelerates machine learning math]
What Is a CPU?
The CPU is often called the “brain” of the computer. It’s the chip that runs your operating system, opens your apps, handles your keyboard and mouse input, and coordinates every other part of the computer.
How it works
A CPU has a small number of very powerful “workers” called cores (modern consumer CPUs typically have 4 to 16 cores; server CPUs can have dozens). Each core can:
- Follow complex, branching instructions (“if this happens, do A; otherwise, do B”)
- Switch rapidly between many different tasks
- Make decisions quickly and handle tasks in a specific order
The key idea: a CPU is optimized for doing a wide variety of different jobs, one step at a time, very fast and very intelligently — like a highly skilled person who can do almost any task you hand them, but who works on a limited number of things simultaneously.
Simple analogy: Imagine you have one incredibly smart, fast assistant. You can ask them to do your taxes, then write an email, then answer the phone, then solve a puzzle — and they’ll do each task extremely well and switch between them seamlessly. But they can only really focus on a few things at once.
That’s a CPU: few workers, each extremely capable and flexible.
What Is a GPU?
The GPU was originally invented to do one thing: draw images on your screen, especially for video games. Drawing a screen means calculating the color of millions of individual pixels, many times per second. That’s a huge number of small, repetitive calculations that can all happen at the same time.
Engineers realized this same pattern — “do the same simple math on huge amounts of data, all at once” — is useful far beyond graphics. It also works well for AI, video editing, scientific simulations, and more.
How it works
Instead of a few powerful cores, a GPU has thousands of smaller, simpler cores. Each individual core is much less “clever” than a CPU core, but because there are thousands of them, they can all work on tiny pieces of a big problem simultaneously.
This approach is called parallel processing: breaking one big task into thousands of small identical tasks and running them all at once.
Simple analogy: Imagine, instead of one genius assistant, you have an army of 10,000 workers. Each one isn’t as clever as your CPU assistant, but if you need to paint 10,000 fence posts the exact same color, this army finishes in seconds — while your one genius assistant would take hours doing them one at a time.
That’s a GPU: many workers, each simpler, all doing the same kind of work simultaneously.
What Is a TPU?
A TPU is a chip designed by Google specifically for AI workloads — particularly the mathematical operations used in machine learning, called tensor operations.
Modern AI relies heavily on one specific type of math: matrix multiplication — multiplying huge grids of numbers together, over and over, millions or billions of times. GPUs are good at this because it’s a parallel task. But Google went a step further and asked: “What if we built a chip that does almost nothing except this one type of math, but does it as efficiently as physically possible?” The result was the TPU.
How it works
A TPU contains a special piece of hardware called a systolic array — think of it as a tightly connected grid of tiny calculators that pass numbers directly to their neighbors, chaining calculations together with almost no wasted time or energy. This design is extremely efficient specifically for the matrix math AI needs, but it’s not flexible enough to handle general tasks the way a CPU or GPU can.
Simple analogy: Imagine a factory assembly line built for exactly one product — say, folding a specific type of box. Every station on the line is perfectly tuned for that one job. It will fold that box faster and cheaper than any general-purpose worker ever could. But ask it to build a chair instead, and it’s useless.
That’s a TPU: an assembly line built for one specific, extremely important type of math (AI calculations), and nothing else.
The Restaurant Kitchen Analogy
Here’s one analogy that ties all three together.
Imagine a restaurant kitchen:
-
The CPU is the Head Chef. Highly skilled, can cook any dish on the menu, taste-test, adjust seasoning, handle a walk-in customer’s special request, and manage the whole kitchen. But there’s only one (or a few) of them.
-
The GPU is a huge line of 1,000 prep cooks. Each one isn’t a master chef — but if the order is “chop 10,000 onions the exact same way,” this army finishes almost instantly. Give them a truly unique, complex dish and they’d struggle — they’re built for repetitive, identical, parallel work.
-
The TPU is a specialized dumpling-folding machine. It doesn’t cook at all in the general sense. It does exactly one job — folding dumplings — but it does that one job at a scale and speed no human crew could ever match. If your restaurant makes dumplings all day, this machine changes everything. If you need to cook a steak, it’s useless.
A well-run modern kitchen often has all three working together: the Head Chef (CPU) manages everything and hands off the right jobs to the prep cook army (GPU) or the dumpling machine (TPU) when appropriate.
Key Differences
| Aspect | CPU | GPU | TPU |
|---|---|---|---|
| Design goal | General-purpose computing | Parallel computing (originally graphics) | AI/machine learning math only |
| Number of cores | Few (4–64 typical) | Thousands | Specialized “matrix” units |
| Flexibility | Extremely flexible | Flexible for parallel tasks | Very narrow — mainly matrix math |
| Best at | Sequential, decision-heavy tasks | Highly parallel, repetitive tasks | Massive matrix multiplication |
| Availability | In every computer/phone | Gaming PCs, cloud servers | Google Cloud data centers |
The most important underlying difference is this spectrum:
CPU → GPU → TPU (Maximum Flexibility → Maximum Specialization)
The trade-off is always: the more specialized a chip is for one task, the faster and more efficient it is at that task — but the less useful it is for anything else. This is one of the most fundamental ideas in computer hardware design.
Full Comparison Table
| CPU | GPU | TPU | |
|---|---|---|---|
| Full name | Central Processing Unit | Graphics Processing Unit | Tensor Processing Unit |
| Analogy | Head Chef | Army of prep cooks | Dumpling-folding machine |
| Strengths | Versatile, handles logic well, low latency | Excellent at parallel tasks; widely available | Extremely fast for AI matrix math at scale |
| Weaknesses | Slow for massive parallelism | More power; overkill for simple tasks | Only useful for AI/ML; not general-purpose |
| Ideal workloads | OS, web browsing, everyday apps | Games, rendering, video, AI training | Large-scale AI model training and inference |
| Where you’ll find it | Every laptop, desktop, phone | Gaming PCs, workstations, cloud AI servers | Primarily Google Cloud data centers |
Practical Examples
CPU examples
- Opening and using apps like a web browser, email client, or word processor
- Running your phone’s operating system
- Coordinating tasks in a server (like handling website requests)
Everyday example: When you open your laptop and type an email, your CPU is doing the vast majority of that work.
GPU examples
- Playing video games with realistic 3D graphics
- Editing and rendering video
- Running AI models (both training and inference — many AI systems today use GPUs)
- Scientific simulations, like weather modeling or protein folding
Everyday example: When you play a modern video game and see detailed characters rendered in real time at 60+ frames per second, your GPU is doing that heavy lifting.
TPU examples
- Training large AI language models
- Running AI-powered features at massive scale — Google Search ranking, Google Photos image recognition, Google Translate
- Any workload using Google’s TensorFlow or JAX frameworks on Google Cloud
Everyday example: When you use Google Translate to instantly translate a sentence, there’s a good chance a TPU helped power the AI model behind that feature.
When Should You Choose Which?
Here’s a simple decision guide:
-
Choose a CPU when: You’re doing everyday computing — browsing, writing documents, coding, running most business software. Every computer already has one, so in practice you’re not really “choosing” it — it’s the default coordinator for everything.
-
Choose a GPU when: You need to do many similar calculations at once — gaming, video editing/rendering, 3D design, most AI/machine learning work (especially if you’re not on Google Cloud), and scientific computing.
-
Choose a TPU when: You are specifically training or running large-scale AI models, ideally using Google’s ecosystem (TensorFlow, JAX, Google Cloud). If you’re not doing heavy AI work, a TPU won’t help you at all.
Important nuance: For most people, this “choice” is invisible. Your phone and laptop already have a CPU (and often a small GPU) built in, and you don’t get to swap in a TPU at home — TPUs are specialized, cloud-only hardware used mainly by companies and researchers building large AI systems.
Glossary
- Processor / Chip: A piece of hardware that performs calculations. CPUs, GPUs, and TPUs are all types of processors.
- Core: An individual processing unit within a chip. More cores generally means more work can happen simultaneously.
- Transistor: A microscopic electronic switch. Chips are built from billions of these.
- Parallel processing: Doing many calculations at the same time. GPUs and TPUs rely heavily on this.
- Sequential processing: Doing calculations one after another, in order. CPUs are strong at this.
- Matrix multiplication: A specific type of math involving grids of numbers, heavily used in AI. TPUs are built almost entirely around this operation.
- Tensor: A general term for a grid of numbers. AI models are built from operations on tensors — hence “Tensor Processing Unit.”
- Systolic array: A hardware layout used in TPUs where small calculation units pass data directly to neighboring units, performing chained calculations very efficiently.
- Training (in AI): Teaching an AI model by having it process huge amounts of data and adjust itself. Extremely compute-intensive.
- Inference (in AI): Using an already-trained AI model to make a prediction. Generally requires less compute than training.
- Latency: How long it takes to complete a single task. CPUs are generally optimized for low latency.
- Throughput: How much total work can be completed in a given time. GPUs and TPUs are optimized for high throughput.
Summary
- A CPU is the flexible, general-purpose brain of every computer — a few very smart “workers” that can handle almost any task.
- A GPU is a massively parallel chip — thousands of simpler “workers” that excel at doing the same calculation on huge amounts of data simultaneously.
- A TPU is an ultra-specialized chip built by Google to do one thing extremely well: the matrix math behind AI models, at massive scale.
The general trend across all three is a trade-off between flexibility and specialization: CPUs are the most flexible but slowest for parallel work; TPUs are the least flexible but fastest for their one specific job; GPUs sit in between.
Understanding this spectrum is the key to understanding why modern computers and AI systems are often built with a combination of these chips working together, each handling the part of the job it’s best suited for.