10. Shift operators - <<, >>, >>>
1) << performs a signed left shift. 0 bits are brought in from the right. Sign bit (MSB) is preserved. Value becomes old value * 2 ^ x where x is no of bits shifted.
2) >> performs a signed right shift. Sign bit is brought in from the left. (0 if positive, 1 if negative. Value becomes old value / 2 ^ x where x is no of bits shifted. Also called arithmetic right shift.
3) >>> performs an unsigned logical right shift. 0 bits are brought in from the left. This operator exists since Java doesn’t provide an unsigned data type (except char). >>> changes the sign of a negative number to be positive. So don’t use it with negative numbers, if you want to preserve the sign. Also don’t use it with types smaller than int. (Since types smaller than int are promoted to an int before any shift operation and the result is cast down again, so the end result is unpredictable.)
4) Shift operators can be applied to only integral types.
5) 1 << 31 will become the minimum value that an int can represent. 
6) Shift operators never shift more than the number of bits the type of result can have. ( i.e. int 32, long 64) RHS operand is reduced to RHS % x where x is no of bits in type of result.
int x; 
x == x >> 32 // ture
x =  x >> 33;  // Here actually what happens is x >> 1
7) If right side is negative, for int, use low 5 bits(0-31); for long, use low 6 bits(0-63).