Here is this simple code:
char a = '10';
char b = '6';
printf("%d\n", a | b);
printf("%d\n", a ^ b);
printf("%d\n", a << 2);
and the output is
54
6
192
Now my question is, why these results. I checked it on paper and what I have is
1110 for a | b = 14
1100 for a ^ b = 12
00101000 for a << 2 = 40
So why this different result?