Big Endian and Little Endian

后端 未结 1 533
执念已碎
执念已碎 2021-01-05 14:58

Given is the snap shot of memory of a byte-addressable computer. What would be loaded into register $16 after execution of instruction lw $16, 24($17)

1条回答
  •  悲哀的现实
    2021-01-05 15:47

    You're right.

    More technically, in big-endian mode, the most significant byte is the one with the lowest address, and least significant byte is the one with the highest address. In little-endian mode, the most significant byte is the one with the highest address, while the least significant byte is the one with the lowest address.

    So the contents of $16 register would be

    If big-endian -> BADADBBD If little-endian -> BDDBDABA

    0 讨论(0)
提交回复
热议问题