The left shift operator (<<) moves all bits to the left by a specified number of positions. New bits on the right are filled with 0.
Example: . In binary, . Shifting left by 2 positions gives . Notice that shifting left by positions multiplies the number by . Here, .
Left shift is how you quickly compute powers of 2. The expression gives you . Want ? Write . It's faster than calling a power function.