Computer instruction


Instruction is the instruction and command to command the machine. The program is a series of instructions arranged in a certain order. The process of executing the program is the working process of the computer.
The controller commands the machine to work by instructions. People use instructions to express their intentions and give them to the controller for execution. The whole of various instructions that a computer can execute is called the computer’s instruction system. The first computer has its own specific instruction system, and its instruction content and format are different.
Usually, an instruction includes two aspects: one refers to what operation the machine performs, that is, giving the operation requirements; the other refers to the address of the operand in the memory or general register group, that is, giving the address of the operand.
In the computer, the operation requirements and operand address are represented by binary numbers, which are called operation code and address code respectively. The whole instruction is stored in the memory in the form of binary code.
The type and number of instructions are related to the specific model, which is not detailed here. Please refer to the specific machine information manual.
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 fetching instructions and analyzing instructions. According to the order specified by the program, take out the currently executed instructions from the memory and send them to the instruction register of the controller to analyze the obtained instructions, that is, determine what operation the computer should carry out according to the operation code in the instructions.
The second is to execute instructions. According to the command analysis results, the controller sends out a series of control potentials required to complete the operation, so as to command the relevant parts of the computer to complete the operation, and prepare for taking down a command at the same time.

Recommended Today

Implementation of finding key according to value in C + + Map

flyfish Header files required for testing #include <algorithm> #include <vector> #include <map> #include <string> initial std::map<int, std::string> t; t.insert(std::make_pair(1, “a”)); t.insert(std::make_pair(2, “b”)); t.insert(std::make_pair(3, “c”)); t.insert(std::make_pair(4, “d”)); Find value according to key std::string s = “”; auto it = t.find(2); if (it != t.end()) { s = (*it).second; } Find the key lambda method according to […]