Base Converter
Easily convert numbers into different bases with our base converter.
What is the Base Converter?
The base converter is a free tool that can convert numbers from one number system (such as decimal) into another (such as binary). Today, we use many different number systems. For example, computer programming makes frequent use of binary (base 2) and hexadecimal (base 16) number systems.
Our number system converter is a handy tool that can seamlessly convert numbers from one system into another through a process called base conversion. It can serve as a useful tool for mathematicians, programmers, and students learning about number systems.
How to Use the Base Calculator?
Using our base calculator to do a number system conversion is quite simple.
- Input the number you want to convert.
- Select the number system to which it belongs, i.e., decimal, binary, octal, or hexadecimal.
- Select the number system to which you want to convert it to.
And that’s it. Your result will show up as soon as you select the right number systems.
Since the base calculator is so fast, it can be used for fast base-to-base conversion and save precious time and effort.
How Does the Base Converter Work?
Knowing how to use the base calculator is good and all, but you will never truly learn unless you know the process in detail. After all, to be a good mathematician or programmer, you need to be able to do number conversions mentally.
So, all bases (number systems) can be converted into each other based on some formulas. For example, you can convert hexadecimal to decimal using this formula:
D = h0×160 + h1×161 + h2×162 + ... + hn×16n
Where:
- D = Decimal number
- h = Digit of Hexadecimal number
- n = number of hexadecimal digits from right to left where the rightmost number is 0, 2nd to rightmost is 1, and so on.
Our base conversion tool has all relevant base conversion formulae coded into its backend. When you tell it the number systems for conversion and provide a number, it will automatically call the relevant formula and quickly calculate the result.
How To Do Base Conversion Manually
There are many formulas for converting numbers from one system to another. However, learning them all and remembering their particulars is impractical.
Instead, all you need to learn is how to convert any base into base-10 (decimal), and then base-10 can be easily converted to any other system. This is because converting decimal numbers to another system is much easier than, say, hexa to octal.
You have already seen the formula for converting hexadecimal to decimal. That is actually the same formula for converting all other number systems to decimals.
The only difference is that instead of “16,” you will multiply each digit by the number that represents their base. For example, in binary to decimal base conversion, the formula will change as follows.
D = b0×20 + b1×21 + b2×22 + ... + bn×2n
Where:
- D = decimal number
- b = binary digit
- n = count of binary digits from the right.
For octal, instead of 2, each digit will be multiplied by eight because octal is base 8.
Let’s demonstrate this approach by doing a conversion of the following binary number into decimal and then converting that into octal (base-8).
“01110101”
To convert this into decimal, we will simply input the values into the formula.
D = (0 x 27) + (1 x 26) + (1 x 25) + (1 x 24) + (0 x 23) + (1 x 22) + (0 x 21) + (1 x 20)
D = 0 + 64 + 32 + 16 + 0 + 4 + 0 + 1
D = 117
So, now we know that “01110101” is “117” in decimal. Now, converting from decimal to any other number system is very simple and straightforward.
- What you need to do is divide the decimal number by the base of the new number system.
- Record the remainder (important later).
- Take the quotient and divide it again by the base of the new number system.
- Repeat step 2
- Repeat steps 3 and 4 until your quotient is 0.
- Write all the recorded remainders in reverse order to get the number in the converted number system.
Just make sure to replace the numbers with the right symbols of the new system, i.e., don’t write “10” in hexa; instead, replace it with “A.” Let’s complete our earlier example so that you know how the number system conversion works.
O = D ÷ 8
Where:
- O = number in the octal number system
- D = number in the decimal number system
So, we get:
O = 117 ÷ 8
O = 14 | Remainder (r) = 5
O = 14 ÷ 8
O = 1 | r = 6
O = 1 ÷ 8
O = 0 | r = 1
The remainders that we got in order were: “5”,”6”, and “1”. These numbers in reverse order become “165.” So 117 (base-10) becomes 165 in base-8.
You can confirm this result by using our base converter and save yourself the hassle of manual conversions as well.
Frequently Asked Questions
What would 1011 0010 be as a decimal number?
It would be the number 11. You can test this using our base calculator.
What is meant by the base 36 number system?
It is a number system that uses 36 symbols, which are 0-9 and A-Z. A represents 10, B represents 11, and so on until Z, which represents 35.
It is widely used in computer systems for a number of functions, such as URL shortening and encoding data.