Question: how lw works in mips?
Answer: The MIPS instruction that loads a word into a register is the lw instruction. ... The sum of the address in the base register with the (sign-extended) offset forms the memory address. Here is the load word instruction in assembly language: lw d,off(b) # $d <-- Word from memory address b+off # b is a register.