28. Bit Field Operations-i

Question.6

An ADC peripheral has the following 8-bit status register:

76543210
OVRRDYCHGAINEN

The register reads 0x6D. An engineer needs to determine which ADC channel is currently selected (CH field, bits 3–5). He writes:

uint8_t ch = (status >> 3) & 0x07;

What channel number does he get?

Need Help? Refer to the Quick Guide below

Select Answer