Big endian, little endian question. 
Author Message
 Big endian, little endian question.


If the following memory dump (64 bits) is from a little endian processor
(e.g. intel)

01 02 03 04  0A 0B 0C 0D

what will the dump of the same 64 bits look like on a big endian
processor (e.g motorola) ?

Will it be this ?
04 03 02 01  0D 0C 0B 0A


Mon, 01 Sep 2003 05:24:22 GMT  
 Big endian, little endian question.
It depends on the word size.
Usually, endianness refers to byte/octet sequence within a word.
As to what a "memory dump" looks like, that depends on what
representation is used for what value; a char array looks very
much the same regardless of the system, but wider integers
depend on the chosen representation, which might or might not
be the one the machine architect had in mind.  For example, on
the PDP-11, 32-bit integers had a screwy layout as far as the
FP11 floating-point hardware was concerned, big-endian for
16-bit words within the 32-bit doubleword but litle-endian
for 8-bit bytes within each 16-bit word.  PDP-11 languages such
as fortran sometimes chose a different representation
(consistently little-endian).
In summary, your question needs to be made more specific.
Why don't you just try it for the particular usage you have
in mind?

Mon, 01 Sep 2003 12:43:47 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Big Endian vs Little Endian and other questions

2. Read double little endian on big endian machine

3. Big Endian/Little Endian

4. Big Endian->Little Endian for floats

5. big endian on SUN to little endian on Intel conversion

6. big-endian vs. little-endian

7. Big Endian/Little Endian

8. Big endian to Little endian

9. little-endian and big-endian in bit-order

10. Big Endian - Little Endian

11. Floats: Big-endian/Little-endian conversion

12. Big-endian & Little-endian


Powered by phpBB® Forum Software