Given: 34 9D 6A 7E
Most Significant Bit(MSB): 34
Least Significant Bit(LSB): 7E
Each cell store 1 byte = 8bits
Big Endian – MBS goes first
34 (MSB)
|
9D
|
6A
|
7E(LSB)
|
|
address
|
1000
|
1001
|
1002
|
1003
|
Little
Endian – LBS goes first - (Left Justify)
7E(LSB)
|
6A
|
9D
|
34(MSB)
|
|
address
|
1000
|
1001
|
1002
|
1003
|
Another example:
address: 0x1D20
value : 0x5AF0
reading memory on little-endian:
0x1D20 stores F0
0x1D21 stores 5A
reading memorya on big-endian :
0x1D20 stores 5A
0x1D21 stores F0
address: 0x1D20
value : 0x5AF0
reading memory on little-endian:
0x1D20 stores F0
0x1D21 stores 5A
reading memorya on big-endian :
0x1D20 stores 5A
0x1D21 stores F0