# How to Calculate the Disk Space Required to Store Googolplex?

Given the googolplex number and that 1 gigabyte = 1 073 741 824 bytes. How would I calculate the amount of disk space required to store the googolplex number?

-

Googolplex is $10^{10^{100}}$. Now, the number of bits required to store the number $n$ is $\lg n$ (that is, $\log_2 n$). We have:

$\lg 10^{10^{100}}=10^{100}\cdot \lg 10$

A byte contains $8=2^3$ bits, and as you said, a gigabyte contains $2^{30}$ bytes. So a gigabyte contains $2^{33}$ bits. Hence you need $\frac{10^{100}}{2^{33}}\lg 10$ gigabytes overall.

This is around $3.867 \times 10^{90}$ gigabytes.

Now, of course, there is a much easier way to store googolplex and similar numbers: You can represent them as $a^{b^c}$ with $a,b,c$ small, and only need the bits to store $a,b,c$ and the information of your specific storage method (it's something around 14 bits). You can also represent googolplex by a single bit if you'd like, but then your number-representation algorithm will be rather specific...

-
I think it's amusing that we claim we need so many gigabytes to store this number, but we reference it so casually in the same sentence! Taken literally, to store the information contained in the word "googleplex" we need enough space to store the expression $10^{10^{100}}$. Of course, if we wanted to store a number on the order of one googleplex that had random digits with full accuracy, this question becomes more relevant. –  barf Jun 2 '11 at 16:26

In the sense of information theory, you just need to store any program that will calculate a googolplex, which can be written in a few hundred bytes. I once saw one on the web, along with a suggestion that it not be run for 567 years. The justification was that by Moore's Law, you shouldn't run any program that takes more than four years to run-you should wait two years for speeds to double and then run it then. The program needed a factor of $2^{283.5}$ to meet that.

-
I think that was referring to a googol only. :-) –  ThudanBlunder Jun 2 '11 at 13:19
@ThudanBlunder: As far as I recall, it was "calculating" a googolplex, which it really did by "outputting" a googol of zeros (which it then cautioned should not be sent to a display as they are much slower). –  Ross Millikan Jun 2 '11 at 16:29

If you use the trivial approach to store the number in its binary representation then you have to calculate the length of the number in base 2 to get the amount of bits you need to store it. Then you can convert the number of bits into bytes (1 byte = 8 bit). The amount of bits is equivalent to the number of digits in base 2 which is given by the $D_2$ function I referenced here.

So in total:

Number of bytes to store $x = D_2(x)/8$

-