NDA Maths · Binary Numbers
Binary Representation & Number Theory
A small grab-bag the NDA files under Binary Numbers: representing a decimal number in binary (and counting its bits), plus a couple of pure number-theory recall items — modular remainders by cycling, and the sum-of-odd-numbers perfect-square fact.
Why this matters
Three PYQs sit here. One is a direct decimal-to-binary representation; the other two are number-theory one-liners (a remainder-by-cycling and a perfect-square recognition) that happen to be grouped with binary in the syllabus. They reward two reflexes you can memorise: powers repeat in a short cycle modulo a number, and 1 + 3 + 5 + ... + (2n − 1) = n².
Concept 1 of 2
Representing a Number in Binary & Counting Its Bits
Intuition
Definition
A decimal number needs exactly bits in binary when it lies in the range
- A number that is exactly is the smallest -bit number: a 1 followed by zeros.
- A number that is exactly is the largest -bit number: ones.
Bit count of N
Worked example
- Locate between powers of 2: , so it needs bits.
- Convert (greedy powers): .
- Place 1s at positions and 0s elsewhere: .
Practice this conceptself-check · 4 quick reps
Try it yourself
Practice — Level 1 (4 reps)
Quick reps to lock in the method. Try each, then check.
- 1.How many bits to write ?
- 2.How many bits to write ?
- 3.What is the largest number representable in 4 bits?
- 4.Convert to binary.
From the bank · past-year question
[Q3 · Apr · 2023]
Watch the digit COUNT in the options
Concept 2 of 2
Number-Theory One-Liners — Remainder Cycles & Sum of Odd Numbers
Intuition
Definition
Remainder by cycling: the remainders of modulo a fixed number repeat with some period . Find the cycle by computing remainders until they repeat, then reduce the exponent modulo : if the exponent leaves remainder on division by , then has the same remainder as . Sum of the first n odd numbers:
Sum of first n odd numbers
Worked example
- Cycle of : — period .
- Reduce the exponent: , so .
- From the cycle, .
Practice this conceptself-check · 4 quick reps
Try it yourself
Practice — Level 1 (4 reps)
Quick reps to lock in the method. Try each, then check.
- 1.Sum of the first 10 odd numbers?
- 2.: how many terms?
- 3.Remainder of divided by 3?
- 4.Remainder of divided by 5?
From the bank · past-year question
[Q9 · Sep · 2025]
Reduce the exponent by the CYCLE length, not the modulus
Sum of odd numbers is a PERFECT SQUARE
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 (2)
- Representing a Number in Binary & Counting Its Bits
Bit count of N
- Number-Theory One-Liners — Remainder Cycles & Sum of Odd Numbers
Sum of first n odd numbers
Watch out for (3)
- Watch the digit COUNT in the options→ Representing a Number in Binary & Counting Its Bits
- Reduce the exponent by the CYCLE length, not the modulus→ Number-Theory One-Liners — Remainder Cycles & Sum of Odd Numbers
- Sum of odd numbers is a PERFECT SQUARE→ Number-Theory One-Liners — Remainder Cycles & Sum of Odd Numbers
Mastery check — 1 interleaved questions
Try each one before clicking. Questions are interleaved across the concepts above, not grouped — interleaving sharpens transfer.
[Q6 · Sep · 2025]
Drill every past-year question on this subtopic
3 questions from the bank — paginated, with cart and Word-export support.