In addition to the other answers, I will also add that bit shifting is commonly used in code which uses bitmasks. So bit 5 in the given code fragment has a specific meaning, which is different to, say bit 3. Using the '<<' operator you can logically combine the different bits to give a combined bitmask.