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
32 views

Balanced n-ary Base Representation

This may be a repeat question, but I was wondering how one would implement the expression/calculation of a representation of a given number h in base balanced n-ary, where n>1 is odd. (For example, ...
0
votes
2answers
57 views

How to get the digits of the base 2 representation of an integer [closed]

I would like to convert a number into base 2 and then use IntegerDigits[] on it. When using BaseForm[i,2], the notebook only ...
0
votes
1answer
94 views

Split a number in powers of 2 [closed]

Ok , I just worked out that every natural number can be expressed as sum of powers of 2, eg: (9 = 2^3 + 2 ^0). I am looking for an algorithm which does the splitting of natural number into powers of 2 ...
5
votes
1answer
163 views

View the FullForm of ^^

Why am I unable to see the FullForm of ^^ (the shorthand notation for BaseForm)? ...
2
votes
4answers
176 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
87 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... ...
4
votes
2answers
165 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,...
11
votes
4answers
2k 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
2answers
171 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: ...
11
votes
3answers
254 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] ...