# Big Integer Base Converter?

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.

• Did you try Wolfram|Alpha? – Somos Jun 30 '18 at 2:52
• You need something that uses arbitrary precision integers. Python will do that, as will Mathematica and (I believe) Maple. If you don't have access to those, you can roll your own in a spreadsheet. Put a number of your digits into each cell horizontally, then implement the carries in the formulas. How many digits are in your numbers? Only hundreds or millions? Or a googol? – Ross Millikan Jun 30 '18 at 2:56
• @Somos Yes, it reached its limit. – abcjme Jun 30 '18 at 3:01
• @Ross Millikan In the tens of thousands of digits range. I have no experience with any of those computer languages. Are there any already-made scripts? – abcjme Jun 30 '18 at 3:03
• Okay, I should have asked this first. What do you mean you have really big numbers? Are they in a file? What is the file format? Why do you need to "convert" to base 8? What will you do with the converted number? – Somos Jun 30 '18 at 3:06

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.

• Yes, I found out that Python does this extremely well with: format(x, 'o') where x is the integer. – abcjme Jun 30 '18 at 15:50
• @abcjme yes, that’s another way to do it. I’m a Python fan. It’s my go-to calculator tool – Henno Brandsma Jun 30 '18 at 16:04

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.

• I couldn't get PARI to work. However, I found that Python works extremely well for this. – abcjme Jun 30 '18 at 15:46

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