Difficulty: Easy
Correct Answer: 10111011
Explanation:
Introduction / Context:Encoding a decimal integer as an 8-bit binary pattern is common when writing to registers, configuring peripherals, or defining bit masks. The 8-bit form explicitly shows each bit from 2^7 to 2^0.
Given Data / Assumptions:
Concept / Approach:Decompose 187 into powers of two ≤ 128. Mark a 1 for each included power and 0 otherwise to build the 8-bit string. Alternatively, perform repeated division by 2 and pad to 8 bits.
Step-by-Step Solution:
Largest power ≤ 187 is 128 (2^7): remainder 59Next 64 (2^6): not used (0); remainder stays 59Use 32 (2^5): remainder 27Use 16 (2^4): remainder 11Use 8 (2^3): remainder 3Use 4 (2^2): not used (0); remainder 3Use 2 (2^1): remainder 1Use 1 (2^0): remainder 0Bits: 1 0 1 1 1 0 1 1 ⇒ 10111011Verification / Alternative check:Sum the active weights: 128 + 32 + 16 + 8 + 2 + 1 = 187. Also, a calculator check in binary mode will show 187 → 10111011₂.
Why Other Options Are Wrong:
Common Pitfalls:
Final Answer:10111011
Discussion & Comments