This is an old revision of the document!


Fundamentals of Data Encoding, Big Endian, Little Endian

The processor can work with different types of data. These include integers of different sizes, floating point numbers, texts, structures and even single bits. All these data are stored in the memory as a single byte or multiple bytes. Integer data types can be 8, 16, 32 or 64 bits long. If the encoded number is

Data encoded in memory must be compatible with the processor. Memory chips are usually organised as a sequence of bytes, which means that every byte can be individually addressed. For processors of the class higher than 8-bit, there appears the issue of the byte order in bigger data types. There are two possibilities:

  1. Little Endian - low-order byte is stored at a lower address in the memory.
  2. Big Endian - high-order byte is stored at a lower address in the memory.

These two methods for a 32-bit class processor are shown in Fig1

Illustration of Little and Big Endian data placement in the memory
Figure 1: Illustration of Little and Big Endian data placement in the memory
en/multiasm/cs/chapter_3_11.1736343875.txt.gz · Last modified: 2025/01/08 13:44 by ktokarz
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0