0
$\begingroup$

I am refering to MIPS (32 bits).

Is there any particular reason that when loading or storing a word, we address memory in bytes, but when we jump or branch using beq we address memory in words?

Thanks!

$\endgroup$

1 Answer 1

1
$\begingroup$

On MIPS, each instruction is exactly one word long, and is byte-aligned to words. Hence it makes no sense to jump to a byte address in the middle of a word, because that can't be the legal start of an instruction. Because the lower two bits of a jump address must be zero, you can describe more higher-order bits in the instruction encoding.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.