Question.7
A developer wants to clear bits 2 and 3 in an 8-bit ADC config register. The register currently holds 0xFF. He writes:
0xFF
reg &= (0x03 << 2);
What is wrong with this code?
Select Answer
The shift amount should be 3, not 2
The mask is not inverted — it clears everything except bits 2–3
The & operator should be | to clear bits
Nothing — the code correctly clears bits 2 and 3