Binary result of a decimal addition: Compute 49 + 1 in decimal and give the 8-bit binary representation of the result.

Difficulty: Easy

Correct Answer: 00110010

Explanation:


Introduction / Context:
Moving between decimal arithmetic and fixed-width binary encodings is a common task in programming and embedded systems. This exercise reinforces how to add decimal numbers and then correctly encode the result as an 8-bit binary value, taking care with leading zeros for fixed-width formats used in registers and memory.


Given Data / Assumptions:

  • Addends: 49 and 1 (decimal).
  • Output format: 8-bit unsigned binary.
  • No overflow concerns because the sum is small compared to 255.


Concept / Approach:
First, perform the base-10 addition. Next, convert the decimal result to binary using positional weights or successive division by 2. Finally, represent the binary value using eight bits by adding leading zeros if the natural binary length is less than 8 bits.


Step-by-Step Solution:

Compute sum: 49 + 1 = 50 decimal.Convert 50 to binary: 50 = 32 + 16 + 2 = 2^5 + 2^4 + 2^1 → bits set at positions 5, 4, and 1.Natural binary: 110010₂.Pad to 8 bits: 00110010.


Verification / Alternative check:
Convert back: 00110010₂ = 32 + 16 + 2 = 50, matching the decimal sum. Hex check: 0x32 equals 50 decimal, further confirming the result.


Why Other Options Are Wrong:

  • 01010101: Equals 85 decimal.
  • 00110101: Equals 53 decimal.
  • 00110001: Equals 49 decimal (the original, not the sum).


Common Pitfalls:
Forgetting to pad to 8 bits, misplacing the binary point, or mis-summing powers of two. Always double-check by reconverting to decimal or cross-checking with hexadecimal.


Final Answer:
00110010

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion