Hello I have a couple questions I need some help with dealin
Hello, I have a couple questions I need some help with dealing with assembly language and MASM. Walking through one of them is good enough.
The four-byte sequence 0x92 0x8A 0x8A 0x57 stored in consecutive memory cells in a little-endian architecture represents ___________ (decimal) when interpreted as a 32-bit signed integer.
The four-byte sequence 0xF6 0x45 0x71 0x85 stored in consecutive memory cells in a little-endian architecture represents ___________ (decimal) when interpreted as a 32-bit signed integer.
The four-byte sequence 0xD6 0x85 0x41 0xA0 stored in consecutive memory cells in a little-endian architecture represents ___________ (decimal) when interpreted as a 32-bit signed integer.
The four-byte sequence 0x87 0x8B 0xDD 0x6A stored in consecutive memory cells in a little-endian architecture represents ___________ (decimal) when interpreted as a 32-bit signed integer.
The four-byte sequence 0x8D 0x0C 0x52 0xDB stored in consecutive memory cells in a little-endian architecture represents ___________ (decimal) when interpreted as a 32-bit unsigned integer.
The four-byte sequence 0x22 0x86 0x82 0x56 stored in consecutive memory cells in a little-endian architecture represents ___________ (decimal) when interpreted as a 32-bit unsigned integer.
Solution
Mark the questions from 1 to 6 one by one.
1.
The correct answer to fill the blank is 1468697234.0
Explanation:
As per the architecture of little-endian, the least significant byte has been stored first. Therefore, the significant bytes are stored as given below:
Therefore, signed integer would be (578A8A92)16.
So, the computation for computing the decimal value would be as follows:
= 2 * 160 + 9 * 161 + A * 162 + 8 * 163 + A * 164 + 8 * 165 + 7 * 166 + 5 * 167
= 2 + 144 + 10 * 162 + 32768 + 10 * 164 + 8388608 + 117440512 + 1342177280
= 1468039314 + 2560 + 655360
= 1468697234
Thus, the correct answer is 1468697234.0 (with the margin as 0).
2.
The correct answer to fill the blank is 2238793206.0
Explanation:
As per the architecture of little-endian, the least significant byte has been stored first. Therefore, the significant bytes are stored as given below:
Therefore, signed integer would be (857145F6)16.
So, the computation for computing the decimal value would be as follows:
= 6 * 160 + F * 161 + 5 * 162 + 4 * 163 + 1 * 164 + 7 * 165 + 5 * 166 + 8 * 167
= 6 + 15 * 161 + 1280 + 16384 + 65536 + 7340032 + 83886080 + 2147483648
= 1468039314 + 2560 + 655360
= 2238793206
Thus, the correct answer is 2238793206.0 (with the margin as 0).
3.
The correct answer to fill the blank is 2688648662.0
Explanation:
As per the architecture of little-endian, the least significant byte has been stored first. Therefore, the significant bytes are stored as given below:
Therefore, signed integer would be (A04185D6)16.
So, the computation for computing the decimal value would be as follows:
= 6 * 160 + D * 161 + 5 * 162 + 8 * 163 + 1 * 164 + 4 * 165 + 0 * 166 + A * 167
= 6 + 13 * 161 + 1280 + 32768 + 65536 + 4194304 + 0 + 10 * 167
= 2688648662
Thus, the correct answer is 2688648662.0 (with the margin as 0).
4.
The correct answer to fill the blank is 1792904071.0 (with the margin as 0)
Explanation:
As per the architecture of little-endian, the least significant byte has been stored first. Therefore, the significant bytes are stored as given below:
Therefore, signed integer would be (6ADD8B87)16.
So, the computation for computing the decimal value would be as follows:
= 7 * 160 + 8 * 161 + B * 162 + 8 * 163 + D * 164 + D * 165 + A * 166 + 6 * 167
= 7 + 128 + 11 * 162 + 32768 + 13 * 164 + 13 * 165 + 10 * 166 + 1610612736
= 1792904071
Thus, the correct answer is 1792904071.0 (with the margin as 0).
5.
The correct answer to fill the blank is 3679587469.0 (with the margin as 0)
Explanation:
As per the architecture of little-endian, the least significant byte has been stored first. Therefore, the significant bytes are stored as given below:
Therefore, signed integer would be (DB520C8D)16.
So, the computation for computing the decimal value would be as follows:
= D * 160 + 8 * 161 + C * 162 + 0 * 163 + 2 * 164 + 5 * 165 + B * 166 + D * 167
= 13 + 128 + 3072 + 0 + 131072 + 5242880 + 184549376 + 3489660928
= 3679587469
Thus, the correct answer is 3679587469.0 (with the margin as 0).
6.
The correct answer to fill the blank is 1451394594.0 (with the margin as 0)
Explanation:
As per the architecture of little-endian, the least significant byte has been stored first. Therefore, the significant bytes are stored as given below:
Therefore, signed integer would be (56828622)16.
So, the computation for computing the decimal value would be as follows:
= 2 * 160 + 2 * 161 + 6 * 162 + 8 * 163 + 2 * 164 + 8 * 165 + 6 * 166 + 5 * 167
= 2 + 32 + 1536 + 32768 + 131072 + 8388608 + 100663296 + 1342177280
= 1451394594
Thus, the correct answer is 1451394594.0 (with the margin as 0).


