so if I have x = 0x01
and y = 0xff
and I do x & y
, I would get 0x01
. If I do x && y
do I still get 0x01
, but the computer just says its true if its anything than 0x00
? My question is are the bits the same after the operation regardless of bit-wise or logical AND/OR, but the computer just interprets the final result differently? In other words are the hex values of the result of & and && (likewise | and ||) operations the same?
edit: talking about C here