Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Royce & Sharal Pereira <bethell@et...>  20040620 16:51:55

Hi again,  Original Message  > If it should be 1U these are the results: > r = ~a will behave like r = !a (as many expected?).  This *has* to result in r having the complement of a. Does not ~ mean "bitwise complement"? If this works OK for a char1 = ~char1 without a problem, then why not for a variable that is a bit? Bit or not, ~ is still "bitwise complement"! So r=~a by the definition of the ~ operator, must end in r containing the bitwise complement of a. > r = a << b and r = a >> b behave equally (who wants this anyway?) Right. The rest of the bit operations illustrated by Bernhard are only of academic interest, but it's good to know what will result. The operations given above are the ones that are almost always used. Thanks, Royce. 