Both are chips made of billions of transistors, and both do arithmetic. They are built for opposite jobs. This page shows the difference, then explains why Bitcoin miners and AI chatbots ended up buying graphics cards.
Every chip has a fixed amount of space, called its die area, to spend on transistors. What makes CPUs and GPUs different is how they spend it.
A CPU has a small number of big, powerful cores, usually 4 to 24 in a laptop or desktop. Much of each core is control logic. This logic predicts which way your code will branch, reorders instructions so nothing waits, and starts on work it guesses you'll need next. Around the cores sit large caches, small pools of very fast memory that hide how slow main memory is. Only a small part of the chip does the actual arithmetic.
A GPU turns that around. It packs in thousands of small, simple arithmetic units, grouped into blocks. A block shares one small control unit, so every unit in it runs the same instruction at the same moment, each on different data.
The layouts and proportions are illustrative. Real dies vary a lot, but the trade-off is real: a CPU spends its area on making one stream of instructions fast, and a GPU spends it on running many streams at once.
GPUs were invented for graphics, where this is a perfect fit. A 4K screen has about 8 million pixels, and the colour of each one is worked out with the same short recipe of maths. No pixel needs to wait for its neighbour, so you can hand one pixel to each worker and run them all at once.
Let's race them. Each chip has to work out the colour of 2,560 pixels. The CPU has 8 fast cores. The GPU has 512 cores, but each one takes four times as long per pixel.
The slider controls how much of the job can run in parallel. At 100%, every pixel is independent. Lower it and part of the work becomes a chain, where each step needs the answer to the step before. A chain can only run on one core at a time, however many you have.
The dots under each picture are the cores, and a lit dot is busy. While the work is a chain, only one dot lights up, and the GPU's slower single core holds everything up.
This is Amdahl's law: the part of a job that can't be split up limits how much faster extra workers can make it. Try 90%: just one tenth of the work in a chain wipes out most of the GPU's lead.
That's why your computer has both. The operating system, web browser and game logic are full of branching, step-by-step code, so they run on the CPU. Drawing frames, editing video and, as we'll see, mining and AI are huge piles of identical, independent sums, so they run on the GPU.
Bitcoin and similar cryptocurrencies use proof of work. To add a new block of transactions to the shared ledger, a miner has to find a number, called a nonce, that makes the block's hash come out below a target. In practice that means the hash has to start with a certain number of zeros.
A hash function such as SHA-256 scrambles its input into a fixed-length fingerprint. Change one character and the output changes completely and unpredictably. So there's no clever shortcut: you just keep guessing. Try it.
Every guess is independent of every other guess. Nonce 7 doesn't need the answer from nonce 6. That is exactly the kind of work GPUs are built for: give each core its own nonce, have them all hash at once, and repeat.
Real miners don't race 4 zeros. The Bitcoin network's target needs around 19 leading hex zeros, and the whole network tries hundreds of billions of billions of hashes every second. Roughly how fast different hardware runs Bitcoin's SHA-256:
Log scale: each step is 10× more. The figures are rough orders of magnitude for current hardware.
GPUs beat CPUs by about 100×, which is why mining moved to graphics cards around 2010. For SHA-256 the next step was the ASIC, a chip that can only mine Bitcoin, with almost no control logic at all: the GPU idea taken to its extreme. Bitcoin has been ASIC-only for years.
Other coins, most famously Ethereum, chose hash functions that need lots of fast memory so that ASICs wouldn't have a big edge. That kept graphics cards in demand, and it's why the 2017 and 2021 crypto booms emptied gaming GPU shelves. Ethereum dropped mining entirely in September 2022, when "The Merge" switched it to proof of stake.
A large language model (LLM) such as ChatGPT or Claude is, underneath, a huge stack of numbers called weights, often tens or hundreds of billions of them. Turning your words into the next word of the reply means multiplying lists of numbers by those weights, layer after layer. Almost all of that work is one operation: matrix multiplication.
To multiply matrix A by matrix B, each cell of the result C is a dot product: you multiply a row of A by a column of B, number by number, and add the results up. The cells don't depend on each other at all. Below, every small cube is one multiply-add. A cube lights up while it's being computed, and its result drops into C at the front.
The CPU's 4 cores each take one cell of C and run through its 8 multiply-adds. The GPU gives every one of the 64 cells its own core. Each GPU step takes twice as long, and it still finishes 8× sooner. Real GPUs also have tensor cores, units that multiply whole small blocks of a matrix in one go.
Now scale it up. A model with 70 billion weights needs about 140 billion multiply-adds for every word it writes. Each word has to come before the next one, because the model reads its own output. Inside a single word, though, those billions of sums all run in parallel.
There's a second, less obvious reason GPUs win. To produce each word, the chip has to read every weight from memory once. For a single chat, that's usually the real bottleneck, more than the arithmetic. GPUs have very fast memory stacked right beside the chip. A data-centre GPU can read about 3,000 GB per second, about 40× faster than a desktop CPU reads its RAM.
Running a model is the easy part. Training one means passing trillions of words through it, forwards and backwards, and adjusting every weight each time. Training GPT-3 in 2020 took about 3×1023 operations: three hundred thousand billion billion. Here's roughly how long that would take:
Log scale. These assume about 40% of each chip's peak speed is used in practice: a desktop CPU at about 1 trillion operations a second and a data-centre GPU at about 400 trillion. Frontier models today need 100× or more again, which is why AI labs build data centres with hundreds of thousands of GPUs.
| CPU | GPU | |
|---|---|---|
| Cores | A few (4–24 in a desktop, up to ~200 in a server) | Thousands of simple ones |
| Optimised for | Latency: one task done fast | Throughput: many tasks per second |
| Area spent on | Control logic and big caches | Arithmetic units |
| Great at | Branching, step-by-step code: operating systems, browsers, game logic, databases | The same sum on lots of data: graphics, video, simulations, hashing, AI |
| Memory | Lots of it (tens to hundreds of GB), moderately fast | Less of it (8–192 GB), extremely fast |
| Crypto mining | Far too slow | Used to dominate; now mostly replaced by ASICs, and Ethereum no longer mines |
| LLMs | Can run small models slowly; can't realistically train them | Where nearly all AI training and serving happens |
If a job can be split into millions of identical, independent pieces, a GPU will usually win. Mining and AI are exactly that kind of job.