Established 2026  ·  Free Educational Resources for All

Mathematics · Number Systems & Place Value

Number Base Systems: Binary, Base 5, Base 7, Octal & Decimal

Learn how counting works in base 2, 5, 7, 8, 10 and 16: convert in both directions, add, subtract and multiply in other bases, find an unknown base, and read the careful history of our own number system and zero.

EDUSAMBAM Editorial Team|21 min read|Last updated: November 2026|Mathematics
🔊 LISTEN TO THIS ARTICLE
SAVE YOUR EYES • IMPROVE YOUR LISTENING
Listen to the article instead of relying only on continuous screen reading.
Ready to read the article.

Every number you write rests on a hidden choice: how many different digits you allow before you must carry into a new column. That choice is the base. We count in base 10, computers store everything in base 2, and some file codes use base 8. The quantities never change, only the way we write them. This guide teaches you to read and write numbers in any base, to convert between bases in both directions, to add, subtract and multiply in other bases, and to find an unknown base. It also tells the history of our own number system carefully, separating what is well established from what historians still debate.

1.What Is a Number Base?

The base (also called the radix) of a number system is the number of different digits it uses, and also the amount by which each column is worth more than the column on its right. In base 10 there are ten digits, 0 to 9, and the columns are worth 1, 10, 100, 1000 and so on. These are the powers of 10: 10⁰, 10¹, 10², 10³.

In any base b, the columns from the right are worth b⁰ = 1, b¹, b², b³ and so on. The digits allowed are 0 up to b − 1. When a column would reach the value b, you write 0 in it and carry 1 to the next column on the left, exactly as you do when 9 + 1 becomes 10 in decimal.

BaseNameDigits allowedColumn values (right to left)
2Binary0, 11, 2, 4, 8, 16, 32 …
5Quinary0 to 41, 5, 25, 125 …
7Septenary0 to 61, 7, 49, 343 …
8Octal0 to 71, 8, 64, 512 …
10Decimal0 to 91, 10, 100, 1000 …
16Hexadecimal0 to 9, then A to F1, 16, 256, 4096 …

To show the base, we write it as a small number after the answer, called a subscript. So 101₂ is a binary number (it equals 5) while 101₁₀ is one hundred and one. If the base is not written, assume base 10. Hexadecimal needs six extra symbols for the values ten to fifteen: A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15.

2.Counting in Other Bases

The best way to feel a base is to count in it. Notice what happens at the base itself: in base 5, the number after 4 is 10 (read “one zero”, meaning one five and no ones), and in binary the number after 1 is 10 (one two and no ones).

DecimalBinary (2)Base 5Base 7Octal (8)
00000
11111
210222
311333
4100444
51011055
61101166
711112107
81000131110
91001141211
101010201312
111011211413
121100221514
131101231615
141110242016
151111302117
1610000312220
1710001322321
1810010332422
1910011342523
2010100402624

Look at the row for 8. In octal it is 10, the first number that needs two digits, and in base 7 the number 7 is also written 10. Every base writes its own base as 10.

Carrying in base 5 In base 5 the number 44 is the last two-digit number. Adding 1 makes the units digit reach 5, which becomes 0 with a carry of 1. The carry makes the next digit 5, which again becomes 0 with a carry, giving 100 in base 5. This is 25 in decimal. Counting up in base 5: 44₅ + 1044= 244 + 1 = 5, so write 0 and carry 14 + 1 (carry) = 5, so write 0 and carry 1100= 25
Figure 1. Carrying in base 5. The units digit 4 + 1 reaches 5, so it becomes 0 and carries 1. The next digit does the same.
“381 is a valid octal number.”

Check each digit against the base.

The fix: octal uses only the digits 0 to 7. The digit 8 does not exist in base 8, just as base 10 has no single digit for “ten”. So 381 cannot be an octal number. In any base b, every digit must be smaller than b.

3.Converting Any Base to Decimal

Multiply each digit by the value of its column, then add. This is called the expansion method, and it works for every base.

