Page 2 of 2

Re: jokes for the "technologically inclined"

Posted: 04 May 2012, 20:16
by mattallen37
To be or not to be is ff.
0x2B | !0x2B = 0xFF

Re: jokes for the "technologically inclined"

Posted: 04 May 2012, 20:53
by spillerrec
mattallen37 wrote:To be or not to be is ff.
0x2B | !0x2B = 0xFF
No, it is to be.
'!' is logical NOT, so !2B evaluates to 0 and this leaves 0x2B back.
However even if you used the bit-wise NOT, you would normally get 0xFFFFFFFF which is something entirely else.

Re: jokes for the "technologically inclined"

Posted: 04 May 2012, 21:01
by mattallen37
You're right, I meant to use a ~, and I meant it to be an unsigned byte (not long).