## Fw: Fw: [Sdcc-user] Bug in 15 June snapshot.

 Fw: Fw: [Sdcc-user] Bug in 15 June snapshot. From: Royce & Sharal Pereira - 2004-06-20 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. ```

 Fw: Fw: [Sdcc-user] Bug in 15 June snapshot. From: Royce & Sharal Pereira - 2004-06-20 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. ```