# Math Help - Number of possible digits in a binary representation of a number

1. ## Number of possible digits in a binary representation of a number

Hi all,

Suppose that when n is written in decimal notation it has 100 digits. Which
possibilities are there for the number of digits if n is written in binary notation?

Any ideas?

Thanks

2. Hello, sirellwood!

Suppose that when $\,n$ is written in decimal notation it has 100 digits.
What possibilities are there for the number of digits if $\,n$ is written in binary notation?

$\text{If }n\text{ has 100 digits: }\:10^{99}\:\le\: n\:<\:10^{100}$

$\text{Suppose }2^k\text{ is the largest power-of-2 contained in }n.$

. . $\text{Then: }\;10^{99}\:\le\: 2^k \:<\:10^{100}$

$\text{Take logs: }\;\log(10^{99}) \:\le\;\log(2^k) \:<\:\log(10^{100})$

. . . . . . . . . . . . . $99 \:\le \:k\log 2 \:<\:100$

. . . . . . . . . . . . . $\dfrac{99}{\log 2} \:\le \: k \:<\:\frac{100}{\log2}$

. . . . . . . . . . . . $328.87 \:\le\:k \:<\:332.19$

. . . . . . . . . . . . . . $329 \:\le\:k\:\le\:332$

$\text{Therefore, }n\text{, written in binary, has from 329 to 332 digits.}$

3. Originally Posted by Soroban
Hello, sirellwood!

$\text{If }n\text{ has 100 digits: }\:10^{99}\:\le\: n\:<\:10^{100}$

$\text{Suppose }2^k\text{ is the largest power-of-2 contained in }n.$

. . $\text{Then: }\;10^{99}\:\le\: 2^k \:<\:10^{100}$

$\text{Take logs: }\;\log(10^{99}) \:\le\;\log(2^k) \:<\:\log(10^{100})$

. . . . . . . . . . . . . $99 \:\le \:k\log 2 \:<\:100$

. . . . . . . . . . . . . $\dfrac{99}{\log 2} \:\le \: k \:<\:\frac{100}{\log2}$

. . . . . . . . . . . . $328.87 \:\le\:k \:<\:332.19$

. . . . . . . . . . . . . . $329 \:\le\:k\:\le\:332$

$\text{Therefore, }n\text{, written in binary, has from 329 to 332 digits.}$