There's something I'm wondering about and I find it hard to find the answer.
Say you have a 16-bit number with decimal value:
57514
In binary, this is, as a human would write it:
1110000010101010
In Intel's little endian order this becomes:
1010101011100000
These bits, when represented in RAM, caches, ..., are, I guess, physically stored next to each other.
The question is: in what order are these bits physically laid out on RAM, and in the CPU caches? Same question for 32-bit, 64-bit integers, and floating point numbers.
It could be any of the following (mirroring still matters, e.g. if two numbers are stored next to each other...):
1110000010101010
1010101011100000
0101010100000111
0000011101010101
E.g. say some archeolisist in the far future would uncover a piece of RAM that was in the freezer all that time and look at it in a microscope that can somehow show the bit values, in what order would he see the bits compared to the numbers they represent?
Just a philosophical thing I'm wondering, nothing more
![:)](http://public.gamedev.net//public/style_emoticons/<#EMO_DIR#>/smile.png)
EDIT: removed parts about "hard disk", after all there it's file format dependent. But in RAM it's not, I'm talking about C code using primitive types like shorts, longs, floats, etc...