#include <stdio.h>

struct byte {
   unsigned bit_1 : 1;
   unsigned bit_2 : 1;
   unsigned rest : 6;
};

main()                                             /* Bitfelder */
{  
   struct byte b;

   b.bit_2 = b.bit_1 =1;
   b.rest = 63;
   printf("Bitfeld = %d\n", b);
   b.bit_1--;
   printf("Bit1=%d, Bit2=%d, Rest=%d\n",b.bit_1, b.bit_2, b.rest);
   if(b.bit_1 && b.bit_2)
      b.bit_1++;
   else
      b.bit_1--;
   b.rest&=(b.bit_1+b.bit_2);
   printf("Bit1=%d, Bit2=%d, Rest=%d\n",b.bit_1, b.bit_2, b.rest);
}
