Please review the following code and help me understand it.
int a=1;
int b=~1;
printf("%d",b);
Output:
-2
Thus, this means that 1 = (00000001) on the transition ~ produces (11111110), which is 2 in addition to the number 2 and, therefore, -2 is the answer. So 100 will always be considered -4, but not 4?
source
share