Topic
Endianness
Explanation
Endianess is the byte order of the number in the computer's
memory. The number can have any size of bits, bu the most common
numbers used are 32 bits (4 bytes) and 16 bits (2 bytes).
source : http://www.rapidtables.com/prog/endianess.htm
Theory Drop
In computing, the term endian or endianness refers to the ordering
of individually addressable sub-componentswithin the representation
of a larger data item as stored in external memory (or, sometimes,
as sent on a serial connection). Each sub-component in the
representation has a unique degree of significance, like the place
value of digits in a decimal number. These sub-components are
typically 16- or 32-bit words, 8-bit bytes, or even bits.
Endianness is a difference in data representation at the hardware
level and may or may not be transparent at higher levels, depending
on factors such as the type of high level language used.
source : http://en.wikipedia.org/wiki/Endianness
Get The Hang
/* swap partition endianess hack... */
if (swab32(swap_header->info.version) == 1) {
swab32s(&swap_header->info.version);
swab32s(&swap_header->info.last_page);
swab32s(&swap_header->info.nr_badpages);
for (i = 0; i info.nr_badpages; i++)
swab32s(&swap_header->info.badpages[i]);
}