JEST /Quantitative Aptitude

Number system

Arithmetic · free study notes

📚 Quantitative Aptitude – Number System

Target Audience: IIT‑JEE / other competitive exams
Program: JEST (JavaScript testing framework) – the notes are written in a style that can be used to create automated tests for the concepts discussed.

Table of Contents

  1. Basics of Positional Notation
  2. Decimal ↔︎ Binary ↔︎ Octal ↔︎ Hexadecimal
  3. Conversions Between Arbitrary Bases
  4. Arithmetic in Base‑b
  5. Divisibility & Trailing Zeros
  6. Negative Numbers & Two’s Complement
  7. Fractions & Repeating Patterns
  8. Bitwise Operations (JEST‑friendly)
  9. Important Formulae & Tricks
  10. Hard Practice Question + Solution

1. Basics of Positional Notation <a name="1"></a>

Symbol Meaning Example (Base 10)
b Base (radix) 10
dₙdₙ₋₁ … d₁d₀ Representation of an integer 1234
b⁰, b¹, …, bⁿ Place values 1, 10, 100, 1000

Decimal value of a base‑b number
[ N = \sum_{k=0}^{n} d_k , b^k ] where d_k ∈ {0, 1, …, b‑1}.

Length of representation
[ \operatorname{len}_b(N) = \left\lfloor\log_b N\right\rfloor + 1 ]

Trick: In any base b, the digit b is not allowed; it becomes 10 (carry‑over).


2. Decimal ↔︎ Binary ↔︎ Octal ↔︎ Hexadecimal <a name="2"></a>

Base Grouping in Decimal Typical use
2 1 bit Machine level
8 3 bits Unix file perms
10 1 digit Everyday
16 4 bits Memory addresses

2.1 Decimal → Binary (Repeated Division)

  1. Divide by 2.
  2. Record remainder (0 or 1).
  3. Repeat with quotient until 0.
  4. Remainders read bottom‑to‑top.

Example: 13 → 1101₂

2.2 Binary → Decimal (Place Value)

[ 13 = 1\cdot 2^3 + 1\cdot 2^2 + 0\cdot 2^1 + 1\cdot 2^0 = 8+4+0+1 ]

2.3 Binary ↔︎ Octal / Hex

  • Binary → Octal: Group bits in 3 from right.
    If leftmost group has <3 bits, pad with 0s.
    Example: 110110 → 110 110 → 6 6 → 66₈.

  • Binary → Hex: Group bits in 4.
    Example: 11110010 → 1111 0010 → F 2 → F2₁₆.

  • Octal / Hex → Binary: Reverse process.


3. Conversions Between Arbitrary Bases <a name="3"></a>

3.1 Decimal → Base‑b

Repeat division by b (as in 2.1).
Time complexity: O(log_b N).

3.2 Base‑b → Decimal

Use place value sum.
Example: `

Your note

Page 1

Doubt hai is topic me?

Free AI teacher se poocho — 24/7, step by step.