I have two numbers, 2147483648
and 808529920
stored in unsigned int
variables but, when I do their bitwise and in C, the answer is supposed to be 1, but I get 0.
808529920 in binary looks like:
110000001100010011000000000000
2147483648 in binary looks like:
10000000000000000000000000000000
unsigned int a = 808529920;
unsigned int b = 2147483648;
unsigned int ret = a & b;
There are no bits in common, so you should get 0 not 1.