A Register is the smallest memory on a processor. There are multiple registers on a processor assigned various tasks. In assembly language, we operate on data through a set of registers. There are different registers for each architecture such as MIPS registers, X86 registers, and ARM registers. It can be directly addressed or accessed.
A register is usually equal to the size of the processor. I.e., if a processor is 32 bit than the registers will also be 32 bits.
Whereas there are some basic registers used for various operation on a processor. Some of the basic registers are:
- Memory buffer register (MBR)
- Memory address register (MAR)
- Instruction register (IR)
- Instruction buffer register (IBR)
- Program counter (PC)
- Accumulator (AC) and multiplier quotient (MQ)
Mips Registers Table
|General Purpose Registors||Special Purpose Registors|
|$t7||$ra||PC (Program Counter)|
In MIPS assembly each register is 32 bit. These registers are divided into the general purpose and special purpose registers.
General Purpose Registers
There are 32 general purpose registers. General purpose means these all can be used as an operand in the instructions but still there are limitations for some registers. i.e
- $0, termed $zero, always has a value of “0”.
- $31, termed $ra (return address), is reserved for storing the return address for subroutine call/return.
Special Purpose Registers
There are three special purpose registers in MIPS ISA:
- HI/LO registers used to store the result from multiplication.
- PC register (program counter).
• Always keeps the pointer to the current program execution point; instruction fetching occurs at the address in PC.
• Not directly visible and manipulated by programmers in MIPS
If you have any further queries regarding MIPS register feel free to ask in comment box.