Number Bases & Binary

Amari Cross & Matthew Williams
||7 min read
BinaryNumber BasesNumber Theory

Converting between base 10 and other bases, and binary arithmetic.

Number bases show that place value depends on the system being used. In base 10, each place is a power of 10; in base 2, each place is a power of 2; in base 5, each place is a power of 5.

CSEC questions on bases test careful conversion, not guesswork. Write the place values, expand the number, and then regroup if converting from base 10 to another base. Remember that a digit in a base must be smaller than the base itself.

So far, we've been working in base 10 (the decimal system) because we have 10 fingers. But numbers can be represented in ANY base, and computers use base 2 (binary).

Understanding Place Value in Different Bases

In base 10, we use digits 0-9, and each place value represents a power of 10:

ThousandsHundredsTensOnes
10310^310210^210110^110010^0
1000100101

So the number 2,345 in base 10 means: 234510=2(1000)+3(100)+4(10)+5(1)2345_{10} = 2(1000) + 3(100) + 4(10) + 5(1)

In base 2 (binary), we use only digits 0 and 1, and each place value represents a power of 2:

SixteensEightsFoursTwosOnes
242^4232^3222^2212^1202^0
168421

Converting FROM Binary TO Decimal (Base 2 to Base 10)

This is the table method — write out place values in a table, then add up the values where there's a 1.

Example

Convert 10110210110_2 (binary) to decimal

Step 1: Draw a table with powers of 2

242^4232^3222^2212^1202^0
168421

Step 2: Write the binary digits in the table

242^4232^3222^2212^1202^0
10110
168421

Step 3: For each 1, take that place value. Ignore the 0s.

  • Position 242^4: digit is 1, so count 16
  • Position 232^3: digit is 0, so count 0
  • Position 222^2: digit is 1, so count 4
  • Position 212^1: digit is 1, so count 2
  • Position 202^0: digit is 0, so count 0

Step 4: Add them up 16+0+4+2+0=2216 + 0 + 4 + 2 + 0 = 22

Answer: 101102=221010110_2 = 22_{10}

Example

Convert 11001211001_2 to decimal

242^4232^3222^2212^1202^0
11001
168421

Add the values where digit is 1: 16+8+0+0+1=2516 + 8 + 0 + 0 + 1 = 25

Answer: 110012=251011001_2 = 25_{10}

Converting FROM Decimal TO Binary (Base 10 to Base 2)

Use the repeated division method: Keep dividing by 2 and track remainders.

Example

Convert 22 (decimal) to binary

Step 1: Divide repeatedly by 2, writing down remainders

22 ÷ 2 = 11 remainder 0
11 ÷ 2 = 5  remainder 1
5 ÷ 2 = 2   remainder 1
2 ÷ 2 = 1   remainder 0
1 ÷ 2 = 0   remainder 1

Step 2: Read the remainders from BOTTOM to TOP Remainders from bottom to top: 1,0,1,1,0\text{Remainders from bottom to top: } 1, 0, 1, 1, 0

Answer: 2210=10110222_{10} = 10110_2

Check: Use the table method above to verify — 101102=16+4+2=2210110_2 = 16 + 4 + 2 = 22

Example

Convert 35 to binary

35 ÷ 2 = 17 remainder 1
17 ÷ 2 = 8  remainder 1
8 ÷ 2 = 4   remainder 0
4 ÷ 2 = 2   remainder 0
2 ÷ 2 = 1   remainder 0
1 ÷ 2 = 0   remainder 1

Read remainders from bottom to top: 100011

Answer: 3510=100011235_{10} = 100011_2

Check: 32+2+1=3532 + 2 + 1 = 35

Other Number Bases (Base 8 and Base 16)

While binary (base 2) is most important for computer science, you should know that other bases work the same way.

Base 8 (Octal): Uses digits 0-7, each place is a power of 8

838^3828^2818^1808^0
5126481
Example

Convert 2538253_8 (octal) to decimal

828^2818^1808^0
253
6481

2(64)+5(8)+3(1)=128+40+3=171102(64) + 5(8) + 3(1) = 128 + 40 + 3 = 171_{10}

Answer: 2538=17110253_8 = 171_{10}

Exam Tip

For CSEC: Focus on base 2 (binary), base 8 (octal), and base 10 (decimal). The method is always the same: draw the place value table, put in your digits, and add up using powers of the base.


Properties of Numbers and Operations

Numbers and mathematical operations have special properties that help us solve problems more efficiently.

Closure Property

A set is closed under an operation if performing that operation on numbers in the set always gives you a number also in that set.

Addition: Whole numbers are closed under addition (adding two whole numbers always gives a whole number)

  • 3 + 4 = 7 ✓

Subtraction: Whole numbers are NOT closed under subtraction (2 - 5 = -3, which is not a whole number)

Multiplication: Whole numbers are closed under multiplication

  • 4 × 6 = 24 ✓

Division: Whole numbers are NOT closed under division (5 ÷ 2 = 2.5, which is not a whole number)

Commutative Property

The order doesn't matter — you get the same answer either way.

Addition: a+b=b+aa + b = b + a

  • 3 + 5 = 8 and 5 + 3 = 8 ✓

Multiplication: a×b=b×aa × b = b × a

  • 4 × 7 = 28 and 7 × 4 = 28 ✓

Subtraction: NOT commutative (5 - 3 ≠ 3 - 5)

Division: NOT commutative (8 ÷ 4 ≠ 4 ÷ 8)

Associative Property

When you have multiple operations, you can group them differently and get the same answer.

Addition: (a+b)+c=a+(b+c)(a + b) + c = a + (b + c)

  • (2+3)+4=5+4=9(2 + 3) + 4 = 5 + 4 = 9
  • 2+(3+4)=2+7=92 + (3 + 4) = 2 + 7 = 9

Multiplication: (a×b)×c=a×(b×c)(a × b) × c = a × (b × c)

  • (2×3)×4=6×4=24(2 × 3) × 4 = 6 × 4 = 24
  • 2×(3×4)=2×12=242 × (3 × 4) = 2 × 12 = 24

Subtraction: NOT associative

Division: NOT associative

Distributive Property

Multiplication distributes over addition: a×(b+c)=(a×b)+(a×c)a × (b + c) = (a × b) + (a × c)

Example

Calculate 5×(3+4)5 × (3 + 4) two ways:

Method 1 (do the parentheses first): 5×(3+4)=5×7=355 × (3 + 4) = 5 × 7 = 35

Method 2 (distribute the 5): 5×(3+4)=(5×3)+(5×4)=15+20=355 × (3 + 4) = (5 × 3) + (5 × 4) = 15 + 20 = 35

Both give 35!

Identity Properties

Additive Identity: Adding 0 doesn't change the number. a+0=aa + 0 = a

Multiplicative Identity: Multiplying by 1 doesn't change the number. a×1=aa × 1 = a

Inverse Properties

Additive Inverse: For any number, there's another number that, when added, gives 0. a+(a)=0a + (-a) = 0

  • 5 + (-5) = 0

Multiplicative Inverse: For any non-zero number, there's another number that, when multiplied, gives 1. a×1a=1a × \frac{1}{a} = 1

  • 5×15=15 × \frac{1}{5} = 1