Mathwords logoMathwords

Converting Number Bases — Definition, Formula & Examples

Converting number bases means rewriting a number from one base (like base 10) into another base (like base 2 or base 16) so that both representations have the same value.

A number base (or radix) bb determines how many distinct digits are used and the place value of each position. Converting from base b1b_1 to base b2b_2 requires expressing the quantity using powers of b2b_2 instead of powers of b1b_1, while preserving the number's value.

How It Works

Every number base uses place values that are powers of the base. In base 10, the places are 100=110^0 = 1, 101=1010^1 = 10, 102=10010^2 = 100, and so on. In base 2 (binary), the places are 20=12^0 = 1, 21=22^1 = 2, 22=42^2 = 4, 23=82^3 = 8, etc. To convert from base 10 to another base, repeatedly divide by the new base and collect the remainders. To convert from another base to base 10, multiply each digit by its place value and add the results together.

Worked Example

Problem: Convert the decimal number 45 to base 2 (binary).
Step 1: Divide 45 by 2. Record the quotient and remainder.
45÷2=22 remainder 145 \div 2 = 22 \text{ remainder } 1
Step 2: Keep dividing the quotient by 2, recording each remainder.
22÷2=11 R 0,11÷2=5 R 1,5÷2=2 R 1,2÷2=1 R 0,1÷2=0 R 122 \div 2 = 11 \text{ R } 0,\quad 11 \div 2 = 5 \text{ R } 1,\quad 5 \div 2 = 2 \text{ R } 1,\quad 2 \div 2 = 1 \text{ R } 0,\quad 1 \div 2 = 0 \text{ R } 1
Step 3: Read the remainders from bottom to top to form the binary number.
4510=101101245_{10} = 101101_2
Answer: 4545 in base 10 equals 101101101101 in base 2. You can verify: 1(32)+0(16)+1(8)+1(4)+0(2)+1(1)=451(32) + 0(16) + 1(8) + 1(4) + 0(2) + 1(1) = 45.

Why It Matters

Computers store all data in binary (base 2), so understanding base conversion is essential in computer science courses. Programmers also use hexadecimal (base 16) as a compact way to represent binary data, such as color codes in web design.

Common Mistakes

Mistake: Reading the remainders in the wrong order (top to bottom instead of bottom to top).
Correction: The first remainder you find is the ones digit (rightmost). Always read remainders from the last division to the first to get the correct digit order.