A binary number is a number written in base-2, which uses only the digits 0 and 1. Each position represents a power of 2 (1, 2, 4, 8, 16…), just like decimal uses powers of 10.
Example:
1011₂ = (1×8) + (0×4) + (1×2) + (1×1) = 11₁₀
| Place | 2⁴ | 2³ | 2² | 2¹ | 2⁰ |
|---|---|---|---|---|---|
| Value | 16 | 8 | 4 | 2 | 1 |
Steps:
Convert 19₁₀ to binary
19 ÷ 2 = 9 remainder 1
9 ÷ 2 = 4 remainder 1
4 ÷ 2 = 2 remainder 0
2 ÷ 2 = 1 remainder 0
1 ÷ 2 = 0 remainder 1
Binary = 10011₂
Convert 6₁₀ to binary
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1
Binary = 110₂
Convert 13₁₀ to binary
13 ÷ 2 = 6 remainder 1
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1
v
Binary = 1101₂
Convert 25₁₀ to binary
25 ÷ 2 = 12 remainder 1
12 ÷ 2 = 6 remainder 0
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1
Binary = 11001₂
Convert 9₁₀ to binary
9 ÷ 2 = 4 remainder 1
4 ÷ 2 = 2 remainder 0
2 ÷ 2 = 1 remainder 0
1 ÷ 2 = 0 remainder 1
Binary = 1001₂
Multiply each binary digit by the power of 2 for its position and sum them.
10110₂ to decimal: (1×16) + (0×8) + (1×4) + (1×2) + (0×1) = 16 + 0 + 4 + 2 + 0 = 22₁₀
111₂ to decimal: (1×4) + (1×2) + (1×1) = 4 + 2 + 1 = 7₁₀
1001₂ to decimal: (1×8) + (0×4) + (0×2) + (1×1) = 8 + 0 + 0 + 1 = 9₁₀
1101₂ to decimal: (1×8) + (1×4) + (0×2) + (1×1) = 8 + 4 + 0 + 1 = 13₁₀
1010₂ to decimal: (1×8) + (0×4) + (1×2) + (0×1) = 8 + 0 + 2 + 0 = 10₁₀
Rules: 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1, 1 + 1 = 0 (carry 1 to next column)
11₂ + 10₂ 11 + 10 ------ 01 (carry 1) 11 + carry → 101₂ Decimal check: 3 + 2 = 5
101₂ + 011₂ 101 + 011 ------ 000 (carry 1) 1000₂ Decimal check: 5 + 3 = 8
110₂ + 101₂ 110 + 101 ------ 011 (carry 1) 1011₂ Decimal: 6 + 5 = 11
111₂ + 001₂ 111 + 001 ------ 000 (carry 1) 1000₂ Decimal: 7 + 1 = 8
101₂ + 110₂ 101 + 110 ------ 011 (carry 1) 1011₂ Decimal: 5 + 6 = 11
Rules: 0 − 0 = 0, 1 − 0 = 1, 1 − 1 = 0, 0 − 1 = 1 (borrow from next column)
10₂ − 01₂ 10 - 01 ---- 01₂ Decimal: 2 − 1 = 1
101₂ − 011₂ 101 - 011 ----- 010₂ Decimal: 5 − 3 = 2
111₂ − 101₂ 111 - 101 ------ 010₂ Decimal: 7 − 5 = 2
110₂ − 010₂ 110 - 010 ------ 100₂ Decimal: 6 − 2 = 4
101₂ − 001₂ 101 - 001 ------ 100₂ Decimal: 5 − 1 = 4
Rules: 0 × 0 = 0, 0 × 1 = 0, 1 × 0 = 0, 1 × 1 = 1
11₂ × 10₂ 11 × 10 ---- 00 (11 × 0) 11 (11 × 1, shift left) ---- 110₂ Decimal: 3 × 2 = 6
101₂ × 11₂ 101 × 11 ----- 101 (101 × 1) 101 (101 × 1, shift left) ----- 1111₂ Decimal: 5 × 3 = 15
10₂ × 11₂ 10 × 11 ---- 10 (10 × 1) 10 (10 × 1, shift left) ----- 110₂ Decimal: 2 × 3 = 6
11₂ × 11₂ 11 × 11 ---- 11 11 ---- 1001₂ Decimal: 3 × 3 = 9
101₂ × 10₂ 101 × 10 ---- 00 101 ---- 1010₂ Decimal: 5 × 2 = 10