Search notes:

Endianness

In little endian, a number is laid out in memory with the least significant byte first. Thus 0x12345678 is stored like so: 0x78 | 0x56 | 0x34 | 0x12.
In big endian, the number is stored with the order of bytes reversed.
Big endian is also referred to as network byte order (See RFC 1700) (see the c functions htonl(), htons(), ntohl() and ntohs()).
Intel CPUs are little endian.

C program to determine endianness

The following C program (which I found here) determines the endianness of the machine it runs on:
#include <stdio.h>

int main() {

   union {
      int  i;
      char c[sizeof(int)];
   } u;

   u.i = 1;

   if (u.c[0] == 1) {
      printf("Little endian\n");
   }
   else {
      printf("Big endian\n");
   }
}

See also

Types in the Linux kernel source to express endianness.
In an Oracle database, the endianness of a database can be determined by joining v$database to v$transportable_platform.

Index