Big Endian and Little Endian.

netwind (网风)
本文发表在 rolia.net/zh 相约加拿大网上社区枫下论坛
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/zh
2001-6-22 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: show u another dark spot of c

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论