Base Conversions: An Essential Skill in Math and Computer Science

Base Conversions: An Essential Skill in Math and Computer Science

Numbers, digits, operations. These are the basic building blocks of mathematics, floating near the shore of an endless ocean. Every day, whether you like it or not, we encounter math, either in the forms of calculating costs, sorting quantities for a recipe, or even checking the progress bar in a YouTube video. So, what if I were to tell you, that even after studying linear equations, imaginary numbers, algebra, statistical relationships, logarithms, geometric properties, and just about any other complex math topic for years at school, you still don’t know how to count. To elaborate further, you most likely know how to count when ten digits, from 0 to 9 are presented to you. But do you know how to count when only zeros and ones, or sixteen different digits are presented? If your answer to the above question is “no”, then continue reading to learn about math concepts that will change the way you think about arithmetic as a whole.

Decimals, Made for Humans:

Now, before I talk about the whole universe of base systems that most humans just blatantly ignore, let’s converse about the composition of the number system that is closer to home: the base 10, or decimal system. Most people define the word “base 10” as synonymous to numbers, and decimals as numbers that contain digits that come after the dot. Well, these definitions are, mathematically, incorrect. First off, base 10 does not mean all the numbers in the world; it is a system in which numbers are constructed using digits from 0 to 9. And, the word decimal (note the Latin prefix deci-) literally means “of ten”. Right now, you might be rolling your eyes thinking, “both definitions of base 10 mean the same thing”. On the contrary, this assumption is invalid, for there are way more numbers written in base systems besides base 10. Next, let’s take a look at the math behind decimal digits by referring to the chart below:

104103102101100
95826

The above table denotes the number 95,826 as a decimal. The bottom row seems pretty self-explanatory, but for those of you who haven’t studied base systems, the 10x row might perplex you. In reality, though, this concept is pretty simple: the base of the exponent represents the base system in which the number should be written in, and the exponent represents the place value of the digit. In this case, the number has a base of 10, and the digit 6 is in the one’s place, for 100 is one. Furthermore, a digit multiplied by its respective exponent yields the digit’s numerical value; e.g. 2 * 101 is 20. Two main rules when dealing with base systems is that the bases of all the digits have to be uniform throughout the number (you can’t have part of a number written in one base and part of a number written in another base) and the digits have to be integers less than the base’s value (the maximum value for a base 10 digit is 9). To solidify your knowledge about the decimal system, try representing the base 10 numbers 604, -8259, and 90.5 in a chart like the one above. Hint: you can use negative exponents to represent the fractional parts of the number.

The Universe of Base Systems:

Now that you’ve learned about how the base 10 system works, let’s try applying those principles to understand how other base systems work. Let’s start with the base 2, or the binary number system:

23222120
1011

The above chart represents the number 10112, the subscript revealing the base of the number. First, let’s analyze the characteristics of a binary number: the base of each of the exponents is 2, and the digits in the number have to be integers less than 2. To convert a number from another base to a decimal, you have to multiply each digit of the number with its place value exponent and add all the products together. For example, the expression to convert 10112 to a base 10 number is as follows: (1 * 20) + (1 * 21) + (0 * 22) + (1 * 23). The result of this expression, 11, is the base 10 number of 10112. As an exercise, try finding the base 10 equivalents of the numbers 42135, 61869, and 10113 (the same formula described above applies to all base systems) If you got 558, 4533, and 31 as your respective answers, then you are correct. Now, let’s try doing the converse by converting a decimal to a hexadecimal (base 16), where our decimal is 613. To aid in the process of base conversion, you might want to draw a chart that includes all the powers of 16 up to 162, for we only need 3 place values to represent 613 in base 16. Now, all you need to do is try to “fit in”, or match the place values in the chart where the products of each digit and its exponent added together is equal to 613 (you can use logarithms for this, but to keep matters simple, just test values to find the solution). Remember, hexadecimals can have up to the number 15 in 1 place value. After some hefty calculation, if you got 265 as your answer, then you are correct. Shown below is a table you could’ve made to help you evaluate this problem:

162161160
265

As the saying goes, practice makes permanent, so to solidify your skills in base conversions, try making up a few numbers on your own and try converting them to a base of your choice. You can use tools such as Rapid Table’s base converter to check your answers.

Why Bases?

At this point in the article, you might be wondering why you might even need to know this skill? Can’t you just live with the regular, old decimal system? Well, think about the infinite number of base systems as different languages; just as each language allows you to communicate efficiently in the respective foreign country, different base systems allow you to represent different situations in the most efficient way. The telegraph, a lightbulb, even the computer; all of these innovations require you or some other layer of abstraction to convert your words, statements, sentences, and numbers into another base system that consists of long beeps and short beeps, ons and offs, zeros and ones respectively. If you guessed that the base system described above is the base 2, or binary system, you are correct. Even if you aren’t an old school communicator, an electrical engineer, or like coding close to the hardware, you still use various base systems every day. Multiple choice quizzes, the alphabet, even the measurement of time are all examples of non-decimal number systems. 

If you are serious about math or are preparing for a math competition, you definitely need to know this concept, for there are a few questions in timed exams that demand you to convert Arabic numerals into different bases on the fly. In computer science, even though you can get away without knowing what base conversions are and how they work, acquiring this knowledge, especially regarding binary and hexadecimal conversions, can help you understand how a computer abstracts information; in fact, this mathematical skill is almost necessary if you code in low-level programming languages. Now that you know how base systems work and how to convert between them, the next time your friend claims that he/she is a mathematical genius, you can just ask them, “Do you know how to count?”.

Ravi Tej Guntuku

Ravi Tej Guntuku

Hello! My name is Ravi Tej Guntuku, and I am a student at Lake Travis High School. This blog showcases some of my views and interests in the fields of Math, Philosophy, Technology, Creative Writing, and more. By reading these articles, I hope that you can learn a bit more about me and the world around us! That's all for now!

Leave a Reply

Your email address will not be published.

%d bloggers like this: