NBC 101 • Unit 118 min read★ Very High Exam Frequency
Number Systems & Binary Data Representation (Radix 2, 8, 10, 16)
Unit 1: Computer Evolution, Architecture & Number Systems • Fundamentals of Computer
👨🏫 Professor's Mental Model: The Language of Light Switches
Computer ki har memory cell ek electronic transistor switch hai jo ya toh ON hota hai (1) ya OFF hota hai (0). Jaise hum insaan 10 ungliyon ki wajah se Decimal (0-9) number system use karte hain, waise hi computer switches ki wajah se Binary (0 and 1) use karta hai. Hexadecimal (Base 16) lambe 32-bit binary codes ko chota karke likhne ka shortcut hai!
Interactive Number Systems & Radix Conversion Engine
Interactive visual tools for Radix Conversions, Hex Nibble mapping, and 2's Complement binary subtraction.
(Range: 0 to 65535)
DECIMAL (Base 10)(25)₁₀
BINARY (Base 2)(11001)₂
OCTAL (Base 8)(31)₈
HEXADECIMAL (Base 16)(19)₁₆
Step-by-Step Successive Division Ladder for (25)₁₀ → (11001)₂:
| Step | Division (Value ÷ 2) | Quotient | Remainder (Bit) | Significance |
|---|---|---|---|---|
| Step 1 | 25 ÷ 2 | 12 | 1 | LSB (Least Significant Bit) |
| Step 2 | 12 ÷ 2 | 6 | 0 | - |
| Step 3 | 6 ÷ 2 | 3 | 0 | - |
| Step 4 | 3 ÷ 2 | 1 | 1 | - |
| Step 5 | 1 ÷ 2 | 0 | 1 | MSB (Most Significant Bit) |
Read remainders in reverse order (Bottom to Top: MSB → LSB):(11001)₂
1. Positional Number Systems Overview
Every number system is defined by its Base (or Radix 'r'), which represents the total number of unique symbols used:
1. Decimal (Base 10): Digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
2. Binary (Base 2): Bits 0, 1.
3. Octal (Base 8): Digits 0, 1, 2, 3, 4, 5, 6, 7 (Each octal digit maps to 3 binary bits: 2^3 = 8).
4. Hexadecimal (Base 16): 0-9 and A (10), B (11), C (12), D (13), E (14), F (15) (Each hex digit maps to 4 binary bits / 1 nibble: 2^4 = 16).
2. Step-by-Step Radix Conversion Formulas
A) Decimal to Other Bases (Successive Division / Multiplication Method):
• Integer part: Continuously divide by target base (r) and collect remainders from Bottom to Top (MSB to LSB).
• Fractional part: Continuously multiply fractional part by target base (r) and collect integers from Top to Bottom.
Example: Convert (25.625)10 to Binary:
• 25 / 2 = 12 (rem 1) | 12 / 2 = 6 (rem 0) | 6 / 2 = 3 (rem 0) | 3 / 2 = 1 (rem 1) | 1 / 2 = 0 (rem 1) => (11001)2
• 0.625 * 2 = 1.25 (take 1) | 0.25 * 2 = 0.50 (take 0) | 0.50 * 2 = 1.00 (take 1) => (.101)2
• Result: (25.625)10 = (11001.101)2
B) Other Bases to Decimal (Positional Weight Expansion):
• Value = Sum(Digit * Base^Position)
Example: (1101.1)2 = (1 * 2^3) + (1 * 2^2) + (0 * 2^1) + (1 * 2^0) + (1 * 2^-1) = 8 + 4 + 0 + 1 + 0.5 = (13.5)10
C) Fast Binary <-> Octal and Binary <-> Hexadecimal Shortcut:
• Octal to Binary: Replace each octal digit with its 3-bit binary equivalent (e.g., (75)8 = (111 101)2).
• Hex to Binary: Replace each hex digit with its 4-bit binary nibble (e.g., (A3)16 = (1010 0011)2).
3. 1's Complement & 2's Complement Arithmetic
In digital computers, subtraction is performed using addition via complement arithmetic:
• 1's Complement: Invert every bit (change 0 to 1, and 1 to 0).
Example: 1's complement of (101100)2 is (010011)2.
• 2's Complement: 1's Complement + 1.
Example: (101100)2 -> 1's comp: (010011)2 + 1 = (010100)2.
• Subtraction using 2's Complement (M - N):
1. Take the 2's complement of the subtrahend (N).
2. Add it to the minuend (M).
3. If carry is generated: discard the end-around carry; the result is positive.
4. If no carry is generated: take 2's complement of the answer and add a negative sign.
4-Bit Binary, Octal & Hexadecimal Equivalence Table
| Decimal | 4-Bit Binary | Octal | Hexadecimal |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 2 | 0010 | 2 | 2 |
| 3 | 0011 | 3 | 3 |
| 4 | 0100 | 4 | 4 |
| 5 | 0101 | 5 | 5 |
| 6 | 0110 | 6 | 6 |
| 7 | 0111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
🎯 University Exam Scoring Blueprint
- Solve number system numericals with neat step-by-step division ladders.
- Write the rule for 2's complement subtraction (Carry discarded = Positive result; No carry = Negative 2's complement).
- Remember: Hex digits A to F represent values 10 to 15.
Top Viva Questions on Number Systems & Binary Data Representation (Radix 2, 8, 10, 16)
1