本文发表在 rolia.net 枫下论坛The term is used because of an analogy with the story Gulliver's Travels, in which Jonathan Swift imagined a never-ending fight between the kingdoms of the Big-Endians and the Little-Endians, whose only difference is in where they crack open a hard-boiled egg.
Big Endian:
A colorful way of describing the sequence in which MULTIBYTE numbers are stored in a computer's memory.
Storing the most significant byte in the lowest memory address, which is the address of the data. Since TCP defines the byte ordering for network data, end-nodes
must call a processor-specific convert utility (which would do nothing if the machine's native byte-ordering is the same as TCP's) that acts on the TCP and IP
header information only. In a TCP/IP packet, the first transmitted data is the most significant byte.
Most UNIXes (for example, all System V) and the Internet are Big Endian. Motorola 680x0 microprocessors (and therefore Macintoshes), Hewlett-Packard
PA-RISC, and Sun SuperSPARC processors are Big Endian. The Silicon Graphics MIPS and IBM/Motorola PowerPC processors are both Little and Big
Endian (bi-endian).
Little Endian:
Specifies that the least significant byte is stored in the lowest-memory address, which is the address of the data.
The Intel 80X86 and Pentium and DEC Alpha RISC processors are Little Endian.
Windows NT and OSF/1 are Little Endian.
Little Endian is the less common UNIX implementation.更多精彩文章及讨论,请光临枫下论坛 rolia.net
Big Endian:
A colorful way of describing the sequence in which MULTIBYTE numbers are stored in a computer's memory.
Storing the most significant byte in the lowest memory address, which is the address of the data. Since TCP defines the byte ordering for network data, end-nodes
must call a processor-specific convert utility (which would do nothing if the machine's native byte-ordering is the same as TCP's) that acts on the TCP and IP
header information only. In a TCP/IP packet, the first transmitted data is the most significant byte.
Most UNIXes (for example, all System V) and the Internet are Big Endian. Motorola 680x0 microprocessors (and therefore Macintoshes), Hewlett-Packard
PA-RISC, and Sun SuperSPARC processors are Big Endian. The Silicon Graphics MIPS and IBM/Motorola PowerPC processors are both Little and Big
Endian (bi-endian).
Little Endian:
Specifies that the least significant byte is stored in the lowest-memory address, which is the address of the data.
The Intel 80X86 and Pentium and DEC Alpha RISC processors are Little Endian.
Windows NT and OSF/1 are Little Endian.
Little Endian is the less common UNIX implementation.更多精彩文章及讨论,请光临枫下论坛 rolia.net