maths.free › Number Theory › 4. Number Representation and Calculation › Converting with Base Systems
Converting with Base Systems
Convert another base to base 10.
Convert another base to base 10.
Learning Objectives
After completing this section, you should be able to:
- Convert another base to base 10.
- Write numbers in different base systems.
- Convert base 10 to other bases.
- Determine errors in converting between bases.
Conversion of Another Base into Base 10 and Other Bases
We saw in Hindu-Arabic Positional System that our Hindu-Arabic system uses base 10, which is a system using place values of digits that depend on powers of 10 (or, are based on powers of 10). We’ve already worked with bases other than base 10: The Babylonian system was base 60, while the Mayan system was base 20.
To explore how our base 10 system is used, answer the following question: What’s the following quantity: 4,572? You probably said four thousand five hundred seventy-two (no, there is no “and” between hundred and seventy). But why do you think that 4 means four thousand? A very young person when learning their numbers might say that’s a four five seven and two. But you added the context of thousands to the four. Why?
Place value, that’s why. You learned early on that where the numeral was gave it different meanings. Ten thousands, thousands, hundreds, tens, and ones. So, you translate that symbol string (4,572) into “four thousand five hundred seventy-two.” As we saw in Hindu-Arabic Positional System, expanding a Hindu-Arabic number involved writing the number using each digit times its appropriate power of 10. So, we could write 4,572 as \(4\times {10}^{3}+5\times {10}^{2}+7\times {10}^{1}+2\times {10}^{0}=4\times 1000+5\times 100+7\times 10+2\times 1\).
One possible reason we use base 10 is that we have 10 fingers, and in the cultures where the Hindu-Arabic system developed, that became the standard. Other cultures may have used other ways of organizing numbers, perhaps using 20 by including toes, or using 60 because 60 has many divisors. Mathematically though, base 10 is an awkward base to work in since 10 has limited divisors. But we think it is easy and simple because that’s what we’ve been taught to use.
Using a base 10 system means we need 10 symbols to make our numbering system work: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
Now imagine that we all only had 6 fingers instead of 10 and our counting system was based on those 6 fingers. We would be counting in groups of 6, not groups of 10. How would this change how we work with quantity?
First, we’d need only six symbols. Let’s use 0, 1, 2, 3, 4, 5. Second, our place values would be based on powers of 6, not powers of 10. For instance, the number 3,024 in base 6 would be \(3\times {6}^{3}+0\times {6}^{2}+2\times {6}^{1}+4\times {6}^{0}\). That is how you can translate a base 6 number into a base 10 number. When we calculate that expression we get \(3\times {6}^{3}+0\times {6}^{2}+2\times {6}^{1}+4\times {6}^{0}=3\times 216+0\times 36+2\times 6+4\times 1=648+0+12+4=664\).
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 30 | 31 | 32 | 33 | 34 | etc.… |
Condensed — the full section is in OpenStax Contemporary Mathematics.
Conversion of Base 10 into Another Base
Converting from base 10 into another base uses repeated division, recording the remainder at each step. Then, the number in the new base is the remainder starting from the last remainder found. To be accurate in what we’re saying, we need to remind ourselves of some terminology associated with division. When integers are divided, the one being divided is the dividend, and the one that is dividing the dividend is the divisor. The quotient is the largest natural number that can be multiplied by the divisor where the product is less than the dividend.
When the integer \(n\) is divided by the integer \(d\), \(n\) is called the dividend and \(d\) is the divisor.
To convert a base 10 number \(n\) into base \(d\), we divide \(n\) by \(d\), recording the remainder. Then we divide the quotient from that step by the base \(d\), and record the remainder again. We continue this process until the quotient is 0. Then, the base \(d\) number has digits that start with the last remainder and use each remainder in reverse order.
Converting from Base 10 into a Lower Base
Try it.
Convert 298 to base 6.
Solution
We divide 298 by 6, and record the remainder. Then we divide the quotient from that step by 6, and record the remainder again. We continue this process until the quotient is 0. Then, the base 6 number has digits that start with the last remainder and use each remainder in reverse order.
Step 1: When we divide 298 by 6, we get \(\begin{array}{l}\ 49r4 \\ 6298\end{array}\). The quotient is 49 and the remainder is 4.
Step 2: Now we divide the quotient, 49, by 6. This gives \(\begin{array}{l}\ 8r1 \\ 649\end{array}\). The quotient is 8 and the remainder is 1.
Step 3: Repeating, we get \(\begin{array}{l}\ 1r2 \\ 68\end{array}\). The quotient is 1 and the remainder is 2.
Step 4: Finally, we perform the operation on the quotient 1, \(\begin{array}{l}\ 0r1 \\ 61\end{array}\) giving us a quotient of 0 and a remainder of 1.
Step 5: The base 6 number has digits equal to the remainders in reverse order, 12146. So, 298 in base 10 when converted to base 6 is 12146.
Converting from Base 10 into Base 2
Try it.
Convert 100 to base 2.
Solution
Following the pattern above:
Step 1: We divide 100 by 2, and record the remainder.
Step 2: Then we divide the quotient from that step by 2, and record the remainder again.
Step 3: We continue this process until the quotient is 0.
Step 4: Following this process, the remainders are, in order, 0, 0, 1, 0, 0, 1, 1. Writing those in reverse order gives the number in base 2, 11001002.
Notice that 100 in base 2 took seven digits.
Condensed — the full section is in OpenStax Contemporary Mathematics.
Converting from Hindu-Arabic Numbers to Mayan Numbers
To convert from a Hindu-Arabic number to a Mayan number involves two distinct processes. First, the number must be converted to base 20, using the process described and demonstrated previously. Next, that base 20 number has to be written using Mayan numerals. For reference, the Mayan numerals and their values are below.
Converting from Base 10 into the Mayan System
Try it.
Convert the following into Mayan numbers.
- 51
- 653
Solution
- The Mayan system is base 20, so we must use 20 in the process from above. The first division has a quotient of 2 and remainder of 11. The 11 serves as the “ones” digit. Dividing that quotient, 2, by 20 has a quotient of 0 with a remainder of 2. The 2 becomes the “twenties” digit of the number. So, in base 20, the number would be 2 followed by 11. The Mayan symbols for 2 and 11 are and . Writing these vertically, with the “ones” digit on top, as appropriate for Mayan numbers, results in:
- The Mayan system is base 20, so we must use 20 in the process from above. The first division, 673 divided by 20, has a quotient of 32 and remainder of 13. Dividing that quotient, 32, by 20 has a quotient of 1 with a remainder of 12. Dividing that quotient, 1, by 20 has a quotient of 0 and a remainder of 1. Since there are three remainders here, this is a three-digit number. The 1 is the “20-squared” digit, the 12 is the “twenties” digit, and the 13 is the “ones” digit. So, in base 20, the number would be 1 followed by 12 followed by 13.. The Mayan symbols for 1, 12 and 13 are , , and . Writing these vertically, as appropriate for Mayan numbers, would result in:
Errors in Converting Between Bases
There are some common errors that are made when converting between bases. Often, it comes down to using an “illegal” symbol in the new base.
Detecting an Illegal Symbol When Converting Between Bases
Try it.
A base 10 number is converted to base 7 and the result was 20817. Was an error committed? How do you know?
Solution
The result has the digit 8 in it. In base 7, 8 is an illegal symbol. Based on that, an error was committed.
When converting from base 10 to another base, an illegal symbol will be used if a mistake was made in the division process used to find the number in the new base. Since the digits are based on the remainders, any remainder that is an illegal symbol would indicate an error.
Detecting an Error in Division When Converting Between Bases
Try it.
When changing from base 10 to base 8, the division process resulted in the following remainders: 1, 0, 9, 2, 4. Was an error committed? How do you know?
Solution
The remainders include 9, which in base 8 is an illegal symbol.
Another possible way to detect an error in converting between bases is to count the number of digits. When converting from a higher base to a lower base, the number of digits cannot get smaller. Similarly, when converting from a lower base to a higher base, the number of digits cannot get bigger. So, if a base 10 number is converted to a base 3 number, the number of digits in the new base 3 numbers cannot be less than the number of digits in the base 10 number. Similarly, if a base 7 number is converted to base 10, the number of digits in the base 10 number cannot be more than the number of digits in the original base 7 number.
Detecting an Error in Number of Digits When Converting Between Bases
Try it.
A five-digit base 10 number is converted to a base 5 number. The base 5 number has four digits. Was an error committed? How do you know?
Solution
Since 10 is larger than 5, the base 5 number cannot have less digits than the base 10 number. Since it did, we know an error has been made.
Converting with Base Systems
The Babylonian system used base 60. To convert from Hindu Arabic numbers into Babylonian numbers, the process for converting from base 10 to a different base would be done first. Then, the results found in the conversion process would be changed to Babylonian numerals. This process is similar to the one for Mayan numbers.
Key Concepts
- The system we use is the base 10 system. Base 10 is not the only base that can be used. To use another base, one could start with a list of numbers in that base.
- To indicate that a number is written in a base other than 10, a subscript is appended to the end of the number. That subscript indicates the base for the number.
- Numbers written in a base smaller than 10 use the same symbols as base 10. However, when using bases larger than 10, the symbols A, B, C, … are used to represent digits larger than 9.
- To convert from a number written in a base other than 10 into a base 10 number, the number is written in expanded form and then that expression is computed.
- To convert a number from base 10 into another base, the base 10 number is repeatedly divided by the new base. The remainders when performing these divisions become the digits for the number in the new base.
- Common errors can be detected when performing base conversions.
Practice (16)
Try each one on paper first. Reveal the answer to check; verified ones can be opened in the solver for every step.
-
What are the digits used for base 7?
ჲრკპთირვ ჲრდჲგჲპა.
Since this is base 7, we need only 7 symbols: 0, 1, 2, 3, 4, 5, 6.
-
What are the digits used for base 14?
ჲრკპთირვ ჲრდჲგჲპა.
Since this is base 14, we need 14 symbols. We don’t have single character numbers for 10, 11, 12, and 13, so, in a fit of inspired creativity, we use capital letters A, B, C, D to represent those quantities. So, the digits in base 14 are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D.
-
Convert 3,6017 into base 10.
ჲრკპთირვ ჲრდჲგჲპა.
In base 7, the place values are powers of 7. Since there are four digits, the highest power of 7 that is used is 3. This yields \({3,601}_{7}=3\times {7}^{3}+6\times {7}^{2}+0\times {7}^{1}+1\times {7}^{0}=3\times 343+6\times 49+0\times 7+1=1,029+294+0+1=1,324\).
-
Convert 4B714 into base 10.
ჲრკპთირვ ჲრდჲგჲპა.
In base 14, the place values are powers of 14. Since there are three digits, the highest power of 14 is 2. Also recall that in base 14, 10 is represented by A, 11 is represented by B, 12 is represented by C, and 13 is represented by D. Using that, we convert to base 10:
\[4B{7}_{14}=4\times {14}^{2}+B\times {14}^{1}+7\times {14}^{0}=4\times 196+11\times 14+7\times 1=784+154+7=945\] -
Convert A1612 into base 10.
ჲრკპთირვ ჲრდჲგჲპა.
In base 12, the place values are powers of 12. Since there are three digits, the highest power of 12 is 2. Also recall that in base 12, 10 is represented by A and 11 is represented by B. Using that, we convert to base 10:
\[A{16}_{14}=10\times {12}^{2}+1\times {12}^{1}+6\times {12}^{0}=10\times 144+1\times 12+6\times 1=1,440+12+6=1,458\] -
Convert 10112 into base 10.
ჲრკპთირვ ჲრდჲგჲპა.
In base 2, the place values are powers of 2. Since there are four digits, the highest power of 2 is 3. Using that, we convert to base 10:
\[{1011}_{2}=1\times {2}^{3}+0\times {2}^{2}+1\times {2}^{1}+1\times {2}^{0}=1\times 8+0\times 4+1\times 2+1\times 1=8+0+2+1=11\] -
Write the numbers in base 7 up to 1007.
ჲრკპთირვ ჲრდჲგჲპა.
Step 1: Using the patterns we indicated earlier, we begin with the first seven digits.
0, 1, 2, 3, 4, 5, 6
Step 2: Since we’ve run out of digits, we start with 10, indicating we’ve run out of symbols once.
10, 11, 12, 13, 14, 15, 16
Step 3: Continuing in the same way, we get:
20, 21, 22, 23, 24, 25, 26
30, 31, 32, 33, 34, 35, 36
40, 41, 42, 43, 44, 45, 46
50, 51, 52, 53, 54, 55, 56
60, 61, 62, 63, 64, 65, 66
Now, all the digits have been used in the leading digits. Since the digits have all been used in that leading digit, we use 100, as in base 10.
100
-
Write the numbers in base 14 up to 10014.
ჲრკპთირვ ჲრდჲგჲპა.
Step 1: Using the patterns we indicated earlier, we begin with the first 14 digits.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D
Step 2: Since we’ve run out of digits, we start with 10, indicating we’ve run out of symbols once.
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, 1C, 1D
Step 3: Continuing in the same way, we get:
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 2A, 2B, 2C, 2D
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 3A, 3B, 3C, 3D
40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 4A, 4B, 4C, 4D
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 5A, 5B, 5C, 5D
60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 6A, 6B, 6C, 6D
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 7A, 7B, 7C, 7D
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 8A, 8B, 8C, 8D
90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 9A, 9B, 9C, 9D
A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, AA, AB, AC, AD
B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, BA, BB, BC, BD
C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, CA, CB, CC, CD
D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, DA, DB, DC, DD
100
-
Write the numbers in base 2 up to 1002.
ჲრკპთირვ ჲრდჲგჲპა.
Base 2 uses only two symbols: 0 and 1. Following the pattern established previously, the numbers in base 2 up to 1002 are 0, 1, 10, 11, and 100.
-
Convert 298 to base 6.
ჲრკპთირვ ჲრდჲგჲპა.
We divide 298 by 6, and record the remainder. Then we divide the quotient from that step by 6, and record the remainder again. We continue this process until the quotient is 0. Then, the base 6 number has digits that start with the last remainder and use each remainder in reverse order.
Step 1: When we divide 298 by 6, we get \(\begin{array}{l}\ 49r4 \\ 6298\end{array}\). The quotient is 49 and the remainder is 4.
Step 2: Now we divide the quotient, 49, by 6. This gives \(\begin{array}{l}\ 8r1 \\ 649\end{array}\). The quotient is 8 and the remainder is 1.
Step 3: Repeating, we get \(\begin{array}{l}\ 1r2 \\ 68\end{array}\). The quotient is 1 and the remainder is 2.
Step 4: Finally, we perform the operation on the quotient 1, \(\begin{array}{l}\ 0r1 \\ 61\end{array}\) giving us a quotient of 0 and a remainder of 1.
Step 5: The base 6 number has digits equal to the remainders in reverse order, 12146. So, 298 in base 10 when converted to base 6 is 12146.
-
Convert 45,134 to base 13.
ჲრკპთირვ ჲრდჲგჲპა.
We divide 45,134 by 13, and record the remainder. Then we divide the quotient from that step by 13, and record the remainder again. We continue this process until the quotient is 0. Then, the base 13 number has digits that start with the last remainder and use each remainder in reverse order. It is at this step that we’ll convert to the base 13 digits, which are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C.
Step 1: When we divide 45,134 by 13, we get \(\begin{array}{l}\ 3,471r11 \\ 1345,134\end{array}\). The quotient is 3,471 and the remainder is 11.
Step 2: Now we divide the quotient, 3,471, by 13. This gives \(\begin{array}{l}\ 267r0 \\ 133,471\end{array}\). The quotient is 267 and the remainder is 0.
Step 3: Repeating, we get \(\begin{array}{l}\ 20r7 \\ 13267\end{array}\). The quotient is 20 and the remainder is 7.
Step 4: Again, and we get \(\begin{array}{l}\ 1r7 \\ 1320\end{array}\). The quotient is 1 and the remainder is 7.
Step 5: Finally, we get \(\begin{array}{l}\ 0r1 \\ 131\end{array}\), with quotient 0 and a remainder 1.
Step 6: The base 13 number has digits equal to the remainders in reverse order, which were 1, 7, 7, 0, and 11. The 11 is written as B in base 13. So, 45,134 in base 10 when converted to base 13 is 1770B13.
-
Convert 100 to base 2.
ჲრკპთირვ ჲრდჲგჲპა.
Following the pattern above:
Step 1: We divide 100 by 2, and record the remainder.
Step 2: Then we divide the quotient from that step by 2, and record the remainder again.
Step 3: We continue this process until the quotient is 0.
Step 4: Following this process, the remainders are, in order, 0, 0, 1, 0, 0, 1, 1. Writing those in reverse order gives the number in base 2, 11001002.
Notice that 100 in base 2 took seven digits.
-
Convert the following into Mayan numbers.
- 51
- 653
ჲრკპთირვ ჲრდჲგჲპა.
- The Mayan system is base 20, so we must use 20 in the process from above. The first division has a quotient of 2 and remainder of 11. The 11 serves as the “ones” digit. Dividing that quotient, 2, by 20 has a quotient of 0 with a remainder of 2. The 2 becomes the “twenties” digit of the number. So, in base 20, the number would be 2 followed by 11. The Mayan symbols for 2 and 11 are and . Writing these vertically, with the “ones” digit on top, as appropriate for Mayan numbers, results in:
- The Mayan system is base 20, so we must use 20 in the process from above. The first division, 673 divided by 20, has a quotient of 32 and remainder of 13. Dividing that quotient, 32, by 20 has a quotient of 1 with a remainder of 12. Dividing that quotient, 1, by 20 has a quotient of 0 and a remainder of 1. Since there are three remainders here, this is a three-digit number. The 1 is the “20-squared” digit, the 12 is the “twenties” digit, and the 13 is the “ones” digit. So, in base 20, the number would be 1 followed by 12 followed by 13.. The Mayan symbols for 1, 12 and 13 are , , and . Writing these vertically, as appropriate for Mayan numbers, would result in:
-
A base 10 number is converted to base 7 and the result was 20817. Was an error committed? How do you know?
ჲრკპთირვ ჲრდჲგჲპა.
The result has the digit 8 in it. In base 7, 8 is an illegal symbol. Based on that, an error was committed.
-
When changing from base 10 to base 8, the division process resulted in the following remainders: 1, 0, 9, 2, 4. Was an error committed? How do you know?
ჲრკპთირვ ჲრდჲგჲპა.
The remainders include 9, which in base 8 is an illegal symbol.
-
A five-digit base 10 number is converted to a base 5 number. The base 5 number has four digits. Was an error committed? How do you know?
ჲრკპთირვ ჲრდჲგჲპა.
Since 10 is larger than 5, the base 5 number cannot have less digits than the base 10 number. Since it did, we know an error has been made.
Symbols used here
n × (n−1) × … × 1; the number of orderings of n things. 0! = 1.
The exponent b must be raised to for x; ln uses base e.
Add a_k for k = 1 up to n.
Multiply a_k for k = 1 up to n.
Naturals, integers, rationals, reals, complex numbers.
n divides a − b; a and b have the same remainder.
b is a multiple of a; the largest number dividing both.
Count of 1..n coprime to n; number of primes up to x.
The remainders 0…n−1 with clock arithmetic.
What is left after dividing a by n.
How to: Converting with Base Systems
- Convert another base to base 10.
- Write numbers in different base systems.
- Convert base 10 to other bases.
- Determine errors in converting between bases.
- 51
- 653
- The Mayan system is base 20, so we must use 20 in the process from above. The first division has a quotient of 2 and remainder of 11. The 11 serves as the “ones” digit. Dividing that quotient, 2, by 20 has a quotient of 0 with a remainder of 2. The 2 becomes the “twenties” digit of the number. So, in base 20, the number would be 2 followed by 11. The Mayan symbols for 2 and 11 are
- The Mayan system is base 20, so we must use 20 in the process from above. The first division, 673 divided by 20, has a quotient of 32 and remainder of 13. Dividing that quotient, 32, by 20 has a quotient of 1 with a remainder of 12. Dividing that quotient, 1, by 20 has a quotient of 0 and a remainder of 1. Since there are three remainders here, this is a three-digit number. The 1 is the “20-squared” digit, the 12 is the “twenties” digit, and the 13 is the “ones” digit. So, in base 20, the number would be 1 followed by 12 followed by 13.. The Mayan symbols for 1, 12 and 13 are
Questions people ask
Why are primes so important?
Every integer factors into primes in exactly one way, so primes are the atoms of multiplication. Cryptography relies on that factoring being easy to state and hard to do.
How do I tell whether a big number is prime?
Trial division up to the square root works for small numbers. For large ones, probabilistic tests (Miller–Rabin) give an answer that is wrong with negligible probability, and deterministic tests (AKS) exist but are slower.
ჲოთრაი ჟამ.
Parts of this page are adapted from OpenStax Contemporary Mathematics (CC BY-NC-SA 4.0). Condensed and re-explained here; errors are ours.
მეტი Number Theory
Prime factorisationPrime numbersGCD and LCMModular arithmeticDivisorsSequencesNumber basesDiophantine equationsFermat's little theorem and Euler's theoremRSA: cryptography from number theory