Let's suppose to use this 32-bit number 66 DD FA EB.
Little Endian
0 x 100 ---> 66 (MSB)
0 x 99 ---> DD
0 x 98 ---> FA
0 x 97 ---> EB (LSB)
Big Endian
0 x 100 ---> EB (LSB)
0 x 99 ---> FA
0 x 98 ---> DD
0 x 97 ---> 66 (MSB)
I believe to have understood the correct order which bytes are stored in.
However my question is, which byte is read first when this 4-bytes word is accessed ?
is always the byte with the lowest address to be read first and then positioned so as to be the most significant or least significant depending on the endian of the computer?
I try to explain myself better. Take the example above of LITTLE ENDIAN.
The correct order which I wanna get is 66 DD FA EB
Now to achieve this, I could read the byte with the lowest address and place it on the right of the page, then continue to the left for the following bytes.
EB
FA EB
DD FA EB
66 DD FA EB
Result is 66 DD FA EB and that's correct.
or I could read from the byte with the highest address, place it on the left of the page, and continue to the right for the following bytes
66
66 DD
66 DD FA
66 DD FA EB
Result is Always 66 DD FA EB, and this is correct.
Since the memory address of the word is the address of the first byte(lowest address), independently of the endian, I assume that it is always the first byte(lowest address) to be read first, and then positioned in the correct order.
So my final question is,
which of the two modes I showed before is used by a computer in little endian to read the 4bytes-word in the proposed exemple ?