Pin Me

A Visual Interpretation of How a CPU Works

written by: •edited by: M.S. Smith•updated: 6/24/2010

The CPU is absolutely critical to the function of your computer, and yet it manages to be one of the most difficult components to understand. This article attempts to help explain the parts of a CPU and its function through simple, easy to understand flow diagrams.

  • slide 1 of 7

    Introduction to CPUs

    A common analogy is comparing the CPU to the brain of the computer. Seeing that CPU stands for “Central Processing Unit", this makes a good deal of sense, as this is what does the “thinking" for the computer.

    The function of the CPU follows three basic steps:

    1. Accepts input,
    2. Processes data,
    3. Creates output.

    Accepting input is comparable to our brain's receiving of external sensory information, just as creating output is comparable to the commands that our brain gives the body. The processing is guided by programs, which converts input into output. The output produced includes commands to the video card, sound card, printer, memory, etc.

    The CPU is typically located on the motherboard. The CPU is also referred to as the microprocessor or the computer processor.

  • slide 2 of 7
    The very basics of CPU function.
  • slide 3 of 7

    Control Unit and the ALU

    Consider first the Control Unit. This is the real center of it all, the part the directs and redirects signals to execute different programs and procedures, though it does not do the actual execution. This is the the management of the CPU, directing data flow into and out of the CPU, as well as within the CPU.

    The Control Unit directs the actual processing to be done to the ALU, or Arithmetic Logic Unit. This performs single logical binary operations that, when taken together on the scale of hundreds or thousands, perform the incredibly complex procedures that we trigger with every click of a mouse. Everything you do on a computer is turned into a numeric operation, and it's the ALU that calculates it.

  • slide 4 of 7
    Basic components of a CPU.
  • slide 5 of 7

    Registers and Caches

    In addition, there are several components that directly aid these primary two:

    The Registers work for the ALU as a temporary storage location for data during processing. They use RAM memory, or Random Access Memory, which is volatile and thus requires constant power to maintain. When the power is shut off, this memory is lost. This is to be compared with ROM memory, or Read Only Memory, which is more permanent as it is non-volatile and thus will be retained even when the power is off. The Registers are not considered a part of memory, as these are directly under the control of the CPU.

    Different registers can hold different assigned roles, including an accumulator, which accumulates the results of the computations, an address register, which keeps tabs on where certain instructions or data is stored, and storage register, which is what actually stores the data. Registers may also just be general purpose.

    The CPU Cache works for the ALU to prefetch instructions and data before they are actually needed. This is to speed up processing. The CPU cache is managed by the Cache Controller.

  • slide 6 of 7
    A more complete picture of CPU function.
  • slide 7 of 7

    For some other basic overviews of how CPUs work, check out these links to some non technical guides with diagrams:

    BrightHub: What Is CPU? How CPU Works.

    What is the Role of the CPU?

    What's Inside Your CPU

    External resources:

    How The Computer Works: The CPU and Memory

    Internal Computer Hardware

    What Is A CPU? This one has an especially entertaining analogy between the CPU and a bar, which may make a bit more sense to some.

More Info

Popular Pages