Talk:Bitwise Operators
[edit] Right shifts
I am editing the two right shift operators as they are misdocumented (with ">>" identified as a circular right shift, and ">>>" identified as a zero padding right shift). ">>" is not a true shift as it with negative numbers it converts to positive then shifts (with zero padding) then converts to negative, while with positive numbers it simply shifts (with zero padding). This has the effect of dividing by a power of two and truncating (e.g. -1 or (1111...) when right shifted ">>" any positive number of places will shift to 0 (0000....) even though all zeroes is not a standard result of shifting all ones). The ">>>" right shift pads with the value of the first bit. This has the effect of dividing by a power of two and rounding down. WhiZard (talk) 15:51, 15 November 2012 (UTC)