CPU register
A CPU register is a small, fast storage location within the Central processing unit (CPU) of a computer. They hold data that the CPU is currently processing such as operands (the values to be operated on) or the result of operations. They also hold memory addresses or instruction pointers. They normally are small in size such as 32 or 64 [bits. (This often is referenced within the type of CPU you have.) There are different types of registers:
- General-purpose registers (GRPs): Used for all kinds of operations.
- Special-purpose registers: These have specific purposes for processes:
- Instruction Register (IR): Holds the current instruction being executed.
- Program counter (PC): Holds the address of the next operation to be executed.
- Stack Pointer (SP): Points to the top of the stack.
- Status register: Contains flags that indicate the state of the CPU, such as whether an operation resulted in zero or incurred an overflow.