The shift operator (y << x
) just shifts the bits of y
to the left by 'x' places. The right-most bit becomes 0
. The >>
operator shifts to the right, and the value of the left-most bit (the sign bit) is copied into the new left-most bit.
To work out your answer you need the bit pattern for the initial value (Integer.MIN_VALUE) and then do the operations to get the resulting bit pattern. You can then convert that back to a decimal value.