Facts | How does a computer processor?




Facts | How does a computer processor?

You are reading this on your smartphone, tablet or computer. Any of these devices is based on a microprocessor. The microprocessor is the “heart” of any computer device. There are many types of microprocessors, but they solve the same problem. Today we’ll talk about how the processor works and what tasks it performs. At first glance, it seems obvious. But very many users would be interested to deepen their knowledge about the most important component of providing the computer. We learn about how technology is based on a simple digital logic, allows your computer to not only solve math problems, but also be entertainment center. As little as two numbers – one and zero – are transformed into colorful games and movies? This question is many times asked yourself and be happy to get an answer. Even in the recently discussed by us processor AMD Jaguar, which are based on the latest game consoles, is the same old logic.

In the English literature is often called a microprocessor CPU (central processing unit, [one] of the CPU module). The reason for this name lies in the fact that modern processor represents a single chip. The first microprocessor in the history of mankind was created by Intel in 1971.
Role in the history of the Intel microprocessor industry


It is a question of the Intel 4004. Powerful and he was not able to perform only the operations of addition and subtraction. At the same time he could handle all four bits of information (that is, was a 4-bit). But for the time of its appearance was a significant event. After all, the whole processor will fit into a single chip. Before the advent of the Intel 4004, computers were based on a whole set of chips or discrete components (transistors). 4004 was the basis for one of the first handheld calculators.

The first microprocessor for home computers was presented in 1974, the Intel 8080. All the computing power of an 8-bit computer was placed in a single chip. But the real importance was the announcement of the Intel 8088. He appeared in 1979 and in 1981 became the first mass used in personal computers IBM PC.

Next, processors began to develop and grow into power. Anyone who is even slightly familiar with the history of the microprocessor industry, remember that instead of 8088 reached 80286. Then came the turn of 80386, followed by 80486. Then there were a few generations “Pentiums»: Pentium, Pentium II, III, and Pentium 4. All this “Intel’s” processors based on the basic design of 8088. They are backward compatible. This means that the Pentium 4 can process any piece of code to 8088, but did so at a rate increased about five thousand times. Since then was not so many years, but had to change a few more generations of microprocessors.


Since 2004, Intel began offering multi-core processors. The number of transistors used in them has grown by millions. But even now, the processor is subject to the general rules that were created for older chips. The table presents the history of Intel microprocessors to 2004 (inclusive). We will make some explanation for the fact that the mean reflected in her performance:

Name (Name). Processor
Date (date). The year in which the processor was first introduced. Many processors are represented multiple times, each time increased their clock speed. Thus, a modification of the chip could be re-announced, even several years after the launch of the first version of its
Transistors (number of transistors). The number of transistors on a chip. You can see that this figure has risen steadily
Microns (width in microns). One micron is one-millionth of a meter. This dimension is determined by the thickness of the thinnest wires on a chip. For comparison, the thickness of a human hair is 100 microns
Clock speed (clock speed). The maximum speed of the processor
Data Width. “Bit depth” ALU processor (ALU, ALU). 8-bit ALU can compose, subtract, multiply and perform other actions on the two 8-bit numbers. 32-bit ALU can work with 32-bit numbers. To add two 32-bit numbers, eight-bit ALU is accomplished in four directions. 32-bit ALU to do the task in a single instruction. In many (but not all) cases, the width of the external data bus coincides with the “bit depth” ALU. 8088 had a 16-bit ALU, but the 8-bit bus. For late “Pentium” was typical situation when the bus was already 64-bit, and ALU still remained 32-bit
MIPS (millions of instructions per second). Allows us to estimate the performance of the processor. Modern microprocessors operate so many tasks that the component has lost its initial value and can be used mainly for the comparison processing power of multiple processors (as in the table)

There is a direct link between the clock frequency and the number of transistors and the number of operations performed by the processor in one second. For example, the clock frequency of 8088 MHz was 5, and productivity: total 0.33 million operations per second. That is to execute an instruction required about 15 CPU cycles. In 2004, the processors are able to execute two instructions per clock cycle. This improvement came from increased number of processors on a chip.

The chip is also called the integrated circuit (or microchip). Most often it is small and thin silicon wafer, in which “imprinted” transistors. Chip, the party reaches two and a half centimeters, can contain tens of millions of transistors. Simple processors are squares with a side of only a few millimeters. And this size is enough for a few thousand transistors.
The logic of the microprocessor


To understand how a microprocessor, should examine the logic on which it is based, as well as get acquainted with the assembly language. This is the native language of the microprocessor.

