1

If $\log2= 0.301$, then how many number of digits are in $2^{64}$?

What I did: $$\log(2)^{64}=\log2^{64}=64\log2=64\log2=19.264$$

Number of digits comes out to be $5$. But answer is $20$? I have written $\log 2$ raise to the power $64$

  • $2^64\ne2^{64}$ –  Jul 13 '17 at 13:11
  • The number of digits comes from a base ten logarithm, not base two. – Sean Roberson Jul 13 '17 at 13:15
  • 2
    How about a better title to your question? – Asaf Karagila Jul 13 '17 at 13:17
  • Your edit, replacing $1.9$ by $19$, means you now have the right answer. Extra useful thing to remember: since $10^3 = 1000 \approx 1024 = 2^{10}$ the number of decimal digits is about $1/3$ the number of binary digits. – Ethan Bolker Jul 13 '17 at 13:20
  • "Number of digits comes out to be $5$": what do you mean ? –  Jul 13 '17 at 13:20
  • How? Answer is 19.264. It means 5 digits. @EthanBolker – mathematics Jul 13 '17 at 13:21
  • @mathematics: ouch, you completely missed the problem! –  Jul 13 '17 at 13:23
  • @YvesDaoust what do you mean? :( – mathematics Jul 13 '17 at 13:24
  • That $19.264$ is the base $10$ logarithm of the number you're interested in. The base $10$ logarithm of a number is (approximately) the number of base $10$ digits it has. It's "approximate" because the number of digits is, of course, an integer. So you round the $19.264$ up to $20$. – Ethan Bolker Jul 13 '17 at 13:25
  • 2
    You are asked the number of digits in $18446744073709551616$. The number of digits in $64\log 2$ is infinite as this is an irrational number. –  Jul 13 '17 at 13:29

3 Answers3

2

Hint

Let's call $n$ the number of digits of $2^{64}$ then

$$10^{n-1}\le2^{64}<10^n$$

so,

$$n-1\le\log 2^{64}<n$$ $$n-1\le 64\log 2<n$$

Can you finish?

Arnaldo
  • 21,342
  • No, I did not get it. @Arnaldo. From the very first step – mathematics Jul 13 '17 at 13:23
  • @mathematics: for example, 21 has two digits so we can write $10^{2-1}\le 21< 10^2$. That is because $10^n$ is the first number with $n+1$ digits. Is it clear? – Arnaldo Jul 13 '17 at 13:24
0

Because number of digits it's$$[64\log2]+1=20,$$ which gives the answer.

In the general case if $n$ is a number of digits of natural $N$ then $n=[\log{N}]+1$

Indeed, let $N=a_0\cdot10^{n-1}+a_1\cdot10^{n-2}+...+a_{n-1}$, where $a_i\in\{0,1,...,9\}$ and $a_0\neq0$.

Hence, $n$ is a number of digits.

We see that $10^{n-1}\leq N<10^n$ or $n-1\leq\log{N}<n$,

which says $[\log{N}]=n-1$ and we are done!

0

See that $100 = 10^2$ and $1000 = 10^3$ and so on. The number of digits in both those numbers is one more than the exponent on $10$. If we write any 3-digit number as a power of 10, then the exponent will be between $2$ and $3$. For instance, $423 = 10^{2.6263\ldots},$ where, of course $2.6263\ldots$ is the base-10 log of $423.$

Using this principle we can do this:

$$2^{64}= \left(10^{\log 2}\right)^{64} = 10^{64\log } = 10^{19.26\ldots}. $$

So we know the number has 20 digits.