Home  >  Article  >  What does a computer instruction generally consist of?

What does a computer instruction generally consist of?

尚
Original
2019-12-11 11:20:2930202browse

What does a computer instruction generally consist of?

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.

Principle:

The controller directs the machine to work through instructions. People use instructions to express their intentions and give them to the controller for execution. The total set of different instructions that a computer can execute is called the computer's instruction system. Each computer has its own specific instruction system, and its instruction content and format are different.

Usually an instruction includes two aspects: operation code and operand. The operation code determines the operation to be completed. 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.

General computer functions divide instructions into the following types:

(1) Arithmetic operation instructions;

(2) Logical operation instructions;

(3) Data transfer instructions;

(4) Shift operation instructions;

(5) Stack and stack operation instructions;

(6) String processing instructions. ;

(7) Input and output (I/O) instructions;

(8)Other instructions.

This article comes from the FAQ column.

The above is the detailed content of What does a computer instruction generally consist of?. 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