Symbian
Symbian OS Library

FAQ-0312 Big endian v little endian?

[Index][spacer] [Previous] [Next]



 

Classification: General Category: Development
Created: 10/13/99 Modified: 09/11/2002
Number: FAQ-0312
Platform: Not Applicable

Question:
What's it all about?

Answer:
BigEndian Vs Little Endian is described in http://webopedia.internet.com/TERM/b/big_endian.html.

Refers to which bytes are most significant in multi-byte data types. In big-endian architectures, the leftmost bytes (those with a lower address) are most significant. In little-endian architectures, the rightmost bytes are most significant. For example, consider the number 1025 (2 to the tenth power plus one) stored in a 4-byte integer

Big Endian Representation
Byte 0 Byte 01 Byte 02 Byte 03
00000000 00000000 00000100 00000001

Little Endian Representation
Byte 0 Byte 01 Byte 02 Byte 03
00000001 00000100 00000000 00000000

The "network order" used in tcp/ip and most internet rfcs is big endian

EPOC ARM is little-endian, but has correctly matching graphics hardware, thus avoiding the "x86 + VGA" mistake.

Bit ordering: Serial comms uses little endian bit ordering. So, when sending the character 0x01 ( 00000001 binary) the 1 (referred to as the Least Significant Bit, or LSB) is always transmitted first.