Big-endian

Big-endian

In computing, endian and endianness (pronounced just as spelled) in the most common cases, refers to how bytes are ordered within the memory of your computer. Computer memory is organized just the same as words on the page of a book or magazine, with the first words located in the upper left corner and the last in the lower right corner. The same is also true in mathematics or computer programming when you are diagramming matrices or arrays on a page; with the first element in the upper left corner and the last in the lower right corner, with the indexing of elements being described in similar terms in math and computer programming.

Big endian systems are simply those systems whose memories are organized with the most significant digits or bytes of a number or series of numbers in the upper left corner of a memory page and the least significant in the lower right, just as in a normal spreadsheet.

Little endian systems are simply those system whose memories are organized with the least significant digits or bytes of a number or series of numbers in the upper left corner of a memory page and the most significant in the lower right. There are many examples of both types of systems, with the principle reasons for the choice of either format being the underlying operation of the given system.

That all said, it is worth noting, that due to the fact that human beings are the designers, programmers and end users of all machine systems, almost all modern systems are conceptually big endian in nature and the implementation of the processor memory configurations is abstracted into the platform layer by the operating system to allow the users to work in a framework to which they have become accustomed..

Endian First byte
(lowest address)
Middle bytes Last byte
(highest address)
Decimal 100000000 (hexadecimal 05F5E100)
big most significant least significant
Address Value
n 05
n+1 F5
n+2 E1
n+3 00
little least significant most significant
Address Value
n 00
n+1 E1
n+2 F5
n+3 05

Mixed forms are possible, for instance the ordering of bytes within a 16-bit word may differ from the ordering of 16-bit words within a 32-bit word. Such cases are rare and are sometimes referred to as mixed-endian or middle-endian. Endianness is important as a low-level attribute of a particular data format. Failure to account for a varying endianness across architectures when writing code for mixed platforms leads to failures and bugs. The term big-endian originally comes from Jonathan Swift's satirical novel Gulliver’s Travels by way of Danny Cohen in 1980.

Read more about Big-endian:  Etymology, History, Endianness and Hardware, Optimization, Diagram For Mapping Registers To Memory Locations, Examples of Storing The Value 0A0B0C0Dh in Memory, Endianness in Networking, Endianness in Files and Byte Swap, "Bit Endianness"