Place values in binary 1101 Four boxes for the binary number 1101. The place values are 8, 4, 2 and 1. The digits 1, 1, 0 and 1 give 8 plus 4 plus 0 plus 1, which is 13 in decimal. 2³place value 818×1 = 82²place value 414×1 = 42¹place value 202×0 = 02⁰place value 111×1 = 18 + 4 + 0 + 1 = 13So 1101₂ = 13 in decimal
Figure 2. Binary 1101 expanded. A digit 1 switches its column value on and a digit 0 switches it off.
Example 1 · Four bases to decimal

(a) 1101₂ = (1×8) + (1×4) + (0×2) + (1×1) = 8 + 4 + 0 + 1 = 13.

(b) 132₅ = (1×25) + (3×5) + (2×1) = 25 + 15 + 2 = 42.

(c) 245₇ = (2×49) + (4×7) + (5×1) = 98 + 28 + 5 = 131.

(d) 157₈ = (1×64) + (5×8) + (7×1) = 64 + 40 + 7 = 111.

Example 2 · A hexadecimal number

2F₁₆ = (2×16) + (15×1) = 32 + 15 = 47. And FF₁₆ = (15×16) + 15 = 240 + 15 = 255, the biggest value that fits in 8 binary digits.

“Binary 101 is one hundred and one.”

Binary digits look like decimal digits, but the columns are different.

The fix: 101₂ = (1×4) + (0×2) + (1×1) = 5. Always expand with the powers of the base you are given. Say “one zero one”, not “one hundred and one”.

4.Converting Decimal to Another Base

Method A: repeated division

Divide the number by the new base. Write down the quotient and the remainder. Divide the quotient again, and keep going until the quotient is 0. Then read the remainders from the bottom to the top.

Repeated division of 25 by 2 Five division steps. 25 divided by 2 is 12 remainder 1. 12 divided by 2 is 6 remainder 0. 6 divided by 2 is 3 remainder 0. 3 divided by 2 is 1 remainder 1. 1 divided by 2 is 0 remainder 1. Reading the remainders from the bottom up gives 11001. DivisionRemainder25 ÷ 2 = 12112 ÷ 2 = 606 ÷ 2 = 303 ÷ 2 = 111 ÷ 2 = 01readupBottom to top: 1 1 0 0 125 = 11001₂
Figure 3. Converting 25 to binary. The last remainder becomes the first digit.
Example 3 · Repeated division

(a) Write 100 in base 5. 100 ÷ 5 = 20 remainder 0; 20 ÷ 5 = 4 remainder 0; 4 ÷ 5 = 0 remainder 4. Reading upwards: 400₅. Check: 4 × 25 = 100.

(b) Write 200 in base 7. 200 ÷ 7 = 28 remainder 4; 28 ÷ 7 = 4 remainder 0; 4 ÷ 7 = 0 remainder 4. Reading upwards: 404₇. Check: 4×49 + 0×7 + 4 = 196 + 4 = 200.

(c) Write 255 in octal. 255 ÷ 8 = 31 remainder 7; 31 ÷ 8 = 3 remainder 7; 3 ÷ 8 = 0 remainder 3. Reading upwards: 377₈.

Method B: subtract the largest column values

This method is quicker when the base is 2. List the column values, then take away the largest one that fits, put a 1 in that column, and continue with what is left.

Example 4 · Subtracting column values

Write 100 in binary. The columns are 64, 32, 16, 8, 4, 2, 1. The largest that fits is 64, leaving 36. Then 32 fits, leaving 4. Then 16 and 8 do not fit, 4 fits, leaving 0. So the digits are 64:1, 32:1, 16:0, 8:0, 4:1, 2:0, 1:0, giving 1100100₂.

“25 in binary is 10011 (remainders read from the top).”

The remainders come out in the wrong order.

The fix: the first remainder is the units digit, so it belongs on the right, and the last remainder belongs on the left. For 25, the remainders from top to bottom are 1, 0, 0, 1, 1. Reading them upwards gives 11001. Reading downwards gives 10011, which is 19, not 25. Check: 16 + 8 + 1 = 25.

