# Digits in a large power of two

I am trying to find the answer to: 2^34359738368. As to be expected every calculator and computer program I have used has crashed.

To be honest I don't even want to know the exact answer, I just want to really roughly know the number of digits the answer has.

Is there a trick to doing something like this or is it something that should be put into the too hard basket?

Reason: I want to know how big of a number the binary for a 4gb file is

• The number of digits of $n$ is $$1+\lfloor \log_{10}n \rfloor=\lceil\log_{10}n \rceil$$ – lab bhattacharjee Jun 4 '13 at 4:38

Are you familiar with logarithms? There is a way to get the exact number of digits in this expression using logarithms. Our number system is written in base 10, i.e., each integer $a$ with $k$ digits and decimal representation $d_{k-1}d_{k-2}\ldots d_{0}$ can be expressed as $10^{0}*d_{0} + 10^{1}*d_{1} + \cdots + 10^{k-1}d_{k-1}$. To get the number of digits, therefore, we need to find the highest power of $10$ appearing in this expression and add $1$ to it. We can easily see that this is given by taking the floor of the base 10 logarithm of $a$ and adding 1, or #digits$(a) = \lfloor \log_{10} a \rfloor + 1$.
Using this information, we can now find the number of digits contained in $2^{34359738368}$ by using the properties of logs. We have #digits$(2^{34359738368}) = \lfloor \log_{10} (2^{34359738368}) \rfloor + 1 = \lfloor 34359738368 \log_{10}(2) \rfloor + 1$