Comp Chap 7

Which one of the following is the equivalent 8421BCD code of the decimal number 87.34 ?

Verified Answer
A. 10000111.00110100
B. 10100111.00110100
C. 10001110.11000010
D. 10101110.11000010

Explanation:

To convert a decimal number to its 8421 BCD (Binary Coded Decimal) equivalent, each decimal digit is individually converted into its 4-bit binary representation. The 8421 weighting refers to the positional values of the bits in each 4-bit group ($8 \times \text{bit}_3 + 4 \times \text{bit}_2 + 2 \times \text{bit}_1 + 1 \times \text{bit}_0$). \nLet's convert the decimal number $87.34$: 1. **Integer Part (87):** * For the digit 8: The 4-bit BCD code for 8 is $1000_2$ (since $1 \times 8 + 0 \times 4 + 0 \times 2 + 0 \times 1 = 8$). * For the digit 7: The 4-bit BCD code for 7 is $0111_2$ (since $0 \times 8 + 1 \times 4 + 1 \times 2 + 1 \times 1 = 7$). * Combining these, the BCD for 87 is $10000111_2$. 2. **Fractional Part (34):** * For the digit 3: The 4-bit BCD code for 3 is $0011_2$ (since $0 \times 8 + 0 \times 4 + 1 \times 2 + 1 \times 1 = 3$). * For the digit 4: The 4-bit BCD code for 4 is $0100_2$ (since $0 \times 8 + 1 \times 4 + 0 \times 2 + 0 \times 1 = 4$). * Combining these, the BCD for .34 is $.00110100_2$. 3. **Combining both parts:** The 8421 BCD code for $87.34$ is $10000111.00110100_2$. \nLet's evaluate the given options: * **(a) $10000111.00110100$**: This matches our calculated BCD code. The integer part $1000_2$ ($8$) and $0111_2$ ($7$) forms $87$. The fractional part $0011_2$ ($3$) and $0100_2$ ($4$) forms $.34$. Thus, this option is correct. * **(b) $10100111.00110100$**: The first 4-bit group $1010_2$ represents decimal $10$, which is not a valid BCD digit (BCD only represents $0-9$). This is incorrect. * **(c) $10001110.11000010$**: The second 4-bit group in the integer part $1110_2$ represents decimal $14$, which is not a valid BCD digit. The first 4-bit group in the fractional part $1100_2$ represents decimal $12$, also not a valid BCD digit. This is incorrect. * **(d) $10101110.11000010$**: This option contains multiple invalid BCD digits ($1010_2$ for $10$, $1110_2$ for $14$, $1100_2$ for $12$). This is incorrect. \nTherefore, the correct 8421 BCD code for the decimal number $87.34$ is $10000111.00110100$.