// a reversed, the i-th bit.
// Obviously, a type of char, etc. can also be replaced.
void flipBit ( int & a, int i) { a ^ = ( . 1 << i); }
// Get a first i. int GETBIT ( int a, int i) { return (i >> a) & . 1 ; }
// set in a bit i.
void setBit(int & a,int i,int value) { if(value) a|=(1<<i); else a&=~(1<<i); }