void clear_bit(char bit_array[], unsigned bit_number) { bit_array[character_offset(bit_number)] &= ~(1 << bit_offset(bit_number)); }
void set_bit(char bit_array[], unsigned bit_number) { /* ** During the operator priority,shifting will be done before bitwise 'OR'. */ bit_array[character_offset(bit_number)] |= 1 << bit_offset(bit_number); }
//测试特定位的值 int test_bit( char bit_array[], unsigned bit_number ) { return (bit_array[ character_offset( bit_number ) ]& 1 << bit_offset( bit_number )) != 0; }