Instructions & Addressing Modes

Your answer
Answer & solution
Answer: B: ANI F0H (no official key was published)
F0H is binary 11110000. AND with its four high ones preserves the corresponding accumulator bits; AND with its four low zeros clears those bits. Thus ANI F0H performs the required masking. XOR would toggle selected bits instead of necessarily clearing them. ANI 0FH does the opposite mask, preserving the low nibble and clearing the high nibble. The operation is independent of the accumulator’s initial value.