Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

please i need a clarification in details so I can understand how program store t

ID: 3727537 • Letter: P

Question


please i need a clarification in details so I can understand how program store these values
thanks

Mist sto on a us ooun& or aChar : .byte ', 'y, arrayi:word array2T .wordGAP, ota. nyChar: .byte 'e 2 array3: byte , va101 word 0x73 3-7 .space 6 40 S .e..a mu pll va102 : .vord Ox23 48-5) .ec of 4 .text globl main main: la St1, array1 la $t2, array2 lu $s4, 4($t1) la $s2, array2 la s3, va102 the MIPS emulator we use in the classroom, starts its placement of local data declared x1001 0000. Note that this is 32-bihEX value). Mars, using the.data directive at hex address #o Indicate the values stored in each of the registers or labels below. If there's an error, indicate such. State all answers as hex values. (a) (2 points) What value is stored in $t1?0x10010004 0) (2 pointo) What value is stored in 3a4? ox5678 (c) (2 points) what value is stored in $s2? 0 (d) (2points) what value is stored in $sa? /0010 N 00 I oa(4) 20

Explanation / Answer

First of all the the starting address of array1 is stored in $t1 and as you know before array one there are two characters each occupy 8 bit address space so for the array one the address is starting from 0x1001 0004 as for character 'z' address- 0x10001 0000 to 0x1001 0001 and for character 'y' 0x1001 0002 to 1001 0003. The value at $s4 = 4($t1) = 4 + 0x1001 0004 = 0x1001 0008 and the value at this address is 0x5678. the value stored in $s2 = base address of array2 = 0x1001 0014 because array1 address ends in 0x1001 0013. the value stored in $s3 = address of val02 = 0x1001 0030 because the address on space ends with 0x1001 002f.