Home  >  Article  >  What is an instruction and what is a procedure?

What is an instruction and what is a procedure?

青灯夜游
青灯夜游Original
2021-04-22 15:20:3944743browse

Instructions are the basic operations that computers can implement. They are instructions and commands to direct the work of the machine. Instructions are in the form of binary numbers; instructions are composed of operation codes and address codes. The operation codes tell the computer what operations to perform, and the address codes Tell the computer which storage unit address to read the data involved in the operation. A program is a collection of instructions or commands.

What is an instruction and what is a procedure?

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

What is a directive? What two parts does a computer's instructions consist of?

Instructions are the basic operations that computers can implement. They are instructions and commands to direct the work of the machine. Instructions are all in the form of binary numbers.

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.

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.

What is a program?

A program is a set of instructions that a computer can recognize and execute. It is a collection of instructions or commands that runs on an electronic computer and is an information tool that meets certain needs of people.

It is written in some programming languages ​​and runs on some target architecture. For example, a program is like an article written in English (programming language). It needs to be read, understood, and marked by a person who understands English (compiler) and who can also read this article (structure system). article. Generally, computer programs based on English text must be compiled and linked into a digital format that is difficult for humans to interpret but can be easily interpreted by computers, and then put into operation.

For more related knowledge, please visit the FAQ column!

The above is the detailed content of What is an instruction and what is a procedure?. 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