Fortune Telling Collection - Comprehensive fortune-telling - Explanation of computer working principle

Explanation of computer working principle

Computers automatically and quickly calculate and process data according to people's predetermined arrangements. People's predetermined arrangement is expressed by a series of instructions (operator's orders), which are called programs. Instructions instruct the computer to perform basic operations. A program needs a computer to complete a complete task. A set of different instructions that a computer can recognize is called the instruction set or instruction system of this computer. In the instruction system of microcomputer, single address and double address instructions are mainly used, in which 1 byte is the operation code, which specifies the basic operation to be performed by the computer, and the second byte is the operand. Computer instructions include the following types: data processing instructions (addition, subtraction, multiplication, division, etc. ), data transmission instructions, program control instructions and state management instructions. The whole memory is divided into several memory cells, and each memory cell can generally store 8-bit binary numbers (byte addressing). Each local unit can store data or program code. In order to effectively access the content stored in the unit, each unit is given a unique number to identify it, that is, an address.

According to the principle of von Neumann's stored program, when a computer executes a program, it must first put the relevant programs and data to be executed into memory. When executing a program, the CPU takes out an instruction, executes it according to the contents of the current program pointer register, then takes out the next instruction for execution, and so on until the program ends. Its working process is the process of constantly fetching and executing instructions, and finally putting the calculation results into the memory address specified by the instructions. Computer hardware components involved in the computer work process include memory, instruction register, instruction decoder, calculator, controller, arithmetic unit and input/output devices. , which will be mainly introduced in the following content.