SQLite Forum

Endianness help
Login
No it won't. If you have:

uint8_t c[] = {'0x01', '0x02'};

then that will be stored as 00000001 00000010 on what ever machine you have.

The question of endian-ness affects ONLY the order of bytes within a larger item, such as a 16, 32, or 64-bit integer.

If I have four bytes, thus:

uint8_t c[] = {0x01, 0x02, 0x03, 0x04};

then on a big endian machine they will be loaded into a 32-bit register as:

0x01020304

whereas on a little-endian machine they will be loaded into a 32-bit register as:

0x04030201

The bit order within a byte is NOT reversed at all. The bits may be numbered in the opposite order, but they are stored the same.