Logarithm Rules for Placement Aptitude Tests
Master the core rules of logarithms that appear in TCS NQT, Infosys, and Wipro aptitude tests, with worked examples and property shortcuts.
Logarithm questions appear in TCS NQT, Infosys, and Wipro placement aptitude sections, and every variant you will encounter traces back to six base rules.
What a Logarithm Is
The formal definition: if a^x = N, then log_a(N) = x. Read as “log of N to the base a equals x.” The base a is a positive number other than 1, and N is positive. Translating that to plain English: to what power must a be raised to get N? That question is how to approach every log problem in a placement test.
A concrete example: 4^3 = 64, so log_4(64) = 3. The base is 4, the result is 64, the exponent is 3. Placement questions flip any one of those three quantities and ask you to find it.
Wikipedia’s logarithm article covers the full formal derivation. For placement purposes, the definition above and the six rules below are all that is needed.
Two notational points that save time in placement tests: when no base is written, assume base 10. When you see ln, the base is e (approximately 2.718), and that notation appears in calculus or data science, not in standard placement aptitude.
Common Logarithm and Natural Logarithm
- Common logarithm uses base 10. Default notation:
log(N)without a subscript.log(100) = 2because10^2 = 100. - Natural logarithm uses base
e(approximately 2.718). Notation:ln(N). Rarely tested in placement aptitude; appears in probability and advanced maths contexts.
Characteristic and Mantissa
For any log_10(N), the result splits into two parts:
- Characteristic = the integer part (the part to the left of the decimal point)
- Mantissa = the decimal part (always non-negative, always less than 1)
The digit-count rule follows directly:
Number of digits in a positive integer N = characteristic of
log_10(N)+ 1
Example: log_10(5000) = log_10(5) + log_10(1000) = 0.699 + 3 = 3.699. Characteristic = 3. Digits = 3 + 1 = 4. Correct: 5000 has four digits.
Khan Academy’s introduction to logarithms provides interactive exercises on this and on the rules below.
The Six Core Logarithm Rules
All six rules derive from the definition a^x = N implies log_a(N) = x. Each one can be re-derived in under a minute if you forget it during an exam.
| Rule | Formula | Quick check |
|---|---|---|
| Identity | log_a(a) = 1 | log_5(5) = 1 because 5^1 = 5 |
| Zero | log_a(1) = 0 | log_7(1) = 0 because 7^0 = 1 |
| Product | log_a(m*n) = log_a(m) + log_a(n) | log(50) + log(2) = log(100) = 2 |
| Quotient | log_a(m/n) = log_a(m) - log_a(n) | log_5(625) - log_5(25) = log_5(25) = 2 |
| Power | log_a(m^p) = p * log_a(m) | log_2(32) = log_2(2^5) = 5 |
| Change of base | log_a(m) = log_b(m) / log_b(a) | log_4(8) = log_2(8) / log_2(4) = 3/2 |
A useful corollary of change of base: log_a(b) = 1 / log_b(a). This appears in questions that chain two logarithms and ask for their product.
Counting Digits with Logarithms
The digit-counting question is the most predictable log question in placement aptitude. The method is always the same:
- Step 1: Express the number as a power, e.g.,
2^10. - Step 2: Apply the power rule:
log_10(2^10) = 10 * log_10(2) = 10 * 0.301 = 3.01. - Step 3: Digits =
floor(3.01) + 1 = 3 + 1 = 4. - Step 4 (verify):
2^10 = 1024, which has 4 digits. Correct.
Three anchor values to memorise: log_10(2) = 0.301, log_10(3) = 0.477, log_10(7) = 0.845. Every digit-counting placement question is built around these or around clean powers of 10, 5, or 2.
Note: log_10(5) derives from the anchor values without any additional memorisation: log_10(5) = log_10(10/2) = 1 - 0.301 = 0.699. This covers digit-counting for powers of 5 without adding a fourth value to memorise.
Two more worked examples:
-
Digits in
2^20:log_10(2^20) = 20 * 0.301 = 6.02- Digits =
floor(6.02) + 1 = 7 - Verify:
2^20 = 1,048,576(7 digits). Correct.
-
Digits in
3^10:log_10(3^10) = 10 * 0.477 = 4.77- Digits =
floor(4.77) + 1 = 5 - Verify:
3^10 = 59049(5 digits). Correct.
-
Digits in
5^15:log_10(5^15) = 15 * log_10(5) = 15 * 0.699 = 10.485- Digits =
floor(10.485) + 1 = 11 - Verify:
5^15 = 30,517,578,125(11 digits). Correct.
Logarithm Questions in Placement Aptitude
TCS NQT, Infosys Aptitude Online, and Wipro NLTH all include logarithm problems in their quantitative reasoning sections. Three question types cover the full range.
Type 1: Evaluate the Expression
Find the value directly by converting to exponential form.
- Example: Find
log_8(64). - Method: To what power must 8 be raised to get 64?
8^2 = 64, solog_8(64) = 2. Verify:8 * 8 = 64. Correct.
Type 2: Simplify Using Rules
Apply one or more of the six rules to collapse the expression to a single number.
-
Example: Find the value of
log(50) + log(2). -
Method: Product rule.
log(50 * 2) = log(100) = 2. Verify:10^2 = 100. Correct. -
Example: Find
log_5(625) - log_5(25). -
Method: Quotient rule.
log_5(625 / 25) = log_5(25) = log_5(5^2) = 2. Verify:625 / 25 = 25and5^2 = 25. Correct.
Type 3: Digit Counting
Already covered in the previous section. The one variation to watch for: some questions give log_10(2) = 0.301 as a stated given, and some expect you to recall it. A less common variant asks about a product of two powers: how many digits does 2^10 * 5^10 have? The trick is recognising that 2^10 * 5^10 = (2 * 5)^10 = 10^10, so log_10(10^10) = 10 and digits = 11. Combined-exponent forms of this type appear in both Infosys and TCS NQT.
Logarithms sit in the same quantitative cluster as calendar problems and clock problems: a small rule set, memorised cold, solves the entire category. The arithmetic that follows the log step benefits from the same quick number tricks that help in other quantitative sections.
From Digit Counts to Language Model Perplexity
The power rule that counts digits in 2^10 is the same algebra that defines perplexity in language model evaluation. When a model assigns a per-token log-probability of log_2(1/1024) = -10 bits, its perplexity is 2^10 = 1024. That number measures how surprised the model is by real text. Lower perplexity, better predictions. The arithmetic is identical to the digit-counting method in the previous section.
Shannon entropy (the mathematical measure of information), cross-entropy loss (the training objective for every language model), and the log-probability scores an API returns all run on the product, power, and change-of-base rules in the table above.
TinkerLLM gives you direct access to LLM API calls for ₹299. The model responses include log-probability scores for each token. Reading those scores and understanding what a log-probability of -3.2 means in terms of model confidence is the same numerical literacy this article builds. The six-rule foundation you practised for placement aptitude is the same one that shows up in every model evaluation report.
Primary sources
Frequently asked questions
What is the difference between log and ln?
log (common logarithm) uses base 10 and is the default in Indian placement tests when no base is written. ln (natural logarithm) uses base e approximately 2.718 and appears in calculus and data science contexts. In aptitude tests, treat an unspecified log as base 10.
How do logarithm questions appear in TCS NQT?
TCS NQT Numerical Ability includes three types of log questions: finding the value of a log expression, simplifying an expression using rules (product, quotient, power), and using the characteristic to count digits in a large power like 2^20 or 3^10.
What is characteristic and mantissa in logarithms?
For log base 10 of N: the characteristic is the integer part and the mantissa is the decimal part. For a positive integer N with d digits, the characteristic equals d minus 1. For example, log_10(5000) is approximately 3.699, so characteristic = 3 and digits = 3 + 1 = 4.
How do I find the value of a log without a calculator in placement tests?
Memorise three anchor values: log_10(2) is approximately 0.301, log_10(3) is approximately 0.477, and log_10(7) is approximately 0.845. Most placement questions are constructed around these or around clean powers of 2, 3, 5, and 10 where you can apply the rules directly.
How do I find the number of digits in a large power like 2^20?
Use the formula: digits = floor(log_10(N)) + 1. For 2^20: log_10(2^20) = 20 times 0.301 = 6.02, so digits = floor(6.02) + 1 = 7. Verify: 2^20 = 1,048,576, which has 7 digits.
What is the change of base formula and when is it used in placement tests?
Change of base: log_a(m) = log_b(m) divided by log_b(a), where b is any convenient base. In placement tests, use it to convert an unusual base such as log_4 or log_8 into base 2 or base 10 where you already know the anchor values.
A self-paced playground for building with LLMs.
TinkerLLM is FACE Prep's sister property. A guided environment for shipping real LLM applications, the kind of project that earns a paragraph on your resume, not a line.
Try TinkerLLM (₹299 launch)