What does the CPU use to process instructions?

If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

What does the CPU use to process instructions?

Your browser is no longer supported. Update it to get the best YouTube experience and our latest features. Learn more

  • What does the CPU use to process instructions?
  • What does the CPU use to process instructions?
  • What does the CPU use to process instructions?
  • What does the CPU use to process instructions?
Remind me later

If you’re just learning about the world of computers and electronics, the terminology used to refer to different parts can be confusing. One component term you may have encountered is “CPU,” which stands for “central processing unit.”

Contents

  • What makes a CPU a CPU?
  • What does a CPU actually do?
  • Cores, clocks, and costs
  • How important is the CPU?

CPUs reside in almost all devices you own, whether it’s a smartwatch, a computer, or a thermostat. They are responsible for processing and executing instructions and act as the brains of your devices. Here, we explain how CPUs interact with other parts of your devices and what makes them so integral to the computing process.

What makes a CPU a CPU?

The CPU is the core component that defines a computing device, and while it is of critical importance, the CPU can only function alongside other hardware. The silicon chip sits in a special socket located on the main circuit board (motherboard or mainboard) inside the device. It is separate from the memory, which is where information is temporarily stored. It is also separate from the graphics card or graphics chip, which renders the video and 3D graphics that are displayed on your screen.

CPUs are built by placing billions of microscopic transistors onto a single computer chip. Those transistors allow it to make the calculations it needs to run programs that are stored on your system’s memory. They’re effectively minute gates that switch on or off, thereby conveying the ones or zeros that translate into everything you do with the device, be it watching videos or writing an email.

One of the most common advancements of CPU technology is in making those transistors smaller and smaller. That’s resulted in the improvement to CPU speed over the decades, often referred to as Moore’s Law.

In the context of modern devices, a desktop or laptop has a dedicated CPU that performs many processing functions for the system. Mobile devices and some tablets instead utilize a System on Chip (SoC) which is a chip that packages the CPU alongside other components. Intel and AMD both offer CPUs with graphics chips and memory stored on them, too, meaning they can do more than just standard CPU functions.

What does a CPU actually do?

A person's hand reaching towards a computer's exposed CPU.

At its core, a CPU takes instructions from a program or application and performs a calculation. This process breaks down into three key stages: Fetch, decode, and execute. A CPU fetches the instruction from RAM, decodes what the instruction actually is, and then executes the instruction using relevant parts of the CPU.

The executed instruction, or calculation, can involve basic arithmetic, comparing numbers, performing a function, or moving numbers around in memory. Since everything in a computing device is represented by numbers, you can think of the CPU as a calculator that runs incredibly fast. The resulting workload might start up Windows, display a YouTube video, or calculate compound interest in a spreadsheet.

In modern systems, the CPU acts like the ringmaster at the circus by feeding data to specialized hardware as it is required. For example, the CPU needs to tell the graphics card to show an explosion because you shot a fuel drum or tell the solid-state drive to transfer an Office document to the system’s RAM for quicker access.

Cores, clocks, and costs

Originally, CPUs had a single processing core. Today’s modern CPU consists of multiple cores that allow it to perform multiple instructions at once, effectively cramming several CPUs on a single chip. Most CPUs sold today have two or four cores. Six cores are considered mainstream, while more expensive chips range from eight to a massive 64 cores.

Many processors also employ a technology called multithreading. Imagine a single physical CPU core that can perform two lines of execution (threads) at once, thereby appearing as two “logical” cores on the operating system end. These virtual cores aren’t as powerful as physical cores because they share the same resources, but overall, they can help improve the CPU’s multitasking performance when running compatible software.

Clock speed is prominently advertised when you are looking at CPUs. This is the “gigahertz” (GHz) figure that effectively denotes how many instructions a CPU can handle per second, but that’s not the whole picture regarding performance. Clock speed mostly comes into play when comparing CPUs from the same product family or generation. When all else is the same, a faster clock speed means a faster processor. However, a 3GHz processor from 2010 will deliver less work than a 2GHz processor from 2020.

