Level:
Correct: 0
Incorrect: 0
Marks: 0/0
Exam Practice
Course:
Topics:
OCR GCSE Computer Science (Paper 1) Smart practice A mixed round aimed at your weak spots
Unit 1
Systems architecture
Unit 2
Memory and storage
Unit 3
Computer networks, connections and protocols
Unit 4
Network security
Unit 5
Systems software
Unit 6
Ethical, legal, cultural and environmental impacts of digital technology
Avg
score:
–
Topics
done:
0/34

Binary shifts

Practise 25 exam-style questions on Binary shifts for OCR GCSE Computer Science (Paper 1). Write your answer as you would in the exam and get it marked in seconds against the mark scheme, point by point, with the Study Helper on hand if you get stuck.

  • 25 questions
  • 1–6 marks each
  • Instant marking
  • No sign-up needed
20 questions, marked as you go

Sample questions with model answers

Here are 4 of the questions in this topic, each with a model answer, an explanation of why it earns the marks and the mark scheme an examiner would use.

Question 1

1 mark

Which logical binary shift divides an 8-bit binary number by 4?

Choose your answer.

  • left shift of 2 places
  • right shift of 2 places
  • left shift of 4 places
  • right shift of 4 places

Model answer

right shift of 2 places

Explanation

A right shift divides and a left shift multiplies. Each place halves the number, so 2 places divides by 2 × 2 = 4. A right shift of 4 places would divide by 2⁴ = 16. If any 1s are shifted off the right end the answer is rounded down.

Mark scheme
  1. 1 mark

    right shift of 2 places

    Only one answer may be given: two or more answers score 0. A left shift multiplies; a right shift of 4 places divides by 16, not 4.

Question 2

2 marks

The diagram shows the contents of an 8-bit register before and after a logical binary shift.

Describe the binary shift that has been carried out.

Two 8-bit registers, each drawn as a row of 8 boxes, with the place values 128, 64, 32, 16, 8, 4, 2, 1 above the columns. Row 1 (labelled "Before"): 00101100. Row 2 (labelled "After"): 10110000.

Model answer

A logical left shift of 2 places.

Explanation

Compare the patterns: the bits 1011 have moved from the middle of the register two places towards the left, and two 0s have appeared on the right, so it is a left shift of 2 places. Checking with denary: 00101100 is 44 and 10110000 is 176, which is 44 × 4 = 44 × 2². The number of places is how far each bit has moved, not the number of zeros at the end.

Mark scheme
  1. 1 mark

    left (shift)

  2. 1 mark

    2 places

    'Multiplied by 4' on its own scores 0 - the question asks for the shift. Award both marks for 'left shift of 2 places'.

Question 3

3 marks

A data logger in a school science lab stores its readings in 8-bit registers. The diagram shows one register before and after a logical binary shift.

Identify the shift that has been carried out, and state its effect on the denary value of the number.

Two 8-bit registers, each drawn as a row of 8 boxes, with the place values 128, 64, 32, 16, 8, 4, 2, 1 above the columns. Row 1 (labelled "Before"): 10111000. Row 2 (labelled "After"): 00010111.

Model answer

A logical right shift of 3 places. The number is divided by 8: 184 ÷ 8 = 23.

Explanation

The bits 10111 have each moved 3 places to the right and three 0s have entered on the left, so it is a right shift of 3 places. Each place halves the number, so 3 places divides by 2 × 2 × 2 = 8: 10111000 (184) becomes 00010111 (23). The three bits lost on the right were all 0s, so the result is exact.

Mark scheme
  1. 1 mark

    right (shift)

  2. 1 mark

    3 places

  3. 1 mark

    the number is divided by 8 // divided by 2³ // 184 becomes 23

    'Makes it smaller' on its own is not enough. Allow follow-through: the correct effect for the student's own number of places (e.g. 'right 2 places, divides by 4' scores 2 marks).

Question 4

4 marks

The diagram shows an 8-bit register holding 00011011. The number is shifted 2 places to the left, and then the result is shifted 1 place to the right.

Write down the contents of the register after each shift, and state the overall effect of the two shifts on the denary value of the number.

Three 8-bit registers, each drawn as a row of 8 boxes, with the place values 128, 64, 32, 16, 8, 4, 2, 1 above the columns. Row 1 (labelled "Start"): 00011011. Between rows 1 and 2 an arrow points left, labelled "Logical left shift of 2 places". Row 2 (labelled "After shift 1"): all 8 boxes blank. Between rows 2 and 3 an arrow points right, labelled "Logical right shift of 1 place". Row 3 (labelled "After shift 2"): all 8 boxes blank.

Model answer

After the left shift of 2 places: 01101100
After the right shift of 1 place: 00110110

The original number is 16 + 8 + 2 + 1 = 27 and the final number is 32 + 16 + 4 + 2 = 54. The left shift multiplies by 4 and the right shift divides by 2, so overall the number has been multiplied by 2.

Explanation

Shifts can be chained: each one acts on the result of the one before. Left 2 places is × 4 (27 → 108) and right 1 place is ÷ 2 (108 → 54), so the overall effect is × 2. This works exactly here because no 1s were shifted out at either step.

Mark scheme
  1. 1 mark

    after the first shift: 01101100

  2. 1 mark

    after the second shift: 00110110

    Allow follow-through: a correct right shift of 1 place of the student's own first result.

  3. 1 mark

    the number is multiplied by 2 / doubled (overall)

    'Multiplied by 4 and then divided by 2' scores this mark and the next.

  4. 1 mark

    justification: 27 becomes 54 // the left shift multiplies by 4 and the right shift divides by 2 // no 1s were lost, so the result is exact

Ready to try the rest? Every answer you write is marked against the mark scheme, so you can see exactly where the marks are.

Study Helper Hints first, answers after you try

Stuck on this one? Ask for a hint and I’ll point you in the right direction, without giving the answer away. Once you’ve checked your answer, I’ll show you how the marks are awarded.