2nd Chapter Register (CPU operating principle)
CPU Overview
* A typical CPU is composed of an operator, a controller, a register and other devices, which are connected by the internal bus;
* Difference: The internal bus realizes the connection between each device inside the CPU, and the external bus realizes the connection between the CPU and other devices on the motherboard;
*8086CPU has 14 registers {AX,BX,CX,DX,SI,DI,SP,BP,IP,CS,SS,DS,ES,PSW}
2.1 General-Purpose registers
*8086CPU all registers are 16-bit and can hold two bytes;
*AX,BX,CX,DX is typically used to store general data, known as general-purpose registers
*ax, for example, looks at the logical mechanism of the Register ↓
→
* A 16-bit register can store a 16-bit data. ↓
→ Data: 18; binary representation: 10010;
→ Store in register ax: ↓
* What is the maximum amount of data that a 16-bit register can store?
→2 16-time minus 1
The registers in the CPU of the previous generation of *8086 are all 8 bits;
* To ensure compatibility, these four registers can be divided into two separate 8-bit registers to use; ↓
→*ax can be divided into Ah and al;
→*BX can be divided into BH and BL;
→*CX can be divided into ch and cl;
→*DX can be divided into DH and DL; (H: High; L: low;)
*8086CPU 8-bit register storage logic ↓
→ In the case of AX, 8086CPU 16-bit registers are divided into two 8-bit registers ↓
→
The Low 8 bits (0-7) of the *ax form the Al register, and the high 8 bits (8-15) Form the AH register.
*ah and Al registers are 8-bit registers that can be used independently; (Downward ↓ compatible)
*8086CPU 8-bit memory data storage ↓
→
* What is the maximum amount of data that a 8-bit register can store?
→2 8-time minus 1
Small Turtle series → chapter II →2.1