Fortune Telling Collection - Fortune-telling birth date - Are computer instructions and programs the same thing?

Are computer instructions and programs the same thing?

1, the principle is different

Instruction: The controller instructs the machine according to the instruction. People express their intentions with instructions and give them to the controller for execution. A set of different instructions that a computer can execute is called the instruction system of a computer. Each computer has its own special instruction system, and the instruction content and format are also different.

Program: The computer needs to load code and data. At the bottom of the computer, it is translated into machine language through advanced languages such as Java, C/C++ and C#. , and loaded by CPU.

2, the content is different

Instruction: including operation code and operand, determines the operation to be completed.

(1) Operator refers to the data and address of the device performing the operation.

(2) In the computer, the operation requirements and operand addresses are represented by binary digits, which are called operation code and address code respectively. The whole instruction is stored in memory in the form of binary code.

Program: written in some programming languages and running on a certain target structure system. For example, a program is like an article written in English (programming language), so that an English-speaking person (compiler) will also read this article (structural system) to read, understand and mark this article.

Extended data:

The characteristics of the program algorithm:

1, finiteness: the algorithm must be completed after a limited number of steps.

2. Feasibility: The algorithm is accurate and feasible, even in mathematics, but it is not feasible if the program cannot be executed in practical application.

3. Accuracy: Every step of the algorithm must have a clear meaning.

4. Input: The algorithm must have 0 or more inputs.

5. Outputs: An algorithm must have one or more outputs.

Baidu Encyclopedia-Program

Baidu encyclopedia-computer manual