28. Bit Field Operations-i

Question.7

A developer packs a 3-bit priority field (bits 4–6) into a control register. He writes:

reg |= (priority << 4);

If priority is 9 (which exceeds the 3-bit maximum of 7), what happens to the register?

Need Help? Refer to the Quick Guide below

Select Answer