Shift 0001 0110 left by 2 places.
- 0001 0110 = 22.
- Left 2: 0101 1000.
- = 88, which is 22 × 4.
Answer 0101 1000 (88)
A-level Computer Science revision · Data representation
A logical shift moves bits left or right, filling with zeros: shifting left by 1 doubles an unsigned value; right by 1 halves it (integer division). Masks use AND to clear bits, OR to set bits and XOR to toggle bits. ASCII uses 7 bits (128 characters); Unicode uses more bits to represent characters from all languages.
Watch out Bits shifted off the end are lost, which can change the value unexpectedly.
Shift 0001 0110 left by 2 places.
Answer 0101 1000 (88)
What is 0110 1100 after a logical right shift of 2 places? Give the answer in denary.
Which operation with mask 0000 1111 keeps the right four bits and clears the left four?
Why was Unicode introduced?
A-level Computer Science Pro, OCR H446
£119 once
Price rises to £199 on 1 January. Save £80 by joining before then.
At least 12 months of access
No VAT is charged.