Number (hex, up to 8 digits):
0x
12345678
000000FF
00000100
Writer stores it as:
little-endian
big-endian
Memory, lowest address on the left:
Reader expects:
little-endian
big-endian
Pick matching orders and the number survives. Pick different orders and the bytes are the same but the number is not.