Every time you bit-shift to the left you are performing a 2 x multiplication. Every time you bit-shift to the right you are doing a divide by two.

0x01010101 << 2 == 0x10101010

0x01010101 == 85

0x10101010 == 170

170 / 85 == 2

0x01010101 << 2 == 0x10101010

0x01010101 == 85

0x10101010 == 170

170 / 85 == 2