Abstract
+--------+---------------------------+
| Opcode | Address |
| 6 bits | 26 bits |
+--------+---------------------------+
- Instruction that tells CPU jump to Memory Address & execute Instruction starting from that point
- 2 sections - Opcode which is always
000010
, Memory Address - Supports
if-else
and loops - Label here refers to the partial target address
Jump to any address within the same 256 MB region as the current PC
Since the MIPS j-type instruction can only store a 26-bit address, we construct the full 32-bit target address by taking the upper 4 bits from the current program counter, appending the 26-bit immediate from the instruction, and adding two
0
bits at the end. We ignore the last 2 bits because MIPS instructions are word-aligned, allowing us to address256 MB
within the same region of the PC.