Shift operations are the standard method for multiplication and division by powers of 2.

x << k = x · 2ᵏ (left shift)
x >> k = x ÷ 2ᵏ (right shift, logical)
x >>ₐ k = signed division

Rotation: No bits are lost—bits that are pushed out re-enter on the other side.

Buche dir einen Termin