Shift & Rotate
Bit Manipulation Operations
Both operations include a direction:
Shift, a.k.a. Logical Shift
- When doing a left shift, move every bit to the left one place, fill the whole with a 0 and let the last bit fall off the end.
- When doing a right shift, move every bit to the right one place, fill the whole with either a 0 or a 1 to preserve the sign, and let the last bit fall off the end.