The microprocessor is capable of performing a specific set of machine instructions (commands). Operating with these commands, the processor performs three main tasks:

C through his arithmetic-logic unit, a processor performs mathematical operations such as addition, subtraction, multiplication, and division. Modern microprocessors fully support floating-point operations (using a specific arithmetic processor floating point operations)
The microprocessor is able to move data from one memory to another type
The microprocessor has the ability to make a decision and, on the basis of his decision, “jump”, that is to switch on the implementation of a new set of commands

The microprocessor includes:

Address bus (address bus). The width of this bus may be 8, 16 or 32 bits. She takes care of sending the address in memory
Data bus (data bus) width of 8, 16, 32 or 64 bits. This bus can send data to memory or receive them from memory. When people talk about the “bit depth” of the processor, it is about the width of the data bus
Channels RD (read, read) and WR (write, write) for interacting with the memory
Clock line (bus clock), providing CPU cycles
Reset line (bus erase bus reset), the program counter is reset to zero and restarts the execution of instructions

Since the information is quite complex, we assume that the width of both tires – and the address and data buses – is only 8 bits. And a quick look at the components of this relatively simple microprocessor:

Registers A, B and C are logic chips used for intermediate storage
Address latch (address latch) is similar to registers A, B and C
The program counter is a logic circuit (latch), able to increment the value by one in a single step (if he has obtained the corresponding command) and the reset value (subject to obtaining the appropriate command)
ALU (arithmetic logic unit) can carry between 8-bit numbers, the operations of addition, subtraction, multiplication and division, or to act as a conventional adder
Test register (test case) is a special latch that holds the results of comparisons produced by the ALU. Typically, the ALU compares two numbers, and determines whether they are equal or one of them bigger than the other. The test register can also store the carry bit of the last actions of the adder. It stores these values ​​in the trigger circuit. In the future, these values ​​can be used for instruction decoder decision
Six blocks of the diagram marked as “3-State». This sort buffers. The plurality of power output may be connected with a wire, but the sort buffer allows only one of them (at a time) to transmit the value of “0” or “1”. Thus the sort buffer is able to skip values ​​or close the output source to transmit data
The command register (instruction register) and the instruction decoder (instruction decoder) keep all of the above components under the control of

This diagram is not displayed line decoder control commands, which can be expressed as the following “Orders”:

“A Register to take the value of entering the present moment from the data bus”
“Register B to take the value supplied at the moment from the data bus”
“Register of C take the value supplied in the moment of the ALU”
“Register to take the value of the program counter, coming now from the data bus”
“The address registers to take the value supplied at the moment from the data bus”
“The command register to take the value of entering the present moment from the data bus”
“Increase the value of the program counter [per unit]”
“The program counter zeroed”
“Activate one of the six sorting buffers” (six separate control lines)
«Report to the Arithmetic Logic Unit, what operation to perform it”
“Test register to take the test bits of the ALU”
“Activate RD (read channel)”
“Activate WR (channel recording)”

In the instruction decoder receives the data bits from the test register, the synchronization channel and from the instruction register. If the description of the tasks to simplify the decoder instructions, it can be said that this particular module “tells” the processor that needs to be done at the moment.
Microprocessor memory


Getting to know the details regarding the computer memory and its hierarchy will help to better understand the contents of this section.

Earlier we wrote about tires (address and data) as well as the channel read (RD) and write (WR). These buses and channels connected to the memory: RAM (RAM, RAM) and read only memory (ROM, ROM). In this example, a microprocessor is considered, the width of each bus which is 8 bits. This means that it is able to perform addressing 256 bytes (two to the eighth power). At one time it can be read from memory or written to it 8 bits data. We assume that this simple microprocessor has 128 bytes of ROM (starting at address 0) or 128 bytes of memory (starting at address 128).

Permanent memory module contains a certain pre-set constant set of bytes. The address bus requests a specific ROM bytes to be transferred to the data bus. When the read channel (RD) changes state, the ROM module provides the requested byte data bus. That is, in this case, the data can only be read.

From the RAM, not only the processor can read information from, it can also write data to it. Depending on read or write is performed, the signal goes through a channel or read (RD), or through a recording channel (WR). Unfortunately, RAM is volatile. When power is removed, it loses all housed in its data. For this reason, a computer, a permanent nonvolatile memory.

Moreover, it is theoretically a computer can do and do without memory. Many microcontrollers allow you to place the necessary data bytes directly into the processor chip. But without the ROM indispensable. In personal computers ROM is called basic input and output (BIOS, BIOS, Basic Input / Output System). At setup starts with a microprocessor executing commands found them in the BIOS.

