I'm trying to understand the bitwise AND operator in C; it works until I put a 0 in front of 177.
I'm doing this by hand to make sure I understand what the compiler is doing
#include <stdio.h>
main () {
printf ("%d\n", 1999 & 177);
return 0;
}
The answer above is 129, this is my answer when I do it by hand as well
#include <stdio.h>
main () {
printf ("%d\n", 1999 & 0177);
return 0;
}
The compiler above gives me the answer 79, can someone please explain how it gets to the answer 79?