3. Convert the following decimal numbers to octal numbers:
(i) 420,
(ii) 2640.
3 .
(i) Solution: From $\frac{420}{8}=52+\frac{4}{8}$, we get $b_{0}=4$. From $\frac{52}{8}=6+\frac{4}{8}$, we get $b_{1}=4, b_{2}=6$, which means $420=(644)_{8}$.
(ii) Solution: From $\frac{2640}{8}=330$, we get $b_{0}=0$. From $\frac{330}{8}=41+\frac{2}{8}$, we get $b_{1}=2$. From $\frac{41}{8}=5+\frac{1}{8}$, we get $b_{2}=1, b_{3}=5$, which means $2640=(5120)_{8}$.