MTE Explains: The Difference Between a CPU and a GPU

CPUs and GPUs are pretty similar. They’re both made from hundreds of millions of transistors and can process thousands of operations per second. But what’s the difference between a CPU and a GPU?

cpu-gpu-difference-intel-processor

The CPU (central processing unit) of a computer is often called the “brain” of a computer. It’s a collection of millions of transistors that can be manipulated to perform an awesome variety of calculations. A standard CPU has between one and four processing cores clocked anywhere from 1 to 4 GHz.

A CPU is powerful because it can do everything. If a computer is capable of accomplishing a task, it’s because the CPU can do it. Programmers achieve this through broad instruction sets and long feature lists shared by all CPUs.

cpu-gpu-difference-nvidia-gpu

A GPU (graphics processing unit) is a specialized type of microprocessor. It’s optimized to display graphics and do very specific computational tasks. It runs at a lower clock speed than a CPU but has many times the number of processing cores.

You can almost think of a GPU as a specialized CPU that’s been built for a very specific purpose. Video rendering is all about doing simple mathematical operations over and over again, and that’s what a GPU is best at. A GPU will have thousands of processing cores running simultaneously. Each core, though slower than a CPU core, is tuned to be especially efficient at the basic mathematical operations required for video rendering. This massive parallelism is what makes GPUs capable of rendering the complex 3D graphics required by modern games.

cpu-gpu-difference-core-comp

If a CPU is a Leatherman, a GPU is a very sharp knife. You can’t tighten a hex bolt with a knife, but you can definitely cut some stuff.

A GPU can only do a fraction of the many operations a CPU does, but it does so with incredible speed. A GPU will use hundreds of cores to make time-sensitive calculations for thousands of pixels at a time, making it possible to display complex 3D graphics. However, as fast as a GPU can go, it can only really perform “dumb” operations.

For example, a modern GPU like the Nvidia GTX 1080 has 2560 shader cores. Thanks to those cores, it can execute 2560 instructions, or operations, during one clock cycle. And when you need to make a screen’s worth of pixels one percent brighter, that’s perfect. By comparison, a four-core Intel i5 CPU can only execute four simultaneous instructions per clock cycle.

However, CPUs are more flexible than GPUs. CPUs have a larger instruction set, so they can perform a wider range of tasks. CPUs also run at higher maximum clock speeds and are capable of managing the input and output of all of a computer’s components. For example, CPUs can organize and integrate with virtual memory, which is essential for running a modern operating system. That’s just not something a GPU can accomplish.

Even though GPUs are best at video rendering, they are technically capable of doing more. Graphics processing is only one kind of repetitive and highly-parallel computing task. Other tasks like bitcoin mining and password cracking rely on the same kinds of massive data sets and simple mathematical operations. That’s why some folks will use GPUs to run non-graphical operations. This is best known as “GPU computation.”

CPUs and GPUs have similar purposes but are optimized for different computing tasks. An efficient computer will need both to run properly.

Image credit: Mmanss (Own work)

Leave a Reply

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.