Next: , Up: stdlib bytevector   [Index]


5.2.1 Endianness

Many operations described in this chapter accept an endianness argument. Endianness describes the encoding of exact integer objects as several contiguous bytes in a bytevector. For this purpose, the binary representation of the integer object is split into consecutive bytes. The little–endian encoding places the least significant byte of an integer first, with the other bytes following in increasing order of significance. The big–endian encoding places the most significant byte of an integer first, with the other bytes following in decreasing order of significance.

This terminology also applies to IEEE 754 numbers: IEEE 754 describes how to represent a floating–point number as an exact integer object, and endianness describes how the bytes of such an integer are laid out in a bytevector.

NOTE Little and big–endianness are only the most common kinds of endianness. Some architectures distinguish between the endianness at different levels of a binary representation.