2<<4 #2 is 00000010 in binary, the <<4 moves the bits left 4,00100000 which is 32 32>>3 #32 is 00100000 in binary, the >>3 moves the bits right 3, 00000100 which is 4