How does a CPU work?

cpu

CPU’s work on the principles of digital logic which can be implemented on a silicon wafer by the construction of a large number of binary switches (transistors or gates). These gates can be combined into circuits which have specific functions – for example a circuit to add two numbers together and include the carry from the previous operation can be implemented like this:

How does a CPU work

Simple circuits like this can be combined with others to perform multiplication (which is fundamentally a bunch of addition operations). Another key element of a CPU involves storing information. This is done using embedded memories or registers which are usually addressable by row and column:

How does a CPU work

By providing an address to this memory, the value stored at that location can be retrieved. Again these are constructed of a number of transistors which can be toggled either on or off to denote a value of 1 or 0.

Synchronizing this all is a system which is called the clock. Clocking provides a mechanism by which operations across the entire chip can be done at the same time so when you are comparing the results from two circuits which are working on a similar operation (adding two numbers for example), the results are from that operation, rather than one circuit getting ahead of the other and not comparing against the correct value.

Clocks are also used to control the input and output of the CPU so it can talk to external devices. They are built of both analog and digital devices. At the core of most clocks is a Phase Locked Loop circuit (PLL) and a means for distributing the clock pulses across the chip – sometimes using repeaters or splitters to tune the clocks appropriately to account for the time it takes for signals to travel across the chip.

Around the outside of a CPU we can usually find the I/O ring which receives analog signals from the outside world and controls communication with other devices. Examples of this would be a memory interfaces or general purpose IO.

Together these elements allow the CPU to receive instructions from software, read values, perform operations and output results to the rest of the system. To facilitate this there is also microcode within the CPU which controls how it behaves and operates. This microcode allows the soft implementation of instructions – abstracting the instructions from the need to specify the specific circuit operations to perform the instruction. This same process of abstraction is continued again and again though OS and software so that the person using a computer can click on a location on a screen and retrieve information from halfway around the world without knowing anything about what a transistor is.

Sabik Al Mahmud

There was a fascination with technology from a very young age, and perhaps that fascination is a little more than other ordinary people. From Nokia's button phones to infinity display bezel-less smartphones, everything is my favorite. Technology has never been more impressive in my life. And writing started with an interest in this technology .....

You may also like...

2 Responses

  1. July 4, 2020

    […] service providers lease their network, CPU, storage, and other basic computing resources; Where the user can run the operating system and […]

  2. July 9, 2020

    […] can access supercomputers at the same time. These are the most expensive computers ever made. CPUs can support extremely high computing speeds. They can work on lists of numbers rather than pairs of […]

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: