One, the composition of the CPU
The CPU is divided into 4 major components, namely:
| Register Device |
Controller |
Arithmetic Device |
Clock |
| Some values can be staged to store data (equivalent to memory in the CPU) |
Control register to read and write and replace operations |
Auxiliary Unit, is the Coordinator |
The clock is the CPU that determines the speed of the |
In these four components, we programmers will use the most is the register, so the next focus on the register.
Second, register
The CPU registers of a modern computer roughly have the following types, or a table to represent
| Accumulator |
Flag Register |
Program Counter |
Base Address Register |
| The fastest to do the cumulative operation |
Use 32-bit space to record the various states of the CPU, such as the fourth Zero of the logo bit can be used as a logic of true and false judgments, there are other bits can record overflow or some other state |
Store the address of the next instruction |
The starting position of the current data memory |
| Variable Address registers |
Universal Registers |
Instruction Registers |
Stack Registers |
| The relative position of the storage memory, that is, the offset from the base address, used with the base address register, base + change = Actual memory address |
In layman's parlance, what can be done, programmers use the most registers |
Storage instructions for CPU internal use only, external cannot operate |
The starting position of the record stack |
I don't know much about them, so I just remember them.