Representing number $X$ in base $r$

85 Views Asked by At

In general, let $X = (X_{n−1}X_{n−2}...X_0)_r$ be an n-digit number in base r. Give an algorithm or explain in English how to represent $X$ in base $r^2$.

I don't understand the question at all. If someone can give examples that would be great.

2

There are 2 best solutions below

0
On

Hint:

One hundred in base $10$: $(100)_{10}=1(10^2)+0(10)+0=100.$

Ten in base $100$: $(10)_{100}=1(100)+0=10$.

This should get you started.

1
On

Hint: In base $r$, you need digits for each of the numbers $0, \ldots, r - 1$, and in base $r^2$ you need digits $0, \ldots, r^2 - 1$. How you express $r^2 - 1$ in base $r$?