Subj : bit shifting To : comp.programming From : Rob Somers Date : Sun Aug 14 2005 10:31 am #include int main(void) { unsigned short x = 128; unsigned short y = 255; printf("%u\n", (unsigned short)(~x & y)); printf("%u\n", (unsigned short) ~x); return 0; } if 127 is 1111111 and 255 11111111, then &ing the two should give 01111111. Why does the second printf() give 65407? .