Message Boards Message Boards

0
|
5952 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

How do I tell the Base Conversion Calculator how many digits there are?

I do not understand how to use the Base Conversion Calculator to convert from, say, Base 25 to, say, Base 16 and tell it how many digits there are. The number 23 COULD be 2:3, but it could Also be 23, two digits or one digit. Do you know how to tell it what the digits actually are? Please tell me. I created my own base converter, I called it the Positional Number System Converter, and I spent months and months working on it. That was before I learned about Logarithms, and found out how much easier it is to do everything I'd figured out how to do without them. Mind==blown! http://www.clipular.com/c/6423607620141056.png?k=X8mpJuho7vfzuB4J8uiJJWpGN-c

2 Replies

Yes, that answers my question, thank you. So, why is it that when Mathematica Displays a number in a high base it does not do so in letters? When I tell it to convert from base 10 to base 25 it displays the number in the higher base using ":" between base 10 numerals. Thus my frustration. The input method should match the output, and it does not, Except when converting to or from Hexadecimal, base 16.

Dear Aaron,

I am not quite sure whether I understand your question correctly. I suppose that when you say

The number 23 COULD be 2:3, but it could Also be 23, two digits or one digit.

you mean that in base 25, you could have a digit that corresponds to 23 units, so if you type that into Mathematica it cannot know whether it is the single "digit" corresponding to 23 units. If that is your problem, and I a not sure whether it is, then Mathematica solves that trivially. It attaches letters to the higher digits. For example if in base 11 you need another digit (beyond the digits 0-9 for the decimal system), Mathematica calls that "a" so the digits that you need are just letters. Given that there is only a finite number of letters, this does cause a problem for bases which are large. For the small ones it works quite effortlessly:

BaseForm[25^^afdda52, 16] 

Converts the number afdda52 (given in to base 25) to base 16. The digits in base 25 are:

0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o.

This is why

25^^p 

gives an error, whereas

25^^o

works just fine. So the "digit" 23 corresponds to m.

BaseForm[25^^m,10]

evaluates, as expected, to 22.

I am not sure whether this helps, but I just wanted to give it a shot.

Cheers,

Marco

POSTED BY: Marco Thiel
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract