SHS Computing · Year 3
Shifts, Rotations and Binary Arithmetic practice questions
Logical, arithmetic and circular shifts, multiplying and dividing by powers of 2, overflow and the sign bit, packing bits into a byte, shift-and-add versus repeated-addition multiplication, two's complement representation and subtraction, Python's bitwise operators, floating-point precision and rounding in real-world calculations.
24 questions in this topic: 5 applying skills and concepts, 16 strategic thinking and 3 extended thinking. Every one carries a written explanation.
Sample questions
3 of 24 questions in this topic. Sign up to answer them and see the explanations.
- Question 1Strategic thinking
The unsigned byte 00011010 is shifted right by 1. What decimal value results?
- a52
- b26
- c13
- d12
- Question 2Extended thinking
A program stores prices in cedis as floats and adds 0.10 to a total ten times in a loop, but the total prints as 0.9999999999999999. Which fix is most reliable for money?
- aUse larger floats by multiplying every price by 1.5 before adding them up
- bStore amounts as whole pesewas (integers) and divide by 100 only for display
- cPrint the total with no decimal places at all, so the error is hidden
- dReplace the + operator with the * operator inside the loop body
- Question 3Strategic thinking
What does print(round(35 * 9 / 5 + 32, 1)) output, converting 35 °C to Fahrenheit?
- a95
- b67.0
- c63.0
- d95.0
Answer these and 21 more on Shifts, Rotations and Binary Arithmetic
Free account. Instant marking, a written explanation for every question.
Start practising freeMore Computing Year 3 topics
- Artificial Intelligence: Principles, Components and Applications
- Building a Database-Driven E-commerce Site
- Critical Points, Fail-safes and Logic Optimisation
- Cybersecurity Threats and Personal Data Protection
- Installing, Configuring and Managing Operating Systems
- Mass Storage Media
- Network Design, Scalability and Security
- Transmission Media, Connectivity and Network Configuration
- Types of Operating Systems and Utility Software