Conversions and practical tools

Number base converter

Translate an integer representation from one positional base to another. Supported bases range from binary through base 36.

Enter your values

Your results

Converted representation
—

How we got this result: The page substitutes your current entries into this rule: Parse each source digit by place value in the source base, then repeatedly divide to produce digits in the target base.

How to use this calculator

  1. Enter number, source base, target base.
  2. Review the assumptions and units shown beside the fields.
  3. Read the live result, calculation note, and worked examples before using the answer.

When a Hex Code Meets a Binary Signal

You are debugging a render loop at 2 AM. The pixel on screen is wrong. Your code expects a hexadecimal color value, but the hardware driver just handed you a raw binary stream. You need to bridge that gap fast. The string FF in base 16 looks simple. But the memory bus speaks in ones and zeros. You cannot just eyeball the translation. You need a reliable method to map those high-order hex digits to their binary counterparts.

The process is mechanical but unforgiving. You take the source number and break it down by place value. Then you repeatedly divide to generate the digits for the target base. It is not magic. It is arithmetic. If you feed the system 101010 in base 2, it hands you back 42 in base 10. Clean. Precise. No ambiguity. This same logic applies when you convert 255 in base 10 back to FF in base 16. The numbers stay consistent regardless of which side of the equation you start from.

Your inputs are straightforward. You provide the number, the source base, and the target base. The output is the converted representation. There is no room for guesswork. The supported bases span from binary all the way through base 36. You pick your starting point and your destination. The converter handles the heavy lifting. You get the exact string you need to paste into your code. The screen updates. The bug disappears.

What Positional Bases Actually Mean

Think about the number 42 in base 10. The 4 sits in the tens place, so it represents four groups of ten. The 2 sits in the ones place, representing two single units. This positional logic is the engine behind every base system. You do not need special symbols to understand it. You only need to know what each position is worth. In base 16, the positions grow by factors of sixteen instead of ten. A digit in the second position from the right is worth sixteen times more than the digit in the first position.

This scaling rule works the same way in binary. Every position to the left is worth double the one before it. In 101010 base 2, the 1s occupy the places worth 32, 8, and 2; those values add to 42. The zeros occupy the places worth 16, 4, and 1 and contribute nothing. Reading the positions from the right avoids swapping the one and zero place values.

You are not memorizing a list of conversions. You are reading a map of values. Each digit has a job defined by its location. Change the base and the job changes. The digit F in base 16 stands for fifteen. But it only matters because of where it sits. In FF, the first F is in the sixteens place, giving it a value of 240. The second F is in the ones place, adding 15. Together, they make 255. The position dictates the power.

Parsing Source Digits and Repeated Division

Take FF in base 16. You read it from left to right. The first F stands for fifteen. It sits in the sixteens column. So you multiply fifteen by sixteen. The second F is also fifteen. It sits in the ones column. You add them together. Fifteen times sixteen is two hundred and forty. Add the other fifteen. You get two hundred and fifty-five. That is your decimal bridge. Now you need to get to the target base. Let us go back to base 16 for a moment to see the reverse logic, though the math is the same. If you start with 255 in base 10 and want base 16, you divide 255 by 16. You get fifteen with a remainder of fifteen. That remainder is your last digit. It is F. Now you take that fifteen and divide it by 16. You get zero with a remainder of fifteen. That is your first digit. Another F. You read the remainders backwards. F then F. You have your answer.

The process works the same way for binary. Look at 101010 in base 2. You have ones in the thirty-two, eight, and two positions. Add those up. Thirty-two plus eight is forty. Forty plus two is forty-two. You just did a conversion to decimal. If you wanted to turn 42 back into binary, you would divide 42 by 2. You get 21 with a remainder of 0. Divide 21 by 2. You get 10 with a remainder of 1. Keep going. Divide 10 by 2. Remainder 0. Divide 5 by 2. Remainder 1. Divide 2 by 2. Remainder 0. Divide 1 by 2. Remainder 1. Read those remainders from bottom to top. One zero one zero one zero. You have your original number.

Reading the Output Without Guessing

You see a string of characters and need to know if it represents the value you intended. The order matters. In positional notation, each character holds a specific weight based on its location. A digit on the far right is worth one unit. The next one to the left is worth the base. The next is worth the base squared. If you read the output from right to left, you can mentally reconstruct the total value. This check confirms the conversion logic worked as expected.

Take the result FF in base 16. You know this came from 255 in base 10. To verify, break it down. The rightmost F stands for 15. Its place value is 16 to the power of 0, which is 1. So that part is 15. The leftmost F is also 15. Its place value is 16 to the power of 1, which is 16. Multiply 15 by 16 to get 240. Add the 15 from the first part. You arrive at 255. The math holds.

Consider 101010 in base 2. It becomes 42 in base 10. Read the binary from the right. The ones place is 0. The twos place is 1, giving 2. The fours place is 0. The eights place is 1, giving 8. The sixteens place is 0. The thirty-twos place is 1, giving 32. Sum these up. 2 plus 8 plus 32 equals 42. The output matches the input value perfectly.

Mixing Up Digit Limits and Place Values

You might think converting 255 from base 10 to base 16 is simple. It is not if you ignore digit limits. Base 16 only recognizes symbols from 0 to F. If you try to write a digit like G or 10 in the result, you break the system. The value 255 becomes FF. That is two digits. Not three. Not four. Two. Each position holds a specific weight. The rightmost F is worth 15 times 16 to the power of 0. The leftmost F is worth 15 times 16 to the power of 1. Add those together. 15 plus 240 equals 255.

