2

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.

abcjme
  • 133
  • 2
  • 2
    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 02:56
  • @Somos Yes, it reached its limit. – abcjme Jun 30 '18 at 03: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 03: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 03:06
  • @Somos "What do you mean you have really big numbers? Are they in a file? What is the file format?"

    I just have a list of tem in a txt file. They're not formatted for tsv or csv, though I could do that if needed.

    "Why do you need to "convert" to base 8? ? What will you do with the converted number?"

    It's just for pattern recognition, to help in solving math problems.

    – abcjme Jun 30 '18 at 03:14
  • @Ross Millikan Mathematica and Python both worked. However, Mathematica is an extremely big program, slower to start-up, and apparently requires purchase. I'll stick to Python. I looked up Maple online, but didn't bother trying it since Python works so well. – abcjme Jun 30 '18 at 15:45

3 Answers3

3

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.

Henno Brandsma
  • 242,131
2

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.

Somos
  • 35,251
  • 3
  • 30
  • 76
1

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

Puffy
  • 441