ENDIANNESS

This refers to the order in which multi-byte data is stored in computer memory. This ordering must be taken into account whenever handling multi-byte values such as integers, addresses, or even strings on the stack. On little-endian systems, the least significant byte is stored first, meaning that the bytes appear in reverse order relative to their normal reading order. For instance, pushing the string "Hello" onto the stack requires placing the bytes in reverse: first o, then l, l, e, and finally H. Accounting for this byte ordering is essential when working directly with memory in assembly, manipulating the stack, or performing low-level operations like buffer overflows or serialization.

CHEATSHEET

EXAMPLE 1:

When retrieving the value, the processor has to use the same endianness used when storing them, or it will get the wrong value

EXAMPLE 2:

Address: 0xffff0000
Word: \xAA\xBB\xCC\xDD

Last updated