0

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

groot
  • 109
  • you use the definitions of the number systems (tedious task) and show directly the hint: $f^{-1}(f(n_b )) = n_b$, QED – Nikos M. Sep 08 '15 at 22:26
  • Note that any one-to-one function $f$ (as given in example) always has an inverse $f^{-1}$ (which is the second one-back to-the first one!), here you are asked to verify this – Nikos M. Sep 08 '15 at 22:28
  • This is what I have come up with so far : 1)$ f^−1((y)=x)$ 2) $f−1(x=y) $3) $f(y = x)$ . Does this look like what they are asking for? – groot Sep 08 '15 at 22:33
  • No use the definition of the number system and show there is a function that computes the opposite direction (from decimal to number system $b$), tedious but straight-forward, just try to reverse the computations – Nikos M. Sep 08 '15 at 22:35
  • $n_3 = 121_3 $ = $121_3$ and $N_10 = 16_10$ Like this? – groot Sep 08 '15 at 23:08

0 Answers0