Home  >  Article  >  What are the two parts that make up a computer instruction?

What are the two parts that make up a computer instruction?

青灯夜游
青灯夜游Original
2021-03-19 14:12:10127709browse

The two parts that make up computer instructions are operation codes and address codes. Usually a computer instruction includes two aspects: operation code and operand (address code); the operation code determines the operation to be completed, and the operand refers to the data participating in the operation and the unit address where it is located.

What are the two parts that make up a computer instruction?

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

Computer instructions are instructions and commands that direct the work of the machine. A program is a series of instructions arranged in a certain order. The process of executing the program is the working process of the computer. The controller relies on instructions to direct the machine to work. People use instructions to express their intentions and give them to the controller for execution.

Computer instruction format usually contains two parts: operation code and operand (address code). The operation code determines the operation to be completed, and the operand refers to the data participating in the operation and the unit address where it is located.

In computers, operation requirements and operand addresses are represented by binary numbers, called operation codes and address codes respectively. The entire instruction is stored in the memory in the form of binary encoding.

Execute the program:

The sequential execution of the instructions will complete the execution of the program, so it is necessary to understand the execution process of the instructions. The first is to fetch and analyze instructions. According to the order specified by the program, the currently executed instructions are fetched from the internal memory and sent to the instruction register of the controller. The fetched instructions are analyzed, that is, what operations the computer should perform are determined based on the operation codes in the instructions.
The second is to execute the instruction. According to the instruction analysis results, the controller issues a series of control potentials required to complete the operation in order to direct the relevant components of the computer to complete the operation. At the same time, it is also ready to fetch an instruction.

For more programming related knowledge, please visit: Programming Video! !

The above is the detailed content of What are the two parts that make up a computer instruction?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn