Subjects computer science

Binary Conversion 99217D

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Use the AI math solver

1. **Problem:** Convert the binary number $10101_2$ into its equivalent decimal and octal. 2. **Formula and rules:** - To convert binary to decimal, multiply each bit by $2^{position}$ starting from 0 on the right. - To convert binary to octal, group bits in sets of 3 from right to left and convert each group to its octal equivalent. 3. **Convert binary to decimal:** $$10101_2 = 1\times2^4 + 0\times2^3 + 1\times2^2 + 0\times2^1 + 1\times2^0$$ $$= 1\times16 + 0 + 1\times4 + 0 + 1 = 16 + 4 + 1 = 21_{10}$$ 4. **Convert binary to octal:** Group bits: $10\,101$ (add leading zero to make full groups of 3 bits: $010\,101$) - $010_2 = 2_8$ - $101_2 = 5_8$ So, $10101_2 = 25_8$ **Final answer:** - Decimal: $21$ - Octal: $25$