1

Possible Duplicate:
What are the benefits of the different endiannesses?

Byte order or endianness refers to the ordering of a sequence of elements (e.g., words, bytes, or bits) stored in memory or transmitted over a network.

Big-endian systems store the most significant byte first, while little-endian systems store the least significant byte first. Additionally, mixed-endian systems exist which use still other ordering conventions.

My questions: How is a given byte order chosen for a specific system/processor/protocol? What are the design considerations that influence these decisions? Do specific applications or tasks perform better with a given byte ordering? Does endianness matter from a physical or thermodynamic standpoint, or is byte order largely dictated by convention and compatibility issues?

Community
  • 1
  • 1
rphv
  • 5,409
  • 3
  • 29
  • 47
  • 1
    There's hardly anything standardized in the computing world, it seems. Everyone has their own opinion of what's best. – Jesse Jashinsky Jan 15 '13 at 17:38
  • When it comes to endianness both big and little endian have their respective strengths and weakness, such that there is no clear winner. So you get a religious war, much like vim v emacs, *et al*. – Paul R Jan 15 '13 at 17:40

1 Answers1

1

is byte order largely dictated by convention and compatibility issues?

Nowadays, mostly yes. Most choices will be based on the need to be compatible with existing systems. It's really no different to the Windows/Mac/Unix line-ending fiasco.

However, there may be some situations where a particular endianness has some practical implementation advantages for particular applications. For example, a little-endian system means that *(int16_t *)&my_int32 will give the "correct" result for an in-range value. See the Wikipedia article for more examples.

Oliver Charlesworth
  • 267,707
  • 33
  • 569
  • 680