EXERCISES

  1.      1. Assume you have a byte-addressable machine that uses 32-bit integers and you are storing the hex value 1234 at address 0:

    1. a) Show how this is stored on a big endian machine.

    2. b) Show how this is stored on a little endian machine.

    3.   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.

  2.      2. Show how the following values would be stored by byte-addressable machines with 32-bit words, using little endian and then big endian format. Assume that each value starts at address 1016. Draw a diagram of memory for each, placing the appropriate values in the correct (and labeled) memory locations.

    1. a) 0x456789A1

    2. b) 0x0000058A

    3. c) 0x14148888 ...

Get Essentials of Computer Organization and Architecture, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.