What is a computer CPU? Cup is the CPU (central processing unit), which is the computing core and control core of a computer. CPU, internal memory and typing/output devices are the three core components of the computer. CPU is the brain of the computer, more than 90% of the data information is done by it. Its speed of work directly affects the whole computer running speed.
How the CPU Works
The CPU takes instructions from memory or cache memory, puts them in the instruction register, and decodes the instructions. It breaks down the instructions into a series of micro-operations, and we then look at a variety of control commands, perform the micro-operation series, and complete the execution of an instruction according to it.
An instruction is a basic command that a computer prescribes the type and operand of an action. Directives are composed of one byte or more bytes, including the opcode field, one or more fields related to the operand address, and most state words and signatures that characterize the state of the machine. Some directives also directly contain the operand itself.
1. Extract
The first phase, extraction, retrieves instructions (either numerically or a series of values) based on memory or cache memory. The Application counter (program Counter) specifies the location of the memory, and the program counter holds the numeric value to identify the current program location. In other words, the program counter records the traces of the CPU in the current program.
After extracting the instruction, the program counter increases the memory cell according to the instruction length. The extraction of instructions must often be based on relatively slow memory, which causes the CPU to wait for instructions to be sent. This question is mainly addressed in the fast-access and pipeline architecture of modern processors.
2. Decoding
The CPU determines its execution behavior based on the instructions it extracts from the memory. In the decoding phase, the instruction is disassembled into a meaningful fragment. A numeric solution is used to interpret the instructions according to the CPU's instruction set schema (ISA) definition.
Part of the instruction value is the operation code (OPCODE), which indicates which operations to perform. The other numerical value generally supplies the information required by the instruction, such as the operational target of an addition (addition) operation. The operating target we are going to look at may provide a constant value (i.e. immediate value), or a addressable value of a space: a register or memory address, which is determined by the addressable pattern.
In the old design, the instruction decoding part of the CPU is a hardware device that cannot be changed. But in many abstract and complex CPU and instruction set architectures, a micro-program is often used to help transform commands into various forms of signals. These micro-programs in the finished CPU is often able to rewrite, easy to change the decoding instructions.
3. Implementation
After the extraction and decoding phase, then proceed to the execution stage. In this phase, you connect to a variety of CPU parts that can perform the required operations.
4. Write back
The final stage, written back, is simply written back with the result of the execution phase in the required format. The result of the operation is often written into a register inside the CPU for quick access to subsequent instructions. In other cases, the result of the operation may be written in a slower, but larger, and less expensive main memory. Some types of directives manipulate program counters without directly producing results. These are then called "jumps" (jumps), and are in the program with cyclic behavior, conditional execution (through conditional jumps), and functions.
Many instructions also change the status bits of the flag registers. These flags can be used to influence the behavior of the program because they often show the results of various operations.
CPU is the core part of the computer, it can be said that computers, especially the rapid development of micro-computer, is essentially the CPU from low-level to advanced, simple one-way complex development process.
Source: Network Teaching Base original address: http://www.studynb1.com/wljc/184.html