109k views
1 vote
question 9 options: assume a computer has 32-bit integers. show how the value 0xcafebabe would be stored sequentially in memory, starting at address 0x100, on both a big endian machine and a little endian machine, assuming that each address holds one byte. write in the ordered one word (e.g. cafebabe) in a blank big-endian in the first, and little-endian in the second blank (ordered left to right)!

1 Answer

1 vote

On a big endian machine, the value 0xcafebabe would be stored sequentially in memory starting at address 0x100 as follows:

Address: 0x100 0x101 0x102 0x103

Value: ca fe ba be

The most significant byte (MSB) is stored at the lowest memory address (0x100), and the least significant byte (LSB) is stored at the highest memory address (0x103).

On a little endian machine, the value 0xcafebabe would be stored sequentially in memory starting at address 0x100 as follows:

Address: 0x100 0x101 0x102 0x103

Value: be ba fe ca

The least significant byte (LSB) is stored at the lowest memory address (0x100), and the most significant byte (MSB) is stored at the highest memory address (0x103).

User LeY
by
8.7k points