Test yourself on Binary Arithmetic with exam style questions, marked instantly.
Flashcards that come back just before you would forget them.
A revision plan that remembers what you know and shows what to do next.
See which topics you have nailed and which need another look.
Quiz yourself on Binary ArithmeticGet your flashcardsBuild my revision planTrack my progressBinary Shifts - Fast Multiplication and Division
Left Shift: Multiply by 2
Shifting all bits one position to the left multiplies the number by 2. Fill the rightmost bit with 0.
Original: 00000101 (5) Left shift 1: 00001010 (10) ← Multiplied by 2 Left shift 2: 00010100 (20) ← Multiplied by 4 Left shift 3: 00101000 (40) ← Multiplied by 8 Why? Each position is worth 2× the previous position!
Right Shift: Divide by 2
Shifting all bits one position to the right divides the number by 2 (integer division - drops remainder). Fill the leftmost bit with 0.
Original: 00101000 (40) Right shift 1: 00010100 (20) ← Divided by 2 Right shift 2: 00001010 (10) ← Divided by 4 Right shift 3: 00000101 (5) ← Divided by 8
What Happens to Odd Numbers?
Original: 00000111 (7)
Right shift 1: 00000011 (3) ← 7÷2 = 3.5, but we get 3 (integer division)
↑
The LSB (1) is lost - remainder is dropped!
Why Shifts are Fast:
- Shifting is a single CPU cycle (very fast)
- Multiplication/division by powers of 2 is instant
- Graphics engines use shifts extensively for scaling
- Example: To multiply by 16, shift left 4 times (2⁴ = 16)
Make this stick
Signing in gives access to all PrepWise features.