one , Basic knowledge
When it comes to computers, I have to say von Neumann , Today's computer is also called von Neumann computer , So what is it made of :

* controller
* storage
* Arithmetic unit
* input device
* output device
Early CPU = controller + Arithmetic unit
contemporary CPU = controller + Arithmetic unit + storage
two , Memory hierarchy

Cpu I've explained that , That's what I mentioned above , He's called the central processing unit
First of all, let's explain the auxiliary deposit , Main memory , Cache access speed is from low to high .

CPU Reading and writing is very fast , occasionally CPU You need to get data from main memory , Because the main memory is slow , So this will lead to CPU Idling occurs , The result is to make the CPU Reduced utilization . The emergence of cache is to solve this problem ( solve CPU Speed mismatch with main memory ); In fact, secondary storage is to solve the problem of insufficient main storage .
three , Computer instruction
Computer instructions consist of two parts :

The instruction types are divided into :
1. Data transmission type
2. Arithmetic logic operation type
3. Shift operation
4. Control command
four , controller
The controller is CPU One of the important parts of , It has a lot of parts , as follows :
* Program counter - Stores the address of the next instruction
* sequence generator - send CPU Rhythmic work
* Instruction decoder - Translation instruction
* Various registers ( Instruction register , Main memory data register, etc )
five , Arithmetic unit
The arithmetic unit is CPU One of the important parts of , It has a lot of parts , as follows :

* Data buffer - Temporarily store the output and input data
* ALU( Arithmetic logic unit )- calculation
* Status register ( overflow , Positive and negative )
* General purpose register ( Temporary storage of data and instructions , It can also be saved ALU Intermediate result )
six , CPU Instruction execution process

They are connected by on-chip bus


first , The program counter gets the address of the command to be executed in the next step 101, And then the command cipher , find 101 This address , Send the operation code and address code to the instruction register , At the same time, the program counter will execute the address of the next command :102
; But the register does not know the contents of the address code , I don't know what the opcode means , It is then sent to the instruction decoder , The data in the address code will be parsed here , And explain the command of operation code . The instruction decoder then understands the content , It sends the information to the arithmetic unit ,MOV
(R1,R0) It's syntax in assembly , It means to put R0 Copy content in to R1;
first ALU Will be R0 Data for 100 Load in , Then it is sent to the data buffer through the bus , here ALU Will be R1 Replace with R0 Content of .

Technology