How to convert from a power of base two to a power of base 10?
I might have an extremely silly question: If I have a number, say $2^{32}$ and I need to convert to base 10, how should I do it? I know it should be $4 * 10^9$, but I do not know how did we get it.
I understand that $10$ is $2^3 + 2$, but I cannot understand how to proceed further in my reasoning...
Thanks!
$\endgroup$ 15 Answers
$\begingroup$$$ \log_{10} (2^{32}) = \frac{32 \log 2}{\log 10} \approx 9.633 $$ and since $10^{0.633} \approx 4$, $$ 2^{32} \approx 4 \cdot 10^9$$. Or, notice that $2^{10} \approx 10^3$. It follows that $2^{30} \approx 10^9$, and $2^{32} \approx 4 \cdot 10^9$.
$\endgroup$ 2 $\begingroup$To brush up on algebra rules for exponents, the relevant rule here is that $x^{A*B}=(x^A)^B$. And as the others have already mentioned, $2^{10}=1024≈10^3=1000$. If we pick an example number that is so horrendously gigantic where this small inaccuracy doesn't matter, something like $2^{(2^{20})}=2^{1,048,576}$, you can factor out the exponent and replace it as follows:$$2^{1,048,576}=2^{10*104,857}=(2^{10})^{104,857}=(10^3)^{104,857}=10^{3*104,857}=10^{314,571}$$Extremely simple, as long as you remember the algebra fundamentals :)
$\endgroup$ $\begingroup$To work with exponents of different bases, you also need its opposite operation, the logarithm:
$$ 2^x = 10^y $$applying a $log_{10}$ to the previous equation:
$$ y = \log_{10} 2^x = x·\log_{10}2 = 0.30103x $$
Therefore (in your question; $2^{32}$):
$$ y = 32×0.30103 = 9.63296 $$$$ 2^{32} \sim 10^{9.6} $$
Summary: The factor $0.3$ can be used to multiply the exponent of $2$ to obtain the exponent of $10$, or can be used to divide the exponent of $10$ to get the exponent of $2$, and the approximation is very high, particularly for big exponents.
$\endgroup$ $\begingroup$Let's start by noting that $2^{32}\ne 4*10^{9}$. However, $4*10^{9}$ does approximate $2^{32}$ to one significant figure ($2^{32}=4294967296$). So, strictly speaking, you do not seem to know what the answer should be---only a low-order approximation.
There is probably a sophisticated way of solving this problem algebraically... But we also have the option to simply brute-force it.
By "brute forcing," I mean to just write out $2^{32}$ in its integer form by plugging it in to a calculator. This will give you its base 10 representation by default. You will find that you get:
$$2^{32}=4294967296$$
This number is actually short-hand notation for an expansion in powers of 10. In general, any integer can be written:
$$N = \Sigma_{i=0}^{M}A_{i}10^{i},\quad where\quad M \lt \infty$$
It is easiest to see this by starting from the right-side of 4294967296, which represents the single digit term ($6x10^{0}$). The number preceding the single-digit term, to the left, represents a multiple of 10 ($9x10^{1}$), while the third number from the right represents a multiple of 100 ($2x10^{2}$), and so on:
$$2^{32} = 4294967296 \\ = 6(10^{0})+9(10^{1})+2(10^{2})+7(10^{3})\\+6(10^{4})+9(10^{5})+4(10^{6})+9(10^{7})\\+2(10^{8})+4(10^{9})$$
From this expansion, you can see that $4*10^{9}$ is only the lowest order approximation. There are higher-order corrections all the way down to the single-digit scale!
Of course, writing this expansion out explicitly is not necessary. The exact base-10 representation you are looking for is simply found by simultaneously multiplying and dividing the integer-representation we found by its leading power of 10 (which is equivalent to multiplying by 1):
$$2^{32}*\frac{10^{9}}{10^{9}}=\frac{4294967296}{10^{9}}*10^{9}=4.294967296*10^{9}$$
$\endgroup$ $\begingroup$$2^{32} = (2^{10})^3\cdot 2^2=$
$1024^3\times 4 = $
I guess this is why you said $2^{32} = 4\times 10^9$. Of course there is rounding and it isn't equal to that. The trick is to know that $2^{10}=1024 \approx 10^3$ so $2^{32} = 2^{30 + 2}=1024^3\times 4 \approx 10^9 \times 4$. But that's an under approximation.
$(10^3 + 24)^3 \times 4 =$
$(10^9 + 3\cdot 24 \cdot 10^6 + 3\cdot 24^2\cdot 10^3 + 24^3)\times 4$.
Okay.....
$24^2 = (25-1)^2 = 5^4 - 50 + 1 = 625-50-1 = 576$.
And $24^3 = (25-1)^3 = 5^6 - 3\cdot 5^4 + 3\cdot 25 -1 = 25*625 - 1875 + 75 -1= 5*3125 -1801 = 15625-1801 = 13824$
So $2^{32} = 4\times 10^9 + 12\cdot 24\cdot 10^6 + 12\cdot 576\cdot 10^3 + 4\cdot 13824 =$
And $12\cdot 24 = 2\cdot 12^2 = 288$
$12\cdot 576 = 5760 + 1152=6912$
$4\cdot 13824 = 5\times 13824 - 13824 = \frac {138240}2-13824 = 69120-13824 = 55296$
So $2^{32} =$
$4,000,000,000 + 288,000,000 + 6,912,000 + 55,296 =$
$4,288,000,000 + 6,967,296=$
$4,294,967,296$
..... or......
we could figure $2^{10} = 10^3 + \frac 14 10^2 - 1$ so
$2^{30 + 2} = (10^3 + \frac 14 10^2 - 1)^3 \times (5-1)$
Which could get interesting.
$= (10^3 + \frac 1{2^6}10^6 - 1 + 3(10^3\cdot \frac 1{2^4}10^4 + 10^3(-1)^2 +\frac 14\times 10^2\times 10^6 + \frac 1410^2 - 10^6 -\frac 1{2^4}10^4 + 2\cdot 10^3\cdot \frac 14\cdot 10^2 \cdot(-1))(5-1)=$
$= (10^3 + \frac 1{2^6}10^6 - 1 + (5-2)(10^3\cdot \frac 1{2^4}10^4 + 10^3(-1)^2 +\frac 14\times 10^2\times 10^6 + \frac 1410^2 - 10^6 -\frac 1{2^4}10^4 + 2\cdot 10^3\cdot \frac 14\cdot 10^2 \cdot(-1))(5-1)=$
etc.....
Which I really don't recommend unless you are morbidly curious and have lots of paper. But its a goo exercise to deal with only the components $5$ and $2$ and seeing how all digits are a matter of cascade.
$\endgroup$