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

the first picture is the problem. the second one explanation. answers are differ

ID: 3728123 • Letter: T

Question

the first picture is the problem. the second one explanation. answers are different and also I need clarification of how I'm counting stored values. for example, i get that array one continues on aChar so starts at 0x1001 0003, but how I can know that ends on 0
0x1001 0013 or whichever is correct. And also for the other stored values. I don't understand the system of getting-counting these values.

data 2 achar : .byte ‘ , 'y,,e.x, array1: word 0x1234, 0x5678, 6xff, Oxee, 0xdod array2: .word 0 , oxe , 0h?53 mych a r : .byte '.e , array3: .byteC 20 1 va102 : .word 0x231.gs, 55 text .globl main main la $t1, array1 la $t2, array2 1a $s2, array2 la $s3, va102 Mars, the MIPS emulator we use in the classroom, starts its placement of local data declared using the data directive at hex address #0x1001 0000 (Note that this is a 32-bit HEX value). Indicate the values stored in each of the registers or labels below. such. State all answers as hex values. If there's an error, indicate (a) (2 points) What value is stored in st1? x678 (b) (2 points) What value is stored in $s4? (c) (1 point) What value is stored in $s2? 523 (d) (1 point) What value is stored in $s3? 0001008 0x1001 0U3

Explanation / Answer

1.The aChar variable is of type byte,such that the address
starts from0x10010000 to 0x10010002 ,as there are 3 variables
namely z,y,x.each of these will be stored in location
0x1001000 -z,0x10010001-y and x in 0x10010002.

2.The array1 variable is of type word,such that 1word=4bytes
so the address starts from 0x10010004 for 0x1234
0x10010008 for 0x5678,0x10010012 for 0xff
0x10010016 for 0xee,0x10010020 for 0xdd

3.The array2 variable is also word byte,such
that 1word=4bytes,so the address for 0xf will be
0x10010024 ,as the last location is 0x10010020 and
occupies 4 bytes from 20.so the next location starts
from 24.the 0xe variable address is 0x10010028,for
0xd is 0x10010032.

4.The myChar variable is of type byte such that
1byte=8bits.The address location for e will be
0x10010036,as in the previous variable it occupies
upto 35.

5.The variable array3 is of type byte such that the
address of a is 0x10010037,address of b is 0x10010038
adress of c is 0x10010039.

6.The variable val01 is of type word such that the address
location for 0x73 will be 0x10010040.(40-43)

7.The space is used upto 7.(44-50)

8.The variable val02 is of type word such that the address
for 0x23 will be 0x10010052


a.The value stored in $t1 is 0x1001004,such that
the array1 variable is stored in that.as it address
start from 0x1001004.

b.The value stored in $s4 is 0x5678,such that 4($t1)
as in the t1 we have array1 and here they asked 4($t1)
such that the next location is 0x5678.As it is 4($t1)
means the next location after4 bytes.

c.The value stored in $s2 is 0x10010018.Such that
the instruction consists of variable array2.As its
memory location starts from 24,the hex value is
0x18 for 24.so the value be 0x10010018.

d.The value stored in $s3 is 0x10010034,Such that the
instruction consists of the variable val02 and its address
location starts from 54,and the hex value for 54
is 0x34.so value be like 0x10010034.

In the second screen shot the answers are different ,as
they have considered the address location for array1
variable starts from the location 0x10010003,as the variable
aChar has address locations from 0x1001000-0x10010002.
For the array1 address location is 0x1001003-
0x10010013.
For the array2 variable address is at 0x10010017-
0x1001001F. and so on the address values have varied.

So that the answer has been changed here.I guess 2nd
screen shot is correct with all answers.