I'm really confused about the store instruction in risc-v. When I store word from register to memory, after the word is copied into the mem, does it sign-extended or zero-extended or perhaps something else occur? if it's extended, does the extension starts from the lower bits or the upper bits?
I tried to solve this exercise but i can't understand why the orange (0x3) is the right answer.
these are the steps I followed:
- reg x11 gets the number 0x3f5 (0011 1111 0101 in binary) and is zero-extended to fill all the 32 bits
- the number is copied from reg x11 into reg x5 and is zero extended again to fill 32 bits
- i start counting bytes from the lsb so after 1 byte offset i'm pointing on 0xf and i load this byte
what is wrong with my solution?