Right Shift operator

Right Shift operator ( >> )
Shifts the bits within the left operand by the amount specified in the right operand. The bit on the right disappears.
Either a 0 or a 1 is shifted in on the left, depending on whether the integer is signed or unsigned. With unsigned integers, 0 is always shifted in on the left; with signed integers, a 0 is shifted in when the number is positive (that is, the leftmost bit, the sign bit, is 0), and a 1 is shifted in when the number is negative (that is, the leftmost bit, the sign bit, is 1). In other words, with signed integers, the sign of the number is always maintained.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal