#include <stdlib.h>
#include <stdio.h>


#define SET_ZERO(array, byte, bit) \
((array)[(size_t)(byte)] ^= 1 << ((bit)%8))
#define SET_ONE(array, byte, bit) \
((array)[(size_t)(byte)] |= 1 << ((bit)%8))
#define IS_SET(array, byte, bit) \
(((array)[(size_t)(byte)] & 1 << ((bit)%8))>>(bit))

int main(int argc, char **argv){
	char num1 = 0;
	char array[4] = {0, 0, 0, 0};
	char cur = 129;

	/*
	printf("%u %u %u %u , %u\n", array[0], array[1], array[2], array[3], num1);
	printf("%u\n", IS_SET(array, 0, 2) );

	SET_ONE(array, 0, 0);
	SET_ONE(array, 0, 1);
//	SET_ONE(array, 0, 3);
//	SET_ONE(array, 0, 2);
	printf("%u\n", IS_SET(array, 0, 0));
	printf("%u\n", IS_SET(array, 0, 1));
	printf("%u\n", IS_SET(array, 0, 2));
	printf("%u\n", IS_SET(array, 0, 3));
//	SET_ZERO(array, 0, 0);

	printf("%u\n", IS_SET(array, 0, 0));
	SET_ZERO(array, 0, 1);
	printf("%u\n", IS_SET(array, 0, 1));
	//SET_ZERO(array, 0, 2);
	printf("%u\n", IS_SET(array, 0, 2));
	//SET_ZERO(array, 0, 3);
	printf("%u\n", IS_SET(array, 0, 3));
	*/


	num1 = !(cur<<6 >= 128);
	printf("%u\n", num1);
	cur = 127;
	num1 = !(cur<<6 >= 128);
	printf("%u\n", num1);



	//SET_ZERO(array, 0, 2);
//	printf("%u\n", IS_SET(array, 0, 2) );

	return 0;
}
