Skip to main content

Conversions: (21)₈, (671)₁₀ to BCD, (110101.011)₂

Short answer

(i) Octal 21 = 010 001 binary = 10001₂. (ii) 6→0110,7→0111,1→0001 gives BCD 0110 0111 0001. (iii) 2⁵+2⁴+2²+2⁰+2⁻²+2⁻³ = 53.375.

Convert the following number system: i) (21)₈ = (?)₂ ii) (671)₁₀ = (?)BCD iii) (110101.011)₂ = (?)₁₀

(i) (21)8(21)_8 to binary

Write each octal digit in 3 bits: 2 = 010, 1 = 001.

(21)8=(010 001)2(21)_8 = (010\ 001)_2 = (10001)2(10001)_2 (check: 2×8+1=17=16+12\times8 + 1 = 17 = 16 + 1).

(ii) (671)10(671)_{10} to BCD

Code each decimal digit in 4 bits:

Digit671
BCD011001110001

Answer: (671)10=(0110 0111 0001)BCD(671)_{10} = (0110\ 0111\ 0001)_{BCD}

(iii) (110101.011)2(110101.011)_2 to decimal

=1⋅25+1⋅24+0⋅23+1⋅22+0⋅21+1⋅20+0⋅2−1+1⋅2−2+1⋅2−3=32+16+4+1+0.25+0.125=53.375\begin{aligned} &= 1\cdot2^5 + 1\cdot2^4 + 0\cdot2^3 + 1\cdot2^2 + 0\cdot2^1 + 1\cdot2^0 + 0\cdot2^{-1} + 1\cdot2^{-2} + 1\cdot2^{-3} \\ &= 32 + 16 + 4 + 1 + 0.25 + 0.125 \\ &= 53.375 \end{aligned}

Answer: (110101.011)2=(53.375)10(110101.011)_2 = (53.375)_{10}

✓ Answer checked by Claude Opus 5.5 (high effort)

All Digital Logic chapter 1 questions →