Instructions & Addressing Modes


Answer & solution
Answer: A (no official key was published)
1. The mask must contain exactly one set bit at position pos: mask=0x1 << pos. AND with the register is nonzero exactly when that bit is set.
2. Thus A. These are register-level pseudocode shifts; a literal C implementation should use an unsigned 32-bit 1 to handle position 31 safely.
3. Teaching check: A one-hot mask isolates exactly the requested bit; an all-ones mask shifted right would generally retain several bits. If implemented in C rather than register pseudocode, use a suitably wide unsigned constant to avoid undefined signed left-shift behavior at the top bit.