How do cpu processors work
CPUs are built by placing billions of microscopic transistors onto a single computer chip. One of the most common advancements of CPU technology is in making those transistors smaller and smaller. In the context of modern devices, a desktop or laptop has a dedicated CPU that performs many processing functions for the system.
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. 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.
Originally, CPUs had a single processing core. 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. Clock speed is prominently advertised when you are looking at CPUs.
It works by executing simple instructions one at a time, triggered by a master timing signal that runs the whole computer. 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. 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.
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.
Prior to the , engineers built computers either from collections of chips or from discrete components transistors wired one at a time. The powered one of the first portable electronic calculators. If you have ever wondered what the microprocessor in your computer is doing, or if you have ever wondered about the differences between types of microprocessors, then read on.
In this article, you will learn how fairly simple digital logic techniques allow a computer to do its job, whether it's playing a game or spell checking a document! The first microprocessor to make it into a home computer was the Intel , a complete 8-bit computer on one chip, introduced in The first microprocessor to make a real splash in the market was the Intel , introduced in and incorporated into the IBM PC which first appeared around If you are familiar with the PC market and its history, you know that the PC market moved from the to the to the to the to the Pentium series to the Core series to the Xeon series.
All of these microprocessors are made by Intel and all of them are improvements on the basic design of the Since , Intel has introduced microprocessors with multiple cores and millions more transistors. But even these microprocessors follow the same general rules as earlier chips. An Intel Core i9 processor can have up to eight cores , each of which can execute any piece of code that ran on the original , only about 6, times faster!
Each core can handle multiple threads of instructions, allowing the computer to manage tasks more efficiently. Intel's product range has widened substantially from the s.
In addition, Intel offers the Celeron and Atom processor lines. Celeron is aimed at entry-level computer users, and Atom processors are better for mobile devices and devices that are part of the Internet of Things. While Intel still has a large portion of the market, it has more than its fair share of competitors. AMD competes with Intel in the PC processor market, but also does big business in graphics processor chips that are popular with PC gamers.
Nvidia, famous for its graphics chips, also manufactures CPUs. In , Apple introduced its M-series chips, which are replacing the Intel chips Apple was using for its Macintosh computers. Samsung may also be working on its own proprietary processor designs. Many more companies build processors for other electronics uses, like cars and smart home products. The market is getting more and more competitive. A chip is also called an integrated circuit. Generally it is a small, thin piece of silicon onto which the transistors making up the microprocessor have been etched.
A chip might be as large as an inch on a side and can contain tens of millions of transistors. Simpler models might consist of a few thousand transistors etched onto a chip just a few millimeters square. It has become common to see chips in all kinds of devices with multiple cores, each of which is a processor. To understand how a microprocessor works, it is helpful to look inside and learn about the logic used to create one.
In the process you can also learn about assembly language — the native language of a microprocessor — and many of the things that engineers can do to boost the speed of a processor. A microprocessor executes a collection of machine instructions that tell the processor what to do.
Based on the instructions, a microprocessor does three basic things:. There may be very sophisticated things that a microprocessor does, but those are its three basic activities. The following diagram shows an extremely simple microprocessor capable of doing those three things:.
Although they are not shown in this diagram, there would be control lines from the instruction decoder that would:. Coming into the instruction decoder are the bits from the test register and the clock line, as well as the bits from the instruction register.
The previous section talked about the address and data buses, as well as the RD and WR lines. In our sample microprocessor, we have an address bus 8 bits wide and a data bus 8 bits wide. That means that the microprocessor can address bytes of memory, and it can read or write 8 bits of the memory at a time. Let's assume that this simple microprocessor has bytes of ROM starting at address 0 and bytes of RAM starting at address ROM stands for read-only memory.
A ROM chip is programmed with a permanent collection of pre-set bytes. The address bus tells the ROM chip which byte to get and place on the data bus. RAM stands for random-access memory. RAM contains bytes of information, and the microprocessor can read or write to those bytes depending on whether the RD or WR line is signaled.
One problem with today's RAM chips is that they forget everything once the power goes off. That is why the computer needs ROM.
By the way, nearly all computers contain some amount of ROM it is possible to create a simple computer that contains no RAM — many microcontrollers do this by placing a handful of RAM bytes on the processor chip itself — but generally impossible to create one that contains no ROM.
When the microprocessor starts, it begins executing instructions it finds in the BIOS. The BIOS instructions do things like test the hardware in the machine, and then it goes to the hard disk to fetch the boot sector see How Hard Disks Work for details.
0コメント