5.Converting Between Two Non-Decimal Bases

The safe route goes through decimal: change to base 10 first, then to the new base.

Example 5 · Base 5 to base 7

Convert 213₅ to base 7. First, 213₅ = (2×25) + (1×5) + 3 = 50 + 5 + 3 = 58. Now 58 ÷ 7 = 8 remainder 2; 8 ÷ 7 = 1 remainder 1; 1 ÷ 7 = 0 remainder 1. Reading upwards: 112₇. Check: 49 + 7 + 2 = 58.

The binary and octal shortcut

Because 8 = 2³, three binary digits make exactly one octal digit. Split a binary number into groups of three, starting from the right, adding zeros on the left if needed. Then convert each group separately.

Grouping binary digits in threes to write octal The binary number 1101011 is padded to 001101011 and split into three groups of three digits: 001, 101 and 011. These are 1, 5 and 3 in octal, so 1101011 in binary equals 153 in octal, which is 107 in decimal. 1101011₂ → pad on the left → 001 101 011001110150113Octal answer: 153₈Check: 64 + 40 + 3 = 107 = 1101011₂
Figure 4. Binary 1101011 grouped in threes. Each group becomes one octal digit.
Example 6 · Binary to octal and back

(a) 1101011₂ becomes 001 101 011, so the octal number is 153₈. Check: 64 + 40 + 3 = 107 and 64 + 32 + 8 + 2 + 1 = 107.

(b) Write 45 in binary using octal. 45 ÷ 8 = 5 remainder 5, so 45 = 55₈. Replace each 5 by its binary group 101, giving 101101₂. Check: 32 + 8 + 4 + 1 = 45.

In the same way, groups of four binary digits make one hexadecimal digit, since 16 = 2⁴. This is why programmers like hexadecimal for long binary numbers.

6.Arithmetic in Other Bases

The methods of column addition, subtraction and multiplication are exactly the same. The only change is where you carry: in base b you carry when a column total reaches b.

Example 7 · Adding and subtracting

(a) Binary: 1011₂ + 110₂. Units: 1 + 0 = 1. Next: 1 + 1 = 2, which is 10 in binary, so write 0 and carry 1. Next: 0 + 1 + 1 (carry) = 2, so write 0 and carry 1. Next: 1 + 1 (carry) = 2, so write 0 and carry 1, giving a final 1. The answer is 10001₂. Check: 11 + 6 = 17 = 16 + 1.

(b) Base 5: 243₅ + 124₅. Units: 3 + 4 = 7 = 1×5 + 2, so write 2 and carry 1. Next: 4 + 2 + 1 = 7, so write 2 and carry 1. Next: 2 + 1 + 1 = 4. The answer is 422₅. Check: 73 + 39 = 112 = 4×25 + 2×5 + 2.

(c) Base 7: 56₇ + 34₇. Units: 6 + 4 = 10 = 1×7 + 3, so write 3 and carry 1. Next: 5 + 3 + 1 = 9 = 1×7 + 2, so write 2 and carry 1. Final digit 1. The answer is 123₇. Check: 41 + 25 = 66 = 49 + 14 + 3.

(d) Subtraction: 1101₂ − 101₂ = 1000₂, because 13 − 5 = 8.

Example 8 · Multiplying in binary

101₂ × 11₂. Multiply by 1 in the units place: 101. Multiply by 1 in the twos place, which shifts one place left: 1010. Add: 101 + 1010 = 1111₂. Check: 5 × 3 = 15.

Multiplying in binary only ever copies the number or shifts it left. That is why binary is so simple for electronic circuits.

7.Finding an Unknown Base

When the base is the unknown, treat it like a letter b and write the expansion.

Example 9 · Which base?

(a) The number 23 in base b equals 17 in decimal. Then 2b + 3 = 17, so 2b = 14 and b = 7. (The digit 3 is smaller than 7, so the base is allowed.)

(b) 31 in base b equals 16. Then 3b + 1 = 16, so 3b = 15 and b = 5.

