Fetching instruction words from memory bytes

A teaching processor uses byte-addressed memory and fixed-width, 16-bit machine instructions. Its endianness is the rule assigning significance to the bytes within each instruction word. Little-endian instruction fetch treats the lower-addressed byte as the least significant byte; big-endian instruction fetch treats it as the most significant byte.


A debugger reports the following memory contents. Every address and byte value shown is decimal.


Byte address

Stored byte value

640

132

641

45

642

11

643

145


Complete the table with each fetched 16-bit word, interpreted as an unsigned decimal integer. Use exact integers. Compare the two fetch configurations using the same stored bytes without rearranging memory; you do not need to determine whether the resulting words encode valid operations.

Instruction-fetch configurationStarting byte addressUnsigned word value
Little-endian640
Little-endian642
Big-endian640
Big-endian642

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Machine and Assembly Language Programming Questions: