You correctly parsed the contents of the low byte, i.e. 0xfe. However, there is more to what actually happens here: when you write
if (c == 0xfe) {
...
}
c, a char int 0xfe. C char c int . char, 0xfe 0xfffffffe, .
char, 0xfe char, :
if (c == (char)0xfe) {
...
}
1.
, , int, int:
unsigned char c = 127;
c<<=1;
if (c == 0xfe) {
...
}
2.
. c <<= 1 - char.