ITPEC FE Morning April 2023 Question 2
ITPEC FE Morning April 2023 — Question 2 of 80
Logical Right Shift — shift all bits right, fill with zeros from the left.
Convert ABCD hex to binary in a 32-bit register:
- •
A=1010,B=1011,C=1100,D=1101 - •Full:
0000 0000 0000 0000 1010 1011 1100 1101
Shift right by 2 bits (drop 2 rightmost, insert 2 zeros on left):
- •Result:
0000 0000 0000 0000 0010 1010 1111 0011 - •Grouped:
2AF3→ `2AF3`
Why not others:
- (b) 6AF3 — incorrect shift calculation
- (c) AF34 — resembles a left shift by 4 bits, not a right shift by 2
- (d) EAF3 — would imply sign-extension (arithmetic shift), not logical shift
Key rule: Logical right shift by n bits = integer division by 2^n, with zeros filling the MSB. For 2 bits: divide by 4.
AI-generated — may contain errors
The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.