MIPS: J-format instructions and address encoding

I am confused when it comes to encoding an address for a J-format command.

From class notes:

Suppose L1 is located at address 4194340 in decimal format, which is 400024 in hexadecimal format. We fill in the target field as an address in the instructions (0x100009), and not in bytes (0x400024).

Can someone explain to me why this is?

+3
source share
1 answer

The team jmoves to the transferred target.

However, since the instruction set is limited to 32 bits and 6 for the op code, only 26 can be used for the transition purpose.

, a j , , IPC.

MIPS , , j, 6 IPC 26- j, , , " ". , 4, 2 0.

2 3-28. , j 4 , .

, , 0x400024 j 0x100009 i.e. 0x400024 >> 2. .

+3

All Articles