PYQ Vault

CDS Mathematics · Logarithms

Counting Digits with Logarithms

A number whose common logarithm has integer part k has k + 1 digits before the decimal point.

Why this matters

Ten PYQs, one of them HARD. Take the log of the power, keep the integer part, add one. The mirror-image question — how many zeros after the decimal point in (0.5)¹⁰⁰⁰ — uses the same log and reads it the other way.

Concept 1 of 1: Digits and leading zeros

Every number from 10k10^k up to just below 10k+110^{k+1} has k+1k + 1 digits, and its log lies between kk and k+1k + 1. So the integer part of the log counts the digits, less one.

Definition

  • N≥1N \ge 1: digits =⌊log⁡10N⌋+1= \lfloor\log_{10}N\rfloor + 1.
  • N<1N < 1: if log⁡10N=−m.f\log_{10}N = -m.f (so N=101−0.f×10−(m+1)N = 10^{1 - 0.f} \times 10^{-(m+1)}), the first significant digit is in place m+1m + 1, after mm zeros.
  • Write the base in primes first: 108=22⋅33108 = 2^2 \cdot 3^3, 125100=5300=103002300125^{100} = 5^{300} = \dfrac{10^{300}}{2^{300}}.
  • A number between 100100 and 10001000 has log between 22 and 33; a positive number below 11 has a negative log.

Number of digits

⌊log⁡10N⌋+1\lfloor \log_{10} N \rfloor + 1

Worked example

How many digits has 2502^{50}? (log⁡2=0.301\log 2 = 0.301)
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

CDS · 2017 · CDS (I) 2017 — Elementary Mathematics · Q6Easy

Example 1 · Logarithms · Number of Digits and Characteristic

What is the number of digits in 2402^{40} ? (Given that log⁡102=0.301\log_{10} 2 = 0.301)

Add one

log⁡10240=12.04\log_{10}2^{40} = 12.04, so 2402^{40} has 1313 digits, not 1212. The characteristic is one less than the digit count.

Zeros after the point: use the next power down

log⁡N=−17.47\log N = -17.47 means N=100.53×10−18N = 10^{0.53} \times 10^{-18}: the first significant digit is in the 18th place, after 1717 zeros. Reading −17.47-17.47 as '18 zeros' is the slip.

Summary — formulas & gotchas at a glance

A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.

Formulas (1)

Watch out for (2)

Test yourself on Logarithms

15 past CDS questions from this chapter, timed at 18 minutes and marked the way the exam marks it. You see your score and every answer the moment you finish. Free to start.