search
HomeCommon ProblemWhat two parts does the instruction consist of?

Computer instructions consist of two parts: operation codes and operands. 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. The execution process of instructions: 1. Fetching and analyzing instructions; 2. Executing instructions.

What two parts does the instruction consist of?

The operating environment of this article: Windows 10 system, ThinkPad t480 computer.

What are instructions

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 computer's work process.

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. 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.

Composition of instructions

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.

Program execution process:

The sequential execution of instructions will complete the execution of the program, so it is necessary to understand the execution process of the instructions.

  • The first step 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 step is to execute the instructions. 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.

What two parts does the instruction consist of?

(Learning video sharing: Programming video

The above is the detailed content of What two parts does the instruction 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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools