Join our subscribers list to get the latest news, updates and special offers directly in your inbox
Overview
Endianness is a term used to describe the order in which a sequence of bytes is arranged into larger numerical values when stored in computer memory. Specifically, it determines how multi-byte data types (such as integers or floating-point numbers) are stored and read from memory.
Endianness is more about memory than the CPU. While the CPU architecture dictates how endianness is implemented, the concept of endianness specifically refers to the order in which bytes are stored in and accessed from memory.
In little-endian systems, the least significant byte (LSB) of a multi-byte value is stored at the lowest memory address.For example, consider the 32-bit hexadecimal value 0x12345678. In a little-endian system, it would be stored in memory as follows:Memory Address | Value--------------------|-------- 0x00 | 0x78 0x01 | 0x56 0x02 | 0x34 0x03 | 0x12Little-endian is commonly used by x86 architecture CPUs (such as Intel and AMD processors).
In big-endian systems, the most significant byte (MSB) of a multi-byte value is stored at the lowest memory address.Using the same 32-bit value 0x12345678, in a big-endian system, it would be stored in memory as follows:Memory Address | Value----------------------|-------- 0x00 | 0x12 0x01 | 0x34 0x02 | 0x56 0x03 | 0x78Big-endian is often used in network protocols and some older or specialized CPU architectures.
Summary:
Memory is the primary context in which endianness is discussed and observed because it directly affects how data is stored and accessed.CPU determines and respects the memory's byte order when performing operations, but the CPU’s internal workings are generally independent of endianness.
EmbeddedWala
EmbeddedWala Apr 27, 2023 0 19.3K
EmbeddedWala Jun 14, 2023 0 19.2K
EmbeddedWala Apr 26, 2023 0 17.2K
EmbeddedWala Aug 30, 2022 0 15.3K
EmbeddedWala Apr 27, 2023 0 15.3K
EmbeddedWala Jun 19, 2022 0 4.5K
This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies Find out more here