BCD encoding — two-digit example Represent the decimal value 11 in BCD (Binary-Coded Decimal) using two 4-bit nibbles.
-
A00001011
-
B00001100
-
C00010001
-
D00010010
Answer
Correct Answer: 00010001
Explanation
Introduction / Context:BCD encodes each decimal digit independently into 4 bits. Thus, a multi-digit number is stored as a sequence of 4-bit nibbles, one per decimal digit. This preserves decimal digit boundaries, which simplifies display and certain arithmetic routines at the cost of storage efficiency versus pure binary.
Given Data / Assumptions:
- Target number: 11 in decimal (two digits: 1 and 1).
- Standard BCD mapping: 0→0000, 1→0001, …, 9→1001.
- No sign nibble or decimal point involved.
Concept / Approach:
Convert each decimal digit independently to a 4-bit code and then concatenate the codes in the same order (most significant digit first). For 11, both digits are 1, so both nibbles are identical.
Step-by-Step Solution:
Digit 1 → 0001.Second digit 1 → 0001.Concatenate: 0001 0001 → 00010001.Verification / Alternative check:
Reverse mapping: split 00010001 into 0001 and 0001 → digits 1 and 1 → 11 decimal. This confirms correct BCD representation.
Why Other Options Are Wrong:
00001011 is the pure binary of decimal 11 (1011) padded to 8 bits, not BCD.
00001100 equals binary 12 padded, not BCD for 11.
00010010 corresponds to digits 1 and 2 (i.e., 12 in BCD), not 11.
Common Pitfalls:
Confusing BCD with binary of the entire number, or reversing digit order. Always encode each decimal digit separately in BCD problems.
Final Answer:
00010001