Open main menu

CDOT Wiki β

Changes

Endian

1,129 bytes added, 14:55, 4 January 2017
no edit summary
0x1006 0xEE
0x1007 0xFF
 
== Big-Endian ==
That is, each 16-bit word is stored in little-endian format, but the two 16-bit words are in big-endian sequence.
 
== Significance of Byte Order ==
 
Byte order can introduce ambiguity and complexity when transferring binary data between dissimilar systems; in network protocols and file specifications, it is critical to specify the order of multi-byte values. Some platform-independent remote procedure call (RPC) systems provide functions to ensure that data is always represented "on the wire" in a particular byte order.
 
Byte order can be significant for performance in some contexts. The 6502 processor, for example, loads the byte following an [Opcode|opcode] in memory while the opcode is being decoded. Due to little-endian encoding, this byte can be safely assumed to represent bit positions 0-7 regardless of whether the opcode's argument is 1 byte or 2 bytes; if big-endian encoding was used, the first byte read after the opcode might have to be shifted to bit positions 8-15 in the case of a 2-byte argument.
 
Binary fields in internet protocol (IP) packets are in big-endian order. For this reason, the processors on many routers and other high-speed network devices are big-endian (e.g., MIPS) or run in big-endian order (ARM).
== Origin of the Terms ==
The terms ''Big-Endian'' and ''Little-Endian'' originally appeared in the classic satirical tale [https://www.gutenberg.org/files/829/829-h/829-h.htm Gulliver's Travels] by Jonathan Swift, where they referred to which end of a boiled egg was opened first.