Fortune Telling Collection - Fortune-telling birth date - What is an instruction? What is a program?

What is an instruction? What is a program?

A program consists of instructions, which are commands that instruct a computer to perform various operations. On the computer, the whole instruction set is called instruction system.

Instruction. A code that specifies an electronic computer to implement some control or operation. An instruction including an operation function and an operation object is a command instructing a computer to perform an operation, which consists of a string of binary digits.

An instruction usually consists of two parts: operation code+address code. Opcode: indicates the type or nature of the operation to be completed by the instruction, such as fetching data, adding data or outputting data. Address code: indicates the content of the operation object or the address of the storage unit.

Extended data:

Instruction execution program

The sequential execution of instructions will complete the execution of the program, so it is necessary to understand the execution process of instructions. The first is to obtain instructions and analyze instructions. According to the order specified by the program, the currently executed instructions are taken out of the memory and sent to the instruction register of the controller, and the taken instructions are analyzed, that is, what operation the computer should perform is determined according to the operation code in the instructions.

The second is to execute instructions. According to the result of instruction analysis, the controller sends out a series of control potentials needed to complete the operation, so as to command the relevant parts of the computer to complete the operation and prepare for the next instruction.

program run

In order to run the program, the computer loads the program code and possible data so as to be initialized to the startup state, and then calls some startup mechanisms. At the lowest level, these are initiated by the boot sequence.

In most computers, the operating system (such as Windows) loads and executes many programs. In this case, the computer program refers to a single executable map, not all programs currently running on the computer.

Baidu encyclopedia-computer manual

Baidu Encyclopedia-Computer Program