1. Assume you have a machine that uses 32-bit integers and you are storing the hex value 1234 at address 0:
a) Show how this is stored on a big endian machine.
b) Show how this is stored on a little endian machine.
c) If you wanted to increase the hex value to 123456, which byte assignment would be more efficient, big or little endian? Explain your answer.
a) The hex value 1234 at address 0 will store on big endian machine are shown in below diagram
b) The hex value 1234 at address 0 will store on little endian machine are shown in below diagram
c)
Little endian is more efficient because the additional information simply needs to be appended. With big endian, the "12" and "34" would need to shift to maintain the correct byte ordering.