Signed left shift behaviour
public class Shift { public static void main(String[] args) { for(int i = 0; i < 32; ++i){ System.out.println(-0x55555555 << i); } } } Running the above code gives the following output -1431655765 1431655766 -1431655764 1431655768 -1431655760 1431655776 -1431655744 1431655808 -1431655680 1431655936 -1431655424 1431656448 -1431654400 1431658496 -1431650304 1431666688 -1431633920 1431699456 -1431568384 1431830528 -1431306240 1432354816 -1430257664 1434451968 -1426063360 1442840576 -1409286144 1476395008 -1342177280 1610612736 -1073741824 -2147483648 While testing with an other value (64) gives a