Tag for questions about using various number bases in Mathematica. This includes, but is not restricted to base notation, base conversion and formatting issues.

learn more… | top users | synonyms

0
votes
0answers
47 views

Want all numeric output to be displayed in a base other than 10 [on hold]

Is it possible to set all calculations to use a base other than 10 by default?
1
vote
1answer
41 views

No function to enter value in a different base?

I notice that there is a syntax to enter a numeric literal in a different base, for example: In[8]:= 5^^1000000000000101 Out[8]= 30517578151 However, there does ...
1
vote
1answer
40 views

How to preserve real number's precision

RealDigits[523.502] gives me {{5, 2, 3, 5, 0, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9}, 3}. Is there a way in run time to tell ...
0
votes
1answer
43 views

What is the preferred way to go from a non-decimal basis to a decimal basis?

We can insert a number in a basis different than 10 using the basis^^number expression. However, strangely enough, there does not seem to be a corresponding ...
1
vote
1answer
63 views

Select base and exponent of arbitrary number

I want to write a function say BaseExponent that will output the base and exponent of a number. In particular it should do the following: ...
3
votes
2answers
167 views

How to print of all ternary number of 100 digits?

For example, to print all ternary number of 3 digits I would do something like this Do[Do[Do[Print[i, j, k], {k, 0, 2}], {j, 0, 2}], {i, 0, 2}] to return 000, ...
1
vote
1answer
66 views

Is the arbitrary base that can be defined by IntegerLength[n,base] really limitless?

I am going to be working with very large numbers, and would like write the input in the base 10 and have the computer output in another arbitrary base. If it truly is limitless, that would be awesome ...
11
votes
4answers
4k views

How to convert from base 2 to base n?

I'm trying to use baseform to convert numbers in base 10 to base n, how can I make the convertion between, say base 2 to base n? Baseform seems to always think that the base in expr ...
7
votes
1answer
342 views

View the FullForm of ^^

Why am I unable to see the FullForm of ^^ (the shorthand notation for BaseForm)? ...
2
votes
4answers
286 views

Padding and formatting within BaseForm

I find using BaseForm to be a little tricky. For example, if you use BaseForm and then do some additional operation all the numbers turn back into base 10, so you have do BaseForm as the "last step". ...
0
votes
1answer
111 views

Truncate a fractional value to particular number of bits?

If I have a fractional value, how can I truncate (not round) that to a certain number of bits, like 8? For example, for Pi 3.141569265359... the fractional part is 0.141569265359... ...
5
votes
2answers
336 views

How do I remove the subscript after calling BaseForm[]?

Say I want to convert some number $N$ to base $k$. Here, I might use the command BaseForm[N,k], e.g.,BaseForm[10,...
12
votes
3answers
292 views

Numbers in alternate bases transcend the evaluator?

It looks to me like a number in a base other than base 10 gets evaluated before the evaluator ever gets a chance to be tweaked. For example, FullForm[16^^abcdef] ...
7
votes
2answers
192 views

“A number in base b” and pure functions: why doesn't b^^# & work?

Why do the following not work (in Mathematica 7)? 2^^ # & /@ {1000, 1101} and 2^^ # & @ 1101 This does work: ...