Miscounting place values is a frequent trap. Some people see FF and think it means 15 and 15 added together. That equals 30. Wrong. Positional notation multiplies each digit by its base raised to its position index. You must respect the order. Reverse the process with 101010 in base 2. Read from right to left. The rightmost 0 is 0 times 2 to the power of 0. The next 1 is 1 times 2 to the power of 1. The next 0 is 0 times 2 to the power of 2. Keep going. The leftmost 1 is 1 times 2 to the power of 5. Sum the non-zero parts. 2 plus 8 plus 32. The total is 42.

Confusing these steps leads to garbage output. A digit cannot exceed the base minus one. In base 2, only 0 and 1 exist. In base 10, digits go up to 9. In base 36, you can use letters. But the place value logic stays the same. Divide the total by the target base repeatedly. Record the remainders. Those remainders become your new digits, starting from the least significant position. If you skip a step or assign the wrong weight to a position, the final number will be wrong. Check your work. Verify that 255 in base 10 truly maps to FF in base 16. It does. Trust the math, not your intuition.

Why Base 36 Differs from Binary and Hex

Base 2 gives you only two symbols, zero and one. Base 16 uses sixteen symbols, stretching from zero to F. Base 36 pushes the limit further by using every digit and letter from zero to Z. You gain compactness as the base grows. A long string of binary digits becomes a short hex code or a very brief base 36 string. The tradeoff is complexity. Your brain must track thirty-six distinct values instead of two.

Conversion speed depends on how many digits you process. Moving from base 2 to base 10 involves parsing each bit by place value. The algorithm repeatedly divides the accumulated value to generate the target digits. A small number like 101010 in base 2 becomes 42 in base 10. This is straightforward. However, converting a large integer from base 36 to base 2 requires handling a wider range of inputs. The repeated division step generates more output digits in binary than in hex.

Look at FF in base 16. It converts to 255 in base 10. If you started with 255 in base 10 and went to base 16, you would get FF again. The math remains consistent across these systems. Base 36 simply allows a denser representation. You can pack more value into fewer characters. This matters when you need short identifiers. It does not change the underlying integer. It only changes how you write it down. The character set expands, but the logic stays the same.

Tips for Programmers and Math Students

If you are a programmer, trust the round-trip test. Convert your number from base 2 to base 10, then immediately flip it back. Take 101010 in base 2, which becomes 42 in base 10. Now convert 42 back to binary. If you get 101010 again, your logic holds. This quick check catches off-by-one errors in your parsing loops. It is far faster than debugging a complex algorithm when the output looks wrong.

Math students should use known anchors to spot mistakes. You likely know that FF in base 16 equals 255 in base 10. Use that pair as a benchmark. If your manual calculation for a similar number yields a result far from 255, pause and recheck your place values. Do not trust a single conversion. Verify by converting 255 back to base 16. Seeing FF appear confirms your understanding of hex digit weights.

Keep your digit limits in mind during these checks. In base 16, the highest single digit is F. In base 10, it is 9. If you see a digit like G in a hex string, you have an error. Cross-referencing simple, known pairs like 42 and 101010 builds intuition. It helps you recognize when a conversion feels off. This habit saves time during exams or code reviews.

Key Terms in Base Conversion

Radix is just another word for the base itself. It tells you how many unique symbols you can use before rolling over to the next place. In base ten, your radix is ten, so you have digits zero through nine. In binary, the radix is two, limiting you to zero and one. When you see base sixteen, the radix is sixteen, which is why you need letters A through F to cover the values ten through fifteen. This number defines the weight of every position in your string.

A digit is a single symbol within that string. It is not always a single number. In hexadecimal, F is a single digit representing the value fifteen. In decimal, 9 is a single digit. The distinction matters because a digit’s identity depends entirely on the radix it lives under. You cannot treat a hex F the same way you treat a decimal F, because F does not exist in base ten. The symbol is the same, but the meaning shifts based on the system’s rules.

Place value is the multiplier assigned to each position based on its distance from the right. The rightmost spot has a value of one. The next spot to the left has a value equal to the radix. The next has a value of the radix squared. This pattern continues as you move left. In the example where 101010 in base two becomes 42 in base ten, each binary digit is multiplied by a power of two determined by its place. The leftmost one sits in the thirty-two place. The next one sits in the eight place. The final one sits in the two place. Adding those specific weighted values gives you the final result.

Reference and example table

CaseMeaning
Example 1101010 in base 2 converts to 42 in base 10.
Example 2FF in base 16 converts to 255 in base 10.
Example 3255 in base 10 converts to FF in base 16.

Frequently asked questions

What is the maximum base I can convert to?

You can work with any positional base from binary up to base 36. This range covers everything from simple two-digit systems to complex alphanumeric ones.

How does the tool handle letters like F?

Letters represent values higher than nine in bases larger than ten. For instance, FF in base 16 converts to 255 in base 10 because each F stands for fifteen.

Can I convert from decimal to binary?

Yes, you can translate standard decimal numbers into binary representations. The system handles the division logic to give you the correct sequence of ones and zeros.

What inputs do I need to provide?

You must enter the number, the source base, and the target base. Once these three fields are filled, the output will show the converted representation.

Why is 101010 equal to 42?

This happens when you convert from base 2 to base 10. The calculation sums the place values to produce the final decimal result of 42.

Does the order of digits matter during conversion?

Yes, the position of every digit determines its value in the final result. The tool parses each source digit by its specific place value before generating the new number.

Can I switch between hex and decimal quickly?

Absolutely, switching between base 16 and base 10 is straightforward. You can see that 255 in base 10 becomes FF in base 16 instantly.