The binary system is base-2, meaning each column to the left represents a power of 2 that is twice as large as the column to its right.
Shifting a bit one position to the left moves it from a column of value to a column of value , which is equivalent to multiplying by 2.
Conversely, shifting a bit one position to the right moves it to a column of value , which is equivalent to dividing by 2 (integer division).
A shift of places results in a multiplication or division by .
| Feature | Left Shift | Right Shift |
|---|---|---|
| Arithmetic Effect | Multiplication | Division |
| Mathematical Factor | ||
| Empty Bit Filling | Right side (LSB) filled with 0 | Left side (MSB) filled with 0 |
| Data Loss Risk | Overflow (loss of high-value bits) | Underflow (loss of precision/fractions) |
Overflow occurs when a '1' is shifted out of the most significant bit, meaning the result is too large for the register.
Underflow occurs when a '1' is shifted out of the least significant bit, meaning the fractional part of the division is lost.
Check the Multiplier: If an exam asks for a shift of 3 places, immediately calculate to verify your final denary result.
Watch the Register Size: Always ensure your final answer has the same number of bits as the original (usually 8 bits).
Identify Bit Loss: If a '1' is shifted out of the bounds, explicitly state that an overflow or underflow error has occurred.
Sanity Check: For right shifts, the resulting denary value should be the original value divided by , rounded down to the nearest integer.
Incorrect Filling: A common mistake is leaving the new bit positions empty or filling them with the bit that was shifted out; they must always be filled with 0 in logical shifts.
Miscounting Places: Ensure you move the bits the exact number of places specified; a shift of 2 means the bit at position 0 moves to position 2, not position 1.
Ignoring Overflow: Students often write down the shifted bits without realizing that the most significant bits have been lost, leading to an incorrect numerical value.