Question: In this format, a number is represented as a String consisting of 5 characters: t, n, z, N, and T; these characters represent the values

In this format, a number is represented as a String consisting of 5 characters: t, n, z, N, and T; these characters represent the values -2, -1, 0, 1, and 2.

The number string TnN is equal to 46:

  • The rightmost character, N, has the value 1; this is multiplied by 5^0 = 1 to obtain 1.
  • The second-rightmost character, n, has the value -1; this is multiplied by 5^1 = 5 to obtain -5.
  • The third-rightmost character, T, has the value 2; this is multiplied by 5^2 = 25 to obtain 50.

Then, the contributions of all of these characters is summed, to obtain 2 * (5^2) + -1 * (5^1) + 1 * (5^0) = 50 + -5 + 1 = 46.

Now if I was given a number lets say 17, how do I obtain the representative string from it?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!