In: Computer Science
Big Endian
Location Contents (Byte) 400:
401:

a)
Divide 1036 successively by 2 until the quotient is 0
> 1036/2 = 518, remainder is 0
> 518/2 = 259, remainder is 0
> 259/2 = 129, remainder is 1
> 129/2 = 64, remainder is 1
> 64/2 = 32, remainder is 0
> 32/2 = 16, remainder is 0
> 16/2 = 8, remainder is 0
> 8/2 = 4, remainder is 0
> 4/2 = 2, remainder is 0
> 2/2 = 1, remainder is 0
> 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 10000001100
So, 1036 of decimal is 10000001100 in binary
so, 1036 in 16-bit binary is 0000010000001100
Answer: 0000010000001100
b)
Hexadecimal Binary
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111
Use this table to convert from binary to hexadecimal
Converting 0000010000001100 to hexadecimal
0000 => 0
0100 => 4
0000 => 0
1100 => C
So, in hexadecimal 0000010000001100 is 0x040C
Answer: 0x040C
c)
using big-endian
0x04 is stored at memory location 400
0x0C is stored at memory location 401
Answer:
---------
400: 0x04
401: 0x0C