Base Converter

How do I use the converter?

This is a tool that will convert a number from one computer number system to another. The range is from binary to hexatridecimal (base 36). The most common bases are duplicated at the top for quick access. Type a number into the left of the text boxes and change the two dropdowns to represent the bases you want to convert. The conversion will be shown in the text box to the right. "Error" will be shown if the input is not a valid value for the base in the left dropdown. If you don't know how this works or you want to learn how to do these calculations by hand, I will try to explain it below.

What is a base?

First, think about all of the digits we use to count. We use 1, 2, 3, 4, 5, 6, 7, 8, 9, and don't forget 0. Together that's 10 digits. You could say we count in decimal  or base 10. With only ten digits in our decimal system, after counting ten digits up, we have to add another digit on to the number (going from nine to ten) making a two digit number. Similarly, after counting up nine of those tens and another nine ones, we make a three digit number going to 100.

We only have ten digits in the system we use (the Arabic numerals invented around 500 CE) but in the history of numbers, many other systems have been used. Other than a simple tally system, the most simple number system is binary  (base 2) which is used in all modern computers. Binary uses zeros and ones to represent numbers or other data. You already know what decimal is so you can probably take a guess at what hexadecimal is. Hexadecimal  is a number system in base 16 and uses the digits of decimal plus the digits from 'a' to 'f' in the standard English alphabet. It is used often in computers to represent memory addresses and colors. The last number system worth discussing is hexatridecimal  (base 36). It is special because it includes all of the Arabic numerals and the whole English alphabet so whole words can be translated.

How do I convert by hand?

I will be focusing on how to convert between decimal and binary, but process is the same for all other bases if not a little more difficult. The base of a number is written as a subscript beside the value so 516 means the hexadecimal value written as "5" (this value is not 510).

*Hint* It helps to know powers of two (20=1, 21=2, 22=4, 23=8, 24=16...) to do the conversion.

Take the number furthest right and if it is a '1', raise it to the power of 0, the next number over, if it is a '1' raise it to the power of 1. Keep doing this for all digits and add them all up. Leave out all numbers that had zero digits in the binary form.

Example: You are given 11012 and you have to convert to base 10.

(1 * 23) + (1 * 22) + (0 * 21) + (1 * 20) = 13

8 + 4 + 0 + 1 = 13

This yields 1310 as the value equal to 11012.