• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Hardware Secrets

Hardware Secrets

Uncomplicating the complicated

  • Case
  • Cooling
  • Memory
  • Mobile
    • Laptops
    • Smartphones
    • Tablets
  • Motherboard
  • Networking
  • Other
    • Audio
    • Cameras
    • Consumer Electronics
    • Desktops
    • Museum
    • Software
    • Tradeshows & Events
  • Peripherals
    • Headset
    • Keyboard
    • Mouse
    • Printers
  • Power
  • Storage
  • Video

How a CPU Works

Learn how a CPU works in an easy to follow language, including topics such as clock, memory cache, CPU block diagram, an overall view on the basic CPU units, pipeline, superscalar architecture, out-of-order execution and speculative execution.

Home » How a CPU Works

Introduction

Contents

  • 1. Introduction
  • 2. Clock
  • 3. External Clock
  • 4. Block Diagram of a CPU
  • 5. Memory Cache
  • 6. Branching
  • 7. Processing Instructions
  • 8. Out-Of-Order Execution (OOO)
  • 9. Speculative Execution

Even though every microprocessor has its own internal design, all microprocessors share a same basic concept – which we will explain in this tutorial. We will take a look inside a generic CPU architecture, so you will be able to understand more about Intel and AMD products and the differences between them.
The CPU (Central Processing Unit) – which is also called microprocessor or processor – is in charge of processing data. How it will process data will depend on the program. The program can be a spreadsheet, a word processor or a game: for the CPU it makes no difference, since it doesn’t understand what the program is actually doing. It just follows the orders (called commands or instructions) contained inside the program. These orders could be to add two numbers or to send a piece of data to the video card, for example.

Preview Product
Seagate BarraCuda 2TB Internal Hard Drive HDD – 3.5 Inch SATA 6 Gb/s 7200 RPM 64MB Cache for Computer Desktop PC Laptop (ST2000DM006) Seagate BarraCuda 2TB Internal Hard Drive HDD – 3.5 Inch SATA 6 Gb/s 7200 RPM 64MB Cache for... Buy on Amazon
Corsair Vengeance LPX 16GB (2x8GB) DDR4 DRAM 3000MHz C15 Desktop Memory Kit - Black (CMK16GX4M2B3000C15) Corsair Vengeance LPX 16GB (2x8GB) DDR4 DRAM 3000MHz C15 Desktop Memory Kit - Black... Buy on Amazon
Intel Core i7-8700K Desktop Processor 6 Cores up to 4.7GHz Turbo Unlocked LGA1151 300 Series 95W Intel Core i7-8700K Desktop Processor 6 Cores up to 4.7GHz Turbo Unlocked LGA1151 300 Series 95W Buy on Amazon

When you double click on an icon to run a program, here is what happens:
1. The program, which is stored inside the hard disk drive, is transferred to the RAM memory. A program is a series of instructions to the CPU.
2. The CPU, using a circuit called memory controller, loads the program data from the RAM memory.
3. The data, now inside the CPU, is processed.
4. What happens next will depend on the program. The CPU could continue to load and executing the program or could do something with the processed data, like displaying something on the screen.

How a CPU loads dataFigure 1: How stored data is transferred to the CPU.

In the past, the CPU controlled the data transfer between the hard disk drive and the RAM memory. Since the hard disk drive is slower than the RAM memory, this slowed down the system, since the CPU would be busy until all the data was transferred from the hard disk drive to the RAM memory. This method is called PIO, Processor I/O (or Programmed I/O). Nowadays data transfer between the hard disk drive and the RAM memory in made without using the CPU, thus making the system faster. This method is called bus mastering or DMA (Direct Memory Access). In order to simplify our drawing we didn’t put the north bridge chip between the hard disk drive and the RAM memory in Figure 1, but it is there. If you’d like to learn more about this subject, we’ve already written a tutorial on that.
Processors from AMD based on sockets 754, 939 and 940 (Athlon 64, Athlon 64 X2, Athlon 64 FX, Opteron and some Sempron models) have an embedded memory controller. This means that for these processors the CPU accesses the RAM memory directly, without using the north bridge chip shown in Figure 1.
To better understand the role of the chipset in a computer, we recommend you to read our tutorial Everything You Need to Know About Chipsets.

Last update on 2022-03-17 at 17:02 / Affiliate links / Images from Amazon Product Advertising API

Continue: Clock

CPU Tutorials

Primary Sidebar

As a participant in the Amazon Services LLC Associates Program, this site may earn from qualifying purchases. We may also earn commissions on purchases from other retail websites.

audio connectors on a motherboard (right) and ethernet + usb connectors (left)

How On-Board Audio Works

Learn how the sound card that comes embedded on your motherboard works.

How To Connect Your PC to Your Home Stereo or Home Theater

Learn how to hook your PC to your stereo or receiver in order to enhance you audio experience while playing games, watching videos, listening to music or even editing audio.

motherboard

Which is the best motherboard for Coffee Lake CPUs?

We compared seven different motherboards for Intel eighth-gen (Coffee Lake) CPUs, to help you to choose which one is the best for you. Check it out!

RAM Install

Does more RAM make difference in gaming performance?

Does installing more RAM in your computer improves gaming performance? We tested some recent games with 4 GiB, 8 GiB, and 16 GiB to find out. Check it out!

How to Refill Epson Cartridges

Learn how to reset the Epson cartridge chip, allowing you to refill the cartridge.

Footer

For Performance

  • PCI Express 3.0 vs. 2.0: Is There a Gaming Performance Gain?
  • Does dual-channel memory make difference on integrated video performance?
  • Overclocking Pros and Cons
  • All Core i7 Models
  • Understanding RAM Timings

Everything you need to know

  • Everything You Need to Know About the Dual-, Triple-, and Quad-Channel Memory Architectures
  • Everything You Need to Know About the SPDIF Connection
  • Everything You Need to Know About the Intel Virtualization Technology
  • Everything You Need to Know About the CPU C-States Power Saving Modes

Follow Us

Follow us on Facebook Follow us on Twitter Follow us on Instagram

Copyright © 2022 · All rights reserved - Hardwaresecrets.com
About Us · Privacy Policy · Contact