That's not bit-endianness. Consider this:
Code:
#include<stdio.h>
int main( void )
{
union u
{
struct byte
{
unsigned int b0:1;
unsigned int b1:1;
unsigned int b2:1;
unsigned int b3:1;
unsigned int b4:1;
unsigned int b5:1;
unsigned int b6:1;
unsigned int b7:1;
} bm;
unsigned char uc;
} b;
b.uc = 0xF0;
printf( "%d%d%d%d %d%d%d%d\n",
b.bm.b0, b.bm.b1, b.bm.b2, b.bm.b3,
b.bm.b4, b.bm.b5, b.bm.b6, b.bm.b7 );
return 0;
}
That still doesn't tell us anything, because foo & 1 is always going to result in 1 if the first bit is set, regardless on which end of the byte the bit is.
Quzah.