the ordering of data declared as bit fields is implementation dependant. you have to test and figure out what it is for your compiler.
#include <iostream>
int main()
{
// assumes that the ordering of data declared as bit fields is from
// low to high bit. this is implementation dependant
struct number { unsigned second:2 ; unsigned first:6 ; };
union { number n ; unsigned char c ; };
n.first = 1 ; n.second = 0 ;
std::cout << int(c) << '\n' ;
}