Teams do the BIOS testing of computer hardware, and then they turn to the hard drive and select the boot sector. This boot sector is a small separate program that the BIOS first reads from the disk, and then puts in memory. The microprocessor then begins executing commands located in the RAM boot sector. Boot sector program informs the microprocessor as to which data (intended for later execution by the CPU) to be moved further from the hard disk into memory. That is how the process of loading the processor operating system.
Instructions microprocessor


Even a simple microprocessor capable of handling a large set of instructions. The instruction set is a kind of pattern. Each of these loaded into the instruction register instruction has its value. People are not easy to remember the sequence of bits, so each instruction is described as a short words, each of which reflects a certain team. These words make up an assembly language processor. The assembler translates the words into comprehensible language processor binary codes.

Here is a list of words, the assembly language instructions for a simple conditional processing, which we consider as an example to our narrative:

LOADA mem – Load (load) A register of a memory address
LOADB mem – Load (load) B register of a memory address
CONB con – Upload a constant value (constant value) in B register
SAVEB mem – Save (save) the value of register B in memory at a certain address
SAVEC mem – Save (save) the value of register C to memory at a specified address
ADD – Fold (add) the registers A and B. The result of action to save the register C
SUB – Subtract (subtract) the value of register B of the register values ​​A. The result of action to save the register C
MUL – Multiply (multiply) the registers A and B. The result of action to save the register C
DIV – Split (divide) the value of register A to the value of register B. The result of action to save the register C
COM – Compare (compare) the registers A and B. The results are transmitted to the test register
JUMP addr – to jump (jump) to the address
JEQ addr – If the condition of equality of the two registers, jump (jump) to the address
JNEQ addr – If the condition of equality of the two registers is not satisfied, jump (jump) to the address
JG addr – If the value is greater, jump (jump) to the address
JGE addr – If the value is greater than or equal, jump (jump) to the address
JL addr – If the value is less, jump (jump) to the address
JLE addr – If the value is less than or equal, jump (jump) to the address
STOP – Stop (stop) execution

English words for actions performed in parentheses are no accident. So we can see that the assembly language (and many other programming languages) is based on the English language, which is the usual means of communication of the people who created the digital technology.
The microprocessor’s operation as an example of the factorial

Математические вычисления

Consider the work of the microprocessor on the performance of a specific example, a simple program that computes the factorial of the number “5”. We first solve this puzzle “in a notebook”:

factorial 5 = 5! = 5 * 4 * 3 * 2 * 1 = 120

The C programming language this piece of code that performs this calculation is as follows:

a=1;f=1;while (a < = 5){ f = f * a; a = a + 1;} When the program has finished, the variable f will contain the value of the factorial of five. The C compiler translates (ie transfers) this code in assembly language instruction set. In our processor, RAM starts at address 128, and the memory (which contains the assembly language) starts at address 0. Consequently, the language of the processor, the program will look like this: // Предположим, что a по адресу 128// Предположим, что F по адресу 1290 CONB 1 // a=1;1 SAVEB 1282 CONB 1 // f=1;3 SAVEB 1294 LOADA 128 // if a > 5 the jump to 175 CONB 56 COM7 JG 178 LOADA 129 // f=f*a;9 LOADB 12810 MUL11 SAVEC 12912 LOADA 128 // a=a+1;13 CONB 114 ADD15 SAVEC 12816 JUMP 4 // loop back to if17 STOP

Now the next question is: how do all these teams look to permanent memory? Each of these statements should be presented as a binary number. To facilitate the understanding of the material, we assume that each of the teams of assembly language we are considering the processor has a unique number:

CONB – 3
SAVEC mem – 5
ADD – 6
SUB – 7
MUL – 8
DIV – 9
COM – 10
JUMP addr – 11
JEQ addr – 12
JNEQ addr – 13
JG addr – 14
JGE addr – 15
JL addr – 16
JLE addr – 17
STOP – 18

We assume these numbers codes of machine instructions (opcodes). They are called operation codes. With this assumption, our small program in non-volatile memory will be represented in the form:

// Предположим, что a по адресу 128// Предположим, что F по адресу 129Addr машинная команда/значение0 3 // CONB 11 12 4 // SAVEB 1283 1284 3 // CONB 15 16 4 // SAVEB 1297 1298 1 // LOADA 1289 12810 3 // CONB 511 512 10 // COM13 14 // JG 1714 3115 1 // LOADA 12916 12917 2 // LOADB 12818 12819 8 // MUL20 5 // SAVEC 12921 12922 1 // LOADA 12823 12824 3 // CONB 125 126 6 // ADD27 5 // SAVEC 12828 12829 11 // JUMP 430 831 18 // STOP

