Talk:Bitwise operation
From Wikipedia, the free encyclopedia
[edit] C/C++ incorrect
The description of C/C++ is incorrect insofar as unsigned integers (representing [0..(2^N)-1]) act with the character of a "logical shift", whereas signed integers (representing [-2^(N-1)..0.. 2^(N-1)-1]) are in some circumstances not defined and are left up to the implementation, regarding the presence of upper order 1 bits subsequent to right-shift.
As described in the ANSI C standard section 6.5.7 [5], the operation is actually only indeterminate if the number is negative:
http://std.dkuug.dk/JTC1/SC22/WG14/www/docs/n843.htm
—The preceding unsigned comment was added by 150.169.8.72 (talk • contribs).
[edit] Whats about Inversion and Complementing?
Whats about Inversion and Complementing?
- Inversion 110 -> 011
- Complementing 110 -> 001
—The preceding unsigned comment was added by 88.72.207.149 (talk • contribs).
- I do not recognize your "inversion" example. As for complementing you are describing Two's complement. Cburnett 13:09, 15 February 2007 (UTC)