Decimal to BCD (digit-wise) — include fractional part Convert 59.72 (base 10) to Binary-Coded Decimal (BCD), writing 4 bits per decimal digit and placing a dot to separate integer and fractional parts.

Difficulty: Easy

Correct Answer: 01011001.01110010

Explanation:


Introduction / Context:
Binary-Coded Decimal (BCD) encodes each decimal digit independently in 4 bits. For numbers with a decimal point, we simply encode each digit on either side of the point and keep the separator to maintain readability. This is useful for displays and financial applications where exact decimal digits must be preserved.


Given Data / Assumptions:

  • Decimal number: 59.72.
  • BCD encodes each digit 0–9 as 0000–1001.
  • The dot is a separator only; it is not encoded as bits.


Concept / Approach:
Encode 5 → 0101, 9 → 1001, 7 → 0111, 2 → 0010. Concatenate the nibbles in digit order and keep the dot in place to mark the fractional boundary.


Step-by-Step Solution:

1) Split digits: 5, 9, 7, 2.2) Map to BCD: 5 → 0101, 9 → 1001, 7 → 0111, 2 → 0010.3) Join with dot: 0101 1001 . 0111 0010.4) Remove spaces for compact form: 01011001.01110010.


Verification / Alternative check:
Check each nibble corresponds to a valid BCD digit (no codes above 1001). The integer part reads 59 and the fractional part reads 72 when interpreted per digit, matching the original decimal number.


Why Other Options Are Wrong:

  • 111011 or 1110.11: these are pure binary patterns, not BCD per digit.
  • 0101100101110010 (no dot): loses the fractional delimiter that the question requests to keep.


Common Pitfalls:
Confusing pure binary conversion with BCD, or attempting to encode the dot itself as bits.


Final Answer:
01011001.01110010

Discussion & Comments

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