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

Please explain why the answer is 0x416B and not 0x4147... ----------------------

ID: 3834048 • Letter: P

Question

Please explain why the answer is 0x416B and not 0x4147...

-------------------------------------------------------------------------------------------------------------------

The following data segment starts at memory address 0x4100 (hexadecimal)

.data
printString BYTE "Do not add decimal to hex",0
someBytes WORD 36 DUP(0)
moreBytes BYTE 10, 20, 30, 40, 50, 60, 70, 80, 90
questionAddr DWORD ?
ignoreMe WORD ?

What is the hexadecimal address of questionAddr?
A. 0x4162
B. 0x416B (this is the answer, but why?)
C. 0x4207
D. 0x411A

----------------------------------------------------------------------------------------------------------------------------------

Here is how I did the problem:

size of printString = 26

size of someBytes = 36

size of moreBytes = 9

26+36+9=71

convert decimal to hex, 71 -> 0x47

0x47 + 0x4100 = 0x4147.... which is wrong apparently?

Explanation / Answer

u have done right but there is 1 mistake

size of printString = 26

size of someBytes = 36*2=72;

size of moreBytes = 9

26+72+9=107

converting in into hex=107->6B

now adding 4100+6B=0X416B