Medium1 markShort Answer
Fundamentals of data representationGeneralbinaryshiftarithmetic effect

AQA GCSE · Question 02.4 · Fundamentals of data representation

State the arithmetic effect of applying a left binary shift of three followed by a right binary shift of five to a binary number.

How to approach this question

1. A left shift of three multiplies the number by 2^3, which is 8. 2. A right shift of five divides the number by 2^5, which is 32. 3. So, the combined effect is (number * 8) / 32. 4. This simplifies to number * (8/32) = number * (1/4). 5. Therefore, the overall effect is to divide the number by 4. Alternatively, a left shift of 3 followed by a right shift of 5 is a net right shift of 2 (5 right - 3 left = 2 right). A right shift of 2 is division by 2^2 = 4.

Full Answer

Divide the number by 4.
This question involves two consecutive binary shifts. 1. **Left binary shift of three:** This has the arithmetic effect of multiplying the number by 2^3 = 8. 2. **Right binary shift of five:** This has the arithmetic effect of performing an integer division of the number by 2^5 = 32. Combining these two operations, we first multiply by 8 and then divide by 32. This is equivalent to multiplying by 8/32, which simplifies to 1/4. Therefore, the overall arithmetic effect is to divide the original number by 4.

Common mistakes

✗ Adding the shifts (3+5=8) instead of considering their opposite directions. ✗ Calculating the effects incorrectly (e.g., 2*3=6 instead of 2^3=8). ✗ Stating multiplication instead of division.

Practice the full AQA GCSE Computer Science Paper 2

46 questions · hints · full answers · grading

More questions from this exam