So, how much should you pay for a CPU? We have several guides to give you some suggestions for the best CPUs you can buy. For a general outline, however, unless you’re a hardcore gamer or someone looking to edit videos, you don’t need to spend more than $250. You can help keep the cost down by avoiding the latest hardware and instead sticking to a recent generation of CPU.

For Intel CPUs, that means 8th-, 9th-, or 10th-generation chips. You can determine their generation by the product name. For instance, the Core i7-6820HK is an older 6th-generation chip, while the Core i5-10210U is a newer 10th-generation chip.

AMD does something similar with its Ryzen CPUs: The Ryzen 5 2500X is a 2nd-generation chip based on its new “Zen+” core design, while the Ryzen 9 3950X is a 3rd-generation CPU. Ryzen 4000 was released as a laptop chip line and in APU form with very limited availability on desktop through system builders. With that in mind, it’s arguable whether the Ryzen 5000 is the fourth or fifth generation of AMD Ryzen CPU, but it’s the latest, and most recently, AMD has unified its laptop, APU, and desktop platforms under the Ryzen 5000 banner.

How important is the CPU?

These days, your CPU isn’t as important for overall system performance as it once was, but it still plays a major role in the response and speed of your computing device. Gamers will generally find a benefit from higher clock speeds, while more serious work such as CAD and video editing will see an improvement from a higher CPU core count.

You should bear in mind that your CPU is part of a system, so you want to be sure you have enough RAM and also fast storage that can feed data to your CPU. Perhaps the largest question mark will hang over your graphics card as you generally require some balance within your PC, both in terms of performance and also cost.

Now that you understand the role of a CPU, you are in a better position to make an educated choice about your computing hardware. Use this guide to learn more about the best chips from AMD and Intel.

Every computing device from simple toys to large business systems have an essential component called the central processing unit. The CPU performs calculations, makes logical comparisons and moves data up to billions of times per second. It works by executing simple instructions one at a time, triggered by a master timing signal that runs the whole computer.

Description

  1. A CPU processor is a computer chip about the size of a matchbook. Inside the package is a silicon rectangle containing millions of transistorized circuits. From the device protrude dozens of metal pins, each of which carries electronic signals into and out from the chip. The chip plugs into a socket on the computer's circuit board and communicates with memory, hard drives, display screens and other devices external to the CPU.

Clock

  1. A timing circuit called a clock sends electrical pulses to the CPU. Depending on the processor, the clock may run at speeds ranging from hundreds of thousands to billions of cycles per second. The pulses drive activity inside the CPU; because other circuits depend on the same clock, it keeps complex events in the computer synchronized.

Instructions

  1. All CPUs have an instruction set -- a list of actions the processor performs, including adding numbers, comparing two pieces of data and moving data into the CPU. The software you run on your computer consists of millions of the CPU's instructions laid out in a sequence; instructions are very simple operations, so the CPU performs many of them to accomplish meaningful tasks. Some families of CPUs, such as the ones used in desktop PCs, use the same instruction set, allowing them to run the same software. CPUs outside a product family may use different instructions; an iPad's CPU, for example, has different instructions than one running a Windows-based laptop.

ALU

  1. Processors have a circuit called the arithmetic and logic unit that carries out calculations and comparisons. The arithmetic most CPUs perform is basic multiplication, addition, division and subtraction; complex math such as statistical functions are combinations of many simple operations performed at high speed. The ALU also performs logical comparisons between two data items to determine if they are equal or if one is of greater value than the other.

Control Unit

  1. The CPU contains a control unit that coordinates activities among the processor's other working parts. The control unit breaks each instruction down into a set of actions and directs the CPU's various subsystems to carry out the actions. For example, the control unit could direct the ALU to multiply two numbers together and then add a third number to the result.

Memory

  1. The CPU chip has a limited amount of very fast memory. It has a set of storage areas called registers upon which the ALU acts directly. For example, the ALU can add the number in register 2 to the contents of register 1 quickly. The CPU also keeps recently-used instructions and data in an area called a cache that improves the computer's efficiency. In a program that multiplies a price by a quantity, for example, the CPU looks for these numbers in its cache memory. If it finds them, this saves the processor the extra work of retrieving the numbers from memory chips outside the CPU.