Number Systems
Data Representation · 4 question types
Exam Frequency Analysis
Past paper frequency (2018 to 2024)
This topic accounts for approximately 12% of your exam marks.
Binary/hex conversion and binary arithmetic appear in every Paper 1. Consistently 8 to 15 marks.
A logical binary shift is the operation of moving every bit of a binary number a fixed number of places to the left or to the right. Bits that fall off the end of the register are lost; the vacated positions are filled with 0s.
Logical left shift
A logical left shift by 1 moves every bit one position to the left. The leftmost bit falls off; a 0 is filled in on the right.
The effect on the value is to multiply by 2 (provided no 1-bit falls off the end):
- Left shift by 1 = ×2
- Left shift by 2 = ×4
- Left shift by 3 = ×8
- Left shift by n = ×2ⁿ
Logical right shift
A logical right shift by 1 moves every bit one position to the right. The rightmost bit falls off; a 0 is filled in on the left.
The effect on the value is to divide by 2 (integer division, with no remainder):
- Right shift by 1 = ÷2
- Right shift by 2 = ÷4
- Right shift by n = ÷2ⁿ
When information is lost
If a 1 is shifted off either end of the register, the simple ×2ⁿ or ÷2ⁿ rule no longer holds and information is lost:
- On a left shift, losing a 1 means the result is smaller than the true product. This is an for shifts.
- On a right shift, losing a 1 means the result is rounded down (the lost place value is discarded).
Describing and evaluating a logical shift
What comes up: "Describe the process of a logical left/right shift" (2 marks) and "State the mathematical effect of a right shift of [n] places" (2 marks, recurring in separate questions).
Write (describe — two marks): (1) Every bit in the register moves one position to the left (or right). (2) The most significant bit (for a left shift) is lost and a 0 is inserted at the least significant end.
Write (mathematical effect — two marks): State the operation (multiply for left, divide for right) and the factor: a right shift of four places divides the value by 16 (that is, 2⁴).
Watch out: Both the operation and the factor must be stated to earn both marks — writing only "divides it" or only "by 16" scores one mark each. The effect only holds exactly if no 1-bits are shifted off the end; if a 1 is lost, the rule breaks down (information is lost).