I am having trouble trying to understand how logical operators work in C. I already understand how the bit-level operators work, and I also know that logical operators treat
C defines values greater than zero to be "True". As both 0x65 and 0x55 match this condition, the result is also True - which, on output, is 1 - or, in hex notation, 0x01.
An alternative style of writing for your code would be: