Find the number of digits in 2^100

hard 2 min read

Question

Find the number of digits in 21002^{100}.

Solution — Step by Step

The number of digits in a positive integer nn is given by:

Number of digits=log10n+1\text{Number of digits} = \lfloor \log_{10} n \rfloor + 1

where x\lfloor x \rfloor is the floor function (greatest integer x\leq x).

Why? A number with dd digits satisfies 10d1n<10d10^{d-1} \leq n < 10^d. Taking log10\log_{10}: d1log10n<dd - 1 \leq \log_{10} n < d. So d=log10n+1d = \lfloor \log_{10} n \rfloor + 1.

log10(2100)=100×log102\log_{10}(2^{100}) = 100 \times \log_{10} 2

Using the standard value: log102=0.30103\log_{10} 2 = 0.30103

=100×0.30103=30.103= 100 \times 0.30103 = 30.103
30.103+1=30+1=31\lfloor 30.103 \rfloor + 1 = 30 + 1 = 31

21002^{100} has 31 digits.

Why This Works

The number of digits in any number nn counts how many times we need to multiply 10 to reach or exceed nn. That’s exactly what log10(n)\log_{10}(n) measures. The floor function takes care of the fact that we need whole digits.

For example: log10(100)=2\log_{10}(100) = 2 (3 digits), log10(999)=2.999...\log_{10}(999) = 2.999... (still 3 digits), log10(1000)=3\log_{10}(1000) = 3 (4 digits). The formula log10n+1\lfloor \log_{10} n \rfloor + 1 captures this perfectly.

Alternative Method — Verification by Estimation

210=10241032^{10} = 1024 \approx 10^3, so 2100=(210)10(103)10=10302^{100} = (2^{10})^{10} \approx (10^3)^{10} = 10^{30}.

This is a number with 31 digits (the 1 followed by 30 zeros has 31 digits). Our exact calculation confirms this is 31 digits.

Common Mistake

A very common error is forgetting the +1+1 in the formula: students compute log10(2100)=30\lfloor \log_{10}(2^{100}) \rfloor = 30 and declare the answer to be 30 digits. The correct formula is log10n+1\lfloor \log_{10} n \rfloor + 1. Think about it: 103010^{30} itself has 31 digits (a 1 followed by 30 zeros), and log10(1030)=30\lfloor \log_{10}(10^{30}) \rfloor = 30, so the +1+1 is necessary to count correctly.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next