CPU: Registers

The CPU uses various types of registers, each serving a specialized purpose to optimize calculations.

General-purpose registers (GPRs) are versatile and can hold data or memory addresses, depending on the CPU's immediate needs. A programmer can use these 'customizable' registers to store any type of data they choose to.

In contrast, special-purpose registers are designed for specific control tasks, such as managing program flow and monitoring system status.

Among these are the program counter register, which stores the address to the next instruction of the program, and thus keeps track of the CPU's current position in a program, and the status register, which monitor the outcome of operations, keeps track of overflow, and stores carry bits.

This classification of registers helps in organizing and optimizing data flow within the CPU, enhancing overall performance.