Is anyone able to guide me in the right direction for this question. This is for a beginner assembly language class. This is an online course so I am unable to ask the professor for guidance.
Show that the one to one function:
$f^{-1}$ : $N_{10} \rightarrow N_b $
is the inverse of
$ f: N_b \rightarrow N_{10} $
Hint: Show
$f^{-1}(f(n_b )) = n_b $
Any help is appreciated, thank you!
Notes given ::
Converting numbers in any base b to its corresponding number in the base 10 We will consider two cases: b < 10 and b = 16.
Case 1: b < 10
Let $n_b$ be an arbitrary number in the base b and n be an arbitrary number in the base 10.
$n_b = a_n a_n-1 ...a_1 a_0 = a_n * 10_b^n + a_n-_1 * 10_b^n-^1 + ... a_1 * 10_b + a_0 $
where $a_k are the digits of base b.
Now we begin by defining the mapping :
$10_b^k \rightarrow b^k $ where k=0 ,...n
and
$10_b$ is a number in the base b
and
b is a number in the base 10.
Since b < 10, b and all the numbers $a_k$ are in the base b, they are also in the base 10.
Therefore we define the mapping
$a_n * 10_b^n + a_n-_1 * 10_b^n-^1 + ... + a_1 * 10_b + a_0 \rightarrow a_nb^n + a_n-_1 b^n-^1 + ... + a_1b + a_0 $
which is a number in the base 10.
We can write this as
$ n_b = a_na_n-_1 ... a_1a_0 \rightarrow a_nb^n + a_n-_1 b^n-^1 + ... + a_1b + a_0 = n_10 $
This gives us a one-to-one mapping $ N_b \rightarrow N_10 $
where
$N_b$ is the set of numbers of the base b
and $N_10$ is the set of numbers of the base 10