Digital Electronics

Number System Conversions; Binary Arithmetic

C-CAT

Number System Conversions

4.1 Any Base → Decimal

Multiply each digit by its place value (power of base) and sum.

Example 1: (11010)₂ → Decimal

[ = 1 \times 2^4 + 1 \times 2^3 + 0 \times 2^2 + 1 \times 2^1 + 0 \times 2^0 = 16 + 8 + 0 + 2 + 0 = 26 ]

Example 2: (264)₈ → Decimal

[ = 2 \times 8^2 + 6 \times 8^1 + 4 \times 8^0 = 128 + 48 + 4 = 180 ]

Example 3: (3A)₁₆ → Decimal (A = 10)

[ = 3 \times 16^1 + 10 \times 16^0 = 48 + 10 = 58 ]

Example 4: (2142)₅ → Decimal

[ = 2 \times 5^3 + 1 \times 5^2 + 4 \times 5^1 + 2 \times 5^0 = 250 + 25 + 20 + 2 = 297 ]

4.2 Decimal → Any Base

Method: Repeated division by target base; remainders (read bottom-up) form the result.

Example: (48)₁₀ → Binary

48 ÷ 2 = 24 rem 0 ↑
24 ÷ 2 = 12 rem 0 |
12 ÷ 2 = 6 rem 0 | Read upward
6 ÷ 2 = 3 rem 0 |
3 ÷ 2 = 1 rem 1 |
1 ÷ 2 = 0 rem 1 ↓

Answer: (110000)₂

Example: (824)₁₀ → Octal — divide by 8 Example: (528)₁₀ → Hex — divide by 16

4.3 Base A → Base B (neither is 10)

Two-step method:

  1. Convert source base → Decimal
  2. Convert Decimal → target base

Example: (423)₆ → Base 4

Step 1: (423)₆ = 4×36 + 2×6 + 3 = 144 + 12 + 3 = 159₁₀ Step 2: 159 ÷ 4 → (2133)₄

4.4 Binary ↔ Octal

Group binary in sets of 3 from right (pad left with zeros).

BinaryOctal
0000
0011
0102
0113
1004
1015
1106
1117

Example: (1101010)₂ → Octal Group: 001 | 101 | 010 → 152₈

4.5 Binary ↔ Hexadecimal

Group binary in sets of 4 from right.

BinaryHex
00000
1010A
1011B
1100C
1101D
1110E
1111F

Example: (CCB8)₁₆ → Binary C=1100, C=1100, B=1011, 8=1000 → 1100110010111000₂

4.6 Fractional Conversions

Binary fraction → Decimal: Use negative powers of 2.

(110.101)₂ = 1×4 + 1×2 + 0×1 + 1×0.5 + 0×0.25 + 1×0.125 = 6.625

Decimal fraction → Binary: Multiply fractional part by 2 repeatedly; collect integer parts.

(4.7)₁₀ → Binary:

  • 0.7 × 2 = 1.4 → 1
  • 0.4 × 2 = 0.8 → 0
  • 0.8 × 2 = 1.6 → 1
  • ... → (100.1011...)₂ (may not terminate)

Binary Arithmetic

5.1 Binary Addition Rules

ABSumCarry
0000
0110
1010
1101

Example:

 1 1 1 (carries)
 1 0 1
 + 1 1 1
 -------
 1 1 0 0

5.2 Binary Subtraction

ABDiffBorrow
0000
0111
1010
1100

Alternative: Use 2's complement addition for subtraction (standard in computers).

5.3 Binary Multiplication

Same as decimal — multiply each bit of multiplier, shift partial products, add.

 1 0 1 1 (11)
 × 1 0 1 (5)
 ---------
 1 0 1 1
 0 0 0 0
 1 0 1 1
 ---------
 1 1 0 1 1 1 (55)

5.4 Binary Division

Same long-division algorithm as decimal.

Example: 100001 ÷ 110 = 110 with remainder 11

Continue learning

Related notes

Put this topic into timed practice

Open mock tests when you want full-exam pacing, or keep drilling in practice mode.