I'm learning how to work with binaries in C.
I tested this code:
But u get the next error in the line "x = x » 1;"Code:#include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { int x=3; x = x » 1; printf("lol: %d",x); system("PAUSE"); return 0; }
I was expecting that, if x = 3 (11) that x»1 would make x = 1 (01).stray '\187' in program
What am i doing wrong here?
Edit:
If i have x = ~x, then x=3 (11) will be -4 and not 0 (00), why?