>>165
unsigned int set(unsigned int x, int pos)
{
    return x | 1 << pos;
}
unsigned int reset(unsigned int x, int pos)
{
    return x & ~(1 << pos);
}
unsigned int inverse(unsigned int x, int pos)
{
    return x ^ 1 << pos;
}

>>167
intは符号無しでない罠。