

The difference between big and little endian is the order of the four bytes of the integer being stored. In both cases, the integer is broken into four bytes, 0x0A, 0x0B, 0x0C, and 0x0D, and the bytes are stored in four sequential byte locations in memory, starting with the memory location with address a, then a + 1, a + 2, and a + 3. These two diagrams show how two computers using different endianness store a 32-bit (four byte) integer with the value of 0x0A0B0C0D. In these cases, the endianness of the data must be understood and accounted for. However, endianness can become an issue when moving data external to the computer – as when transmitting data between different computers, or a programmer investigating internal computer bytes of data from a memory dump – and the endianness used differs from expectation. For this reason, programmers and computer users normally ignore the endianness of the computer they are working with.


Internally, any given computer will work equally well regardless of what endianness it uses since its hardware will consistently use the same endianness to both store and load its data. The initial choice of endianness of a new design is often arbitrary, but later technology revisions and updates perpetuate the existing endianness to maintain backward compatibility. Both types of endianness are in widespread use in digital electronic engineering. There are two possible ways a computer could number the individual bytes in a larger group, starting at either end. Larger groups comprise two or more bytes, for example, a 32-bit word contains four bytes. On most modern computers, the smallest data group with an address is eight bits long and is called a byte. Each group is assigned a number, called its address, that the computer uses to access that data. Cohen makes the connection to Gulliver's Travels explicit in the appendix to his 1980 note.Ĭomputers store information in various-sized groups of binary bits. He called them the Big-Endians and the Little-Endians. In the 1726 novel Gulliver's Travels, he portrays the conflict between sects of Lilliputians divided into those breaking the shell of a boiled egg from the big end or from the little end. The adjective endian has its origin in the writings of 18th century Anglo-Irish writer Jonathan Swift. The adjective endian comes from the 1726 novel Gulliver's Travels by Jonathan Swift where characters known as Lilliputians are divided into those breaking the shell of a boiled egg from the big end ( Big-Endians) or from the little end ( Little-Endians)ĭanny Cohen introduced the terms big-endian and little-endian into computer science for data ordering in an Internet Experiment Note published in 1980. Bit-endianness is seldom used in other contexts. Įndianness may also be used to describe the order in which the bits are transmitted over a communication channel, e.g., big-endian in a communications channel transmits the most significant bits first. Other orderings are generically called middle-endian or mixed-endian. Bi-endianness is a feature supported by numerous computer architectures that feature switchable endianness in data fetches and stores or for instruction fetches. A big-endian system stores the most significant byte of a word at the smallest memory address and the least significant byte at the largest.Ī little-endian system, in contrast, stores the least-significant byte at the smallest address. Endianness is primarily expressed as big-endian ( BE) or little-endian ( LE). In computing, endianness is the order or sequence of bytes of a word of digital data in computer memory. ( Learn how and when to remove this template message) ( August 2020) ( Learn how and when to remove this template message) Please help improve the article by merging similar sections and removing unneeded subheaders. This article may have too many section headers dividing up its content.
