Difficulty: Easy
Correct Answer: 00100011
Explanation:
Introduction / Context:Expressing small decimal integers in a fixed 8-bit binary format is routine when initializing registers, masks, and configuration values. Leading zeros are preserved to keep the full 8-bit width, which is important for clarity and alignment in low-level work.
Given Data / Assumptions:
Concept / Approach:Decompose 35 into powers of two. 35 = 32 + 2 + 1 = 2^5 + 2^1 + 2^0. Set bits at those positions and clear the rest. Finally, pad with leading zeros to form 8 bits.
Step-by-Step Solution:
1) Largest power of 2 ≤ 35 is 32 → set bit 5.2) Remainder 3 → set bit 1 (value 2).3) Remaining 1 → set bit 0 (value 1).4) Bits from 7 down to 0: 0 0 1 0 0 0 1 1 → 00100011.Verification / Alternative check:Convert back: 00100011₂ = 32 + 2 + 1 = 35 decimal, confirming correctness.
Why Other Options Are Wrong:
Common Pitfalls:Dropping leading zeros or misplacing the 2^1 and 2^0 bits when forming the lower three bits.
Final Answer:00100011
Discussion & Comments