As you can see, seven lines of C code has been converted into 18 lines of assembly language. They took in the ROM 32 bytes.


Talk about the need to start decoding c philological examination of issues. Alas, not all computer terms are unambiguous correspondence in Russian language. Translation of terminology often walked spontaneously, and therefore the same English term may be translated into Russian several options. That is what happened with the most important component of microprocessor logic «instruction decoder». Computer scientists call it, and the instruction decoder and the decoder instructions. None of these variants of the name can not be called nothing more nor less “correct” than the other.

Instruction decoder is needed in order to translate every machine code into a set of signals that drive the various components of the microprocessor. If you simplify the essence of his actions, then we can say that he agrees “software” and “hardware”.

Consider the work of the instruction decoder for example, instructions ADD, performing the operation of addition:

During the first clock cycle of the processor are loaded command. At this stage, the instruction decoder is necessary: ​​to enable sorting buffer for the program counter; activate the read channel (RD); activate the latch sort buffer to pass input to the command register
During the second cycle of the CPU clock ADD instruction is decoded. At this stage, the arithmetic logic unit performs addition and transmits the value to the register C
During the third cycle of the CPU clock counter is incremented by one (in theory, this action intersects occur during the second cycle)

Each command can be represented as a set of operations performed successively, which are manipulated in a certain order components of the microprocessor. That is, the program instructions lead to physical changes completely: for example, change the position of the latch. Some instructions may require to perform their two or three clock cycles of the processor. Another may require five or even six cycles.
Microprocessors: Performance and Trends

Микропроцессоры развиватся стремительно

The number of transistors in a processor is an important factor affecting its performance. As previously shown, the processor 8088 to perform one instruction required 15 clock cycles. And in order to perform one 16-bit operation, care and did about 80 cycles. Was arranged so that the CPU multiplier ALU. The more transistors and more powerful multiplier ALU, the best time to make your processor in a single clock cycle.

Many transistors technology support pipelining. Within the pipeline architecture is executable instructions partial overlapping each other. Regulations may require for its execution of the same five cycles, but if the processor simultaneously processed five teams (in various stages of completion), the average performance of one instruction requires one clock cycle of the processor.

In many modern processors, the instruction decoder is not alone. And each of them supports pipelining. This allows more than one instruction per clock cycle. For this technique requires an incredible array of transistors.
64-bit processors


Although the mass distribution of 64-bit processors have only a few years ago, they have been around for a relatively long time: since 1992. And Intel, and AMD now offer such processors. 64-bit can be considered a processor that has a 64-bit arithmetic logic unit (ALU), 64-bit registers and 64-bit buses.

The main reason for which the processors need 64 bits, is the architecture that extends the address space. 32-bit processors can only access two or four gigabytes of RAM. Once these figures seemed huge, but the years passed, and today a memory no one can not be surprised. A few years ago, conventional computer memory was 256 or 512 megabytes. In those days chetyrehgigabaytny limit prevented only the servers and machines that are running large databases.

But very quickly it turned out that even ordinary users often have neither of the two, or even four gigabytes of RAM. 64-bit processors that annoying limitation does not apply. Address space available to them these days seem endless: two in the sixty-fourth degree of bytes, then there is something about a billion gigabytes. In the foreseeable future, as the giant of RAM is not expected.

64-bit address bus, and the extensive and high-speed data bus corresponding motherboards, enable 64-bit computers to increase the speed of the input and output of data in the process of interaction with devices such as hard drive and graphics card. These new features greatly enhance the performance of today’s computers.

But not all users will experience the benefits of 64-bit architecture. It is necessary, first of all, to those involved in editing videos and photos, as well as working with a variety of great pictures. 64-bit computers appreciated by lovers of computer games. But those users who are using the computer simply communicate in social networks and roam the expanses of the Web yes edit text files any advantage of these processors will likely just do not feel.

According to the materials computer.howstuffworks.com
Back New ion rocket engine NASA set a record time of
Samsung began selling forward curved OLED-TV
Tags: Intel , Memory , Processors .


Tags: , ,

In: Technology & Gadgets Asked By: [15446 Red Star Level]

Answer this Question

You must be Logged In to post an Answer.

Not a member yet? Sign Up Now »