I have the following question:
.data
a: .word 12,-5,4,0
x: .byte 5
.text
main: addi $t1, $0, 8
lw $t2, a($0)
lw $t3, a($t1)
Can someone tell me what the value of $t3 will be? How can you access the 8th element when the array has a length of 4?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The value will be 4. MIPS is byte-addressed, not word-addressed. A word is 4 bytes, so a byte offset of 8 is equivalent to a word offset of 2.