Numbers: Binary shifts
1.2.4a Data Storage: Numbers
Practise exam questionsData Storage: Numbers — Note 5 of 5
A binary shift moves all bits in a binary number left or right by a specified number of places. Left shifts multiply the value; right shifts divide it. Bits shifted out are lost, and zeros fill the vacated positions.
Exam tipCommon mistake
Moves all bits to the left, adding 0s on the right. Equivalent to MULTIPLYING by 2 for each place shifted.
00101100 (44) left shift by 1 = 01011000 (88). The value has been multiplied by 2.Moves all bits to the right, adding 0s on the left. Equivalent to DIVIDING by 2 for each place shifted.
11001011 (203) gives 00110010 (50), not 50.75. Binary shifts always round DOWN (lose precision for odd numbers).10110000 to get 10000000' — left shift of 3 places. Note the right-most bits that dropped off.Ready to test yourself?
Practise 1.2.4a questions