Big Integer Base Converter?

377 Views Asked by At

I need to convert some really big numbers from base-10 to base-8. All online converters I found cap the conversion at around 20 digits. Are there any downloadable programs with no digit limit? I'm running Windows 10, but Linux or Mac are possibilities if necessary to accomplish this.

3

There are 3 best solutions below

2
On BEST ANSWER

Python (the programming language and environment, you can download the IDLE environment on Windows, e.g.) has support for arbitrary precision integers (bigint) natively. It's not hard to convert bases using this (oct and hex are built-in functions). One can easily make a command line tool to do this (e.g. to treat numbers stored in a file if size is too large to write the numbers on the command line).

On MacOS and most Linuces python comes pre-installed. So nothing to do there.

It's free, easy to learn and requires no internet connection (as opposed to online tools). Check it out.

1
On

If I understand your problem, the GPL program PARI-GP can handle arbitrary length integers (given enough memory of course) and can convert integer $x$ to integer base $b$ using the function $\texttt{digits(x,b)}$. It can read decimal numbers from a text file. For example $\texttt{readvec("num.txt")}$ returns a vector of the numbers from the file which has at most one number on each line.

One advantage of $\texttt{gp}$ is that you can download it as a single stand-alone executable file on Windows and run it interactively from the command line.

1
On

So I found this calculating tool which might work for you.

http://wims.unice.fr/wims/wims.cgi

I tried using it and I typed a lot of random digits and it could convert them.

You could just copy and paste your number into the converter, but if the number is very large the number would go off the screen but you can scroll right to select and copy the new number.

enter image description here

Requires no downloading