(c) 100 in base b equals 49. Then b² = 49, so b = 7. We reject b = −7, because a base must be positive.

(d) 42 in base b equals 26. Then 4b + 2 = 26, so b = 6. Always check that every digit is smaller than your answer: 4 and 2 are both smaller than 6.

8.Where Different Bases Are Used

9.The History of Our Number System

Historians agree on the broad story, but some details are uncertain, so this section says so where that is the case.

Where base 10 comes from. The ten digits of our system are called the Hindu-Arabic numerals. The idea of a place-value system with a symbol for zero was developed in India, over several centuries. Brahmi numerals, used in India from about the 3rd century BCE, were an early ancestor of our digits, although they were not yet a place-value system. The usual explanation for counting in tens is that people have ten fingers, which is likely but cannot be proved.

Zero as a placeholder. Babylonian scribes, working in base 60, began to use a mark to show an empty column in the last few centuries BCE, so that numbers were not misread. The Maya, independently, had a zero symbol in their calendar counts. In these cases zero marked an empty place, but it was not yet a number used in calculation.

Zero as a number. The Indian mathematician Brahmagupta, in his book Brahmasphutasiddhanta of 628 CE, wrote rules for adding, subtracting and multiplying with zero and with negative numbers. His rules for dividing by zero were not correct by today’s standards, but he is rightly famous for treating zero as a number.

Did You Know?

The Bakhshali manuscript is an ancient Indian text written on birch bark that uses a dot as a placeholder. In 2017, radiocarbon dating at the University of Oxford suggested that its oldest pages were much older than scholars had thought, possibly from about the 3rd or 4th century CE. Experts still debate what this means for the history of zero.

Travel to the Islamic world and Europe. The Persian scholar Muhammad ibn Musa al-Khwarizmi worked in Baghdad in the early 9th century CE and wrote about calculating with the Indian numerals. His name is the source of the English word algorithm. The Italian merchant-mathematician Leonardo of Pisa, called Fibonacci, learned the system while living in North Africa and explained it to European readers in his book Liber Abaci in 1202. It took several more centuries for it to replace Roman numerals in everyday use. The word zero comes from the Arabic sifr (“empty”) through Italian, and the same Arabic word is the source of the English word cipher.

Binary. The German scholar Gottfried Leibniz published a clear account of binary arithmetic in 1703. Binary became the basis of electronic computers in the 20th century.

Did You Know?

The ancient Babylonians used base 60. Many historians link this to our 60 minutes in an hour and 360 degrees in a circle, which reached us through later Greek astronomers. The Maya counted in twenties. Some peoples have used base 5 or base 20, perhaps because we have five fingers on a hand and twenty fingers and toes in all.

Try It Yourself

Base Converter

Type a decimal number, or tap a number below. You see it in five bases at once, and the repeated-division steps for the base you choose.

Check Your Work

Base-to-Decimal Checker

Type a number and its base. The checker tells you whether every digit is allowed, then shows the expansion and the decimal value. In bases above 10 use the letters A to F.

10.Common Mistakes

“In base 5, 243 + 124 = 367.”

The digits 6 and 7 do not exist in base 5.

The fix: that is a decimal sum. In base 5, carry whenever a column reaches 5: 3 + 4 = 7 = 1×5 + 2, so write 2 and carry 1, and so on, giving 422₅. Any answer written in base 5 must contain only the digits 0 to 4.

Practice Arena

Convert It

Tap the correct answer for each question. Your best score is saved on this device.

Question 1 of 8 · Best score: 0 / 8

11.Try It Yourself

  1. Convert 1010₂ to decimal and 34₅ to binary.
  2. Write 45 in octal and in binary.
  3. Find the base b if 100 in base b is equal to 36 in decimal.
Show answers

1. 1010₂ = 8 + 0 + 2 + 0 = 10. 34₅ = 3×5 + 4 = 19, and 19 = 16 + 2 + 1, so 10011₂.

2. 45 ÷ 8 = 5 remainder 5, so 55₈. In binary, 5 = 101, so 101101₂ (check: 32 + 8 + 4 + 1 = 45).

