16. Bitwise Operations-III

Question.4

A UART config register has the following layout:

76543210
BAUDSTOPPAREN

A developer wants to change the BAUD field to 5 (101 in binary) without affecting any other bits. The register currently holds 0x23. He writes:

reg &= ~(0x07 << 3);   // Clear BAUD field
reg |= ___;             // Set BAUD to 5

What goes in the blank?

Need Help? Refer to the Quick Guide below

Select Answer

Restart quiz!