The accumulator holds 01101001. Which operation clears bit 5 (place value 32) to 0 without changing any other bit, and what is the result?
- To clear a bit, use AND with a mask that has 0 in that position and 1 in every other position.
- Bit 5 is the third bit from the left, so the mask is 11011111.
- 01101001 AND 11011111: bit 5 becomes 0 and the other seven bits stay the same, giving 01001001.
Answer: AND B11011111 gives 01001001.