3. b² = 36, so b = 6.

12.Exam-Style Questions

  1. [2 marks] Write 2101₃ as a decimal number.
  2. [3 marks] Write 100 in base 6, and show a check.
  3. [3 marks] Work out 1011₂ + 11₂, giving your answer in binary.
  4. [3 marks] Write 45 as (a) an octal number and (b) a binary number.
  5. [3 marks] Work out 1001₂ × 11₂ in binary and check your answer in decimal.
  6. [3 marks] 101 in base b equals 26 in decimal. Find b.
  7. [4 marks] (a) Write 255 in octal. (b) Write 205₈ in decimal. (c) Explain why 3 binary digits correspond to 1 octal digit.
Show answers

1. (2×27) + (1×9) + (0×3) + 1 = 54 + 9 + 0 + 1 = 64.

2. 100 ÷ 6 = 16 remainder 4; 16 ÷ 6 = 2 remainder 4; 2 ÷ 6 = 0 remainder 2. Reading upwards: 244₆. Check: 2×36 + 4×6 + 4 = 72 + 24 + 4 = 100.

3. 1011₂ = 11 and 11₂ = 3. 11 + 3 = 14 = 8 + 4 + 2, so 1110₂.

4. (a) 45 ÷ 8 = 5 remainder 5, so 55₈. (b) 45 = 32 + 8 + 4 + 1, so 101101₂.

5. 1001₂ × 11₂: 1001 + 10010 = 11011. So the answer is 11011₂. Check: 9 × 3 = 27 = 16 + 8 + 2 + 1.

6. b² + 1 = 26, so b² = 25 and b = 5 (a base cannot be negative). The digits 1 and 0 are smaller than 5, so the base is valid.

7. (a) 255 ÷ 8 = 31 remainder 7; 31 ÷ 8 = 3 remainder 7; 3 ÷ 8 = 0 remainder 3, so 377₈. (b) 2×64 + 0×8 + 5 = 133. (c) Three binary digits give 2³ = 8 different patterns, 000 to 111, and octal has exactly eight digits, 0 to 7, so each pattern matches one octal digit.

13.Key Points

14.For Teachers and Parents

Learners often feel that decimal is the only “real” way to write numbers. A strong way to break this is to start with counting: ask them to count to twenty in base 5 on one hand, writing each number as they go. They then discover carrying for themselves, and place value becomes an idea they have used, not a rule they were given. Use concrete objects such as counters grouped in fives or twos. Ask learners to write the column values above each digit every time; this habit removes most errors. The Base Converter on this page shows the repeated-division steps, so learners can compare their working with a correct one. When teaching the history, stress that mathematics was built by many cultures over many centuries, and that historians sometimes disagree about dates. This is a good example of how to treat evidence honestly.

15.Related Pages and Further Reading

For further reading, look at the number-base topic in your own examination syllabus and past papers, as not every board includes it. Reputable sources on the history of numerals include the MacTutor History of Mathematics archive of the University of St Andrews. This article is original EDUSAMBAM writing for students up to O-Level and similar courses.

Test Your Understanding

Practice Questions

12 questions. Select an answer for each, then submit to see your score instantly.

0 of 12 answered
0/12
You scored 0%
Keep practicing
1.What does the "base" of a number system tell you?
2.Which numeral system is the origin of the decimal system we use today?
3.Which mathematician formalized rules for treating zero as a true number?
4.Before zero was treated as a true number, how was it first used by the Babylonians and Maya?
5.What is binary 1101 in decimal?
6.What is the base-5 number 132 in decimal?
7.Which of these is NOT a valid digit in base 7?
8.What is octal 157 in decimal?
9.When converting decimal to another base using repeated division, in what order should the remainders be read?
10.Convert decimal 25 to binary using repeated division. What is the answer?
11.Why do computers use binary instead of decimal internally?
12.Which ancient civilization used a base-60 counting system that historians usually link to our 60 minutes in an hour and 360 degrees in a circle?
← Back to Roman NumeralsGatewayNext: Operations of Integers →