Question:

The binary code of $(21.125)_{10}$ is _______.

Show Hint

Convert decimal to binary by separating integer and fraction parts. Use division by 2 for integers and multiplication by 2 for fractions.
Updated On: Jun 23, 2025
  • 10101.001
  • 10100.001
  • 10101.010
  • 10100.111
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Step 1: Convert integer part (21) to binary
Repeatedly divide 21 by 2 and store remainders:
21 ÷ 2 = 10 remainder 1
10 ÷ 2 = 5 remainder 0
5 ÷ 2 = 2 remainder 1
2 ÷ 2 = 1 remainder 0
1 ÷ 2 = 0 remainder 1
Writing remainders from bottom to top: $10101$
Step 2: Convert fractional part (0.125) to binary
Multiply the decimal part by 2 and take the integer part:
$0.125 \times 2 = 0.25$ → Integer part: 0
$0.25 \times 2 = 0.5$ → Integer part: 0
$0.5 \times 2 = 1.0$ → Integer part: 1
So, $0.125 = 0.001$ in binary
Step 3: Combine integer and fraction parts
\[ 21.125 = 10101.001_2 \] Step 4: Why others are wrong
- Option (2) is 20.125
- Option (3) is wrong fractional part
- Option (4) has wrong integer and fractional parts
Conclusion: Correct binary representation is $10101.001$
Was this answer helpful?
0
0