NBC 101 • Unit 118 min readVery High Exam Frequency

Number Systems & Binary Data Representation (Radix 2, 8, 10, 16)

Unit 1: Computer Evolution, Architecture & Number SystemsFundamentals 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.

NEP 2020 Standard Lab Tool
(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)₂:

StepDivision (Value ÷ 2)QuotientRemainder (Bit)Significance
Step 125 ÷ 2121LSB (Least Significant Bit)
Step 212 ÷ 260-
Step 36 ÷ 230-
Step 43 ÷ 211-
Step 51 ÷ 201MSB (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
Decimal4-Bit BinaryOctalHexadecimal
0000000
1000111
2001022
3001133
4010044
5010155
6011066
7011177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F

🎯 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 Questions
1

Why do modern computers use 2's Complement representation for negative numbers rather than sign-magnitude?