Computers only understand 1s and 0s, so how does the number 13 become 1101? The answer is number bases. A base tells you how many digits a system uses and what each position is worth. Once you learn to read place values and to divide by the base, you can convert between number bases in either direction with just paper and a little patience.
To convert between number bases, use place values and the divide-by-base method. To read binary or hex into decimal, multiply each digit by its place value (a power of the base) and add. To go from decimal into binary or hex, divide by the base over and over and read the remainders bottom-up. Binary is base 2, decimal is base 10, and hex is base 16, which uses A through F for 10 through 15.
What a Number Base Is
A number base is simply how many digit symbols a counting system uses. Decimal is base 10, so it uses ten digits, 0 through 9. Binary is base 2 and uses only 0 and 1.
The key idea is place value. Each position in a number is worth a power of the base. In decimal, the places are 1, 10, 100, 1000, which are 10^0, 10^1, 10^2, 10^3.
Binary works the same way, but the places are powers of 2: 1, 2, 4, 8, 16, and so on. Hex uses powers of 16. If you want a deeper look at powers themselves, see our sibling guide on exponents and scientific notation.
Two rules apply to every base you meet:
- A base with a value of N uses exactly N digit symbols, starting at 0.
- Each place is worth the base raised to a power, growing by one power as you move left.
Keep those two ideas in mind and every conversion below follows the same pattern.
Binary to Decimal
To turn a binary number into decimal, write the place value above each digit, then add up the places where a 1 sits. From the right, the places are 2^0, 2^1, 2^2, 2^3, which equal 1, 2, 4, 8.
Take the binary number 1101. Line the digits up with their place values and add:
- 1 x 2^3 = 1 x 8 = 8
- 1 x 2^2 = 1 x 4 = 4
- 0 x 2^1 = 0 x 2 = 0
- 1 x 2^0 = 1 x 1 = 1
Now add the results: 8 + 4 + 0 + 1 = 13. So binary 1101 equals 13 in decimal. You only add the place values that have a 1, and you skip every 0.
Decimal to Binary
To go the other way, use the divide-by-base method. Divide your decimal number by 2, write down the remainder, then keep dividing the quotient by 2 until you reach 0.
Let us convert decimal 13 to binary. Divide by 2 each step and track the remainder:
- 13 / 2 = 6 remainder r1
- 6 / 2 = 3 remainder r0
- 3 / 2 = 1 remainder r1
- 1 / 2 = 0 remainder r1
Now read the remainders from the bottom up: r1, r1, r0, r1 gives 1101. So decimal 13 equals binary 1101, which matches the example above. Reading bottom-up matters, because the last remainder is the most valuable place.
The method never fails, because dividing by 2 asks a simple yes or no question at each step: is there a 1 in this place? The remainder answers it, and the quotient carries the rest of the number forward until nothing is left.
Hexadecimal Basics
Hexadecimal, or hex, is base 16. It needs sixteen digit symbols, but we only have ten normal digits, so hex borrows letters for the rest.
The digits run 0 through 9 as usual, then A, B, C, D, E, F stand for 10, 11, 12, 13, 14, 15. So hex A = 10 and hex F = 15.
- A = 10, B = 11, C = 12
- D = 13, E = 14, F = 15
Hex places are powers of 16: the places from the right are 16^0 = 1, then 16^1 = 16, then 16^2 = 256. Programmers like hex because one hex digit packs exactly four binary digits.
Decimal to Hex and Hex to Decimal
Hex uses the same two methods, just with base 16. To read hex into decimal, multiply each digit by its place value and add. Take hex FF:
- F x 16^1 = 15 x 16 = 240
- F x 16^0 = 15 x 1 = 15
- Total: 240 + 15 = 255
So hex FF equals decimal 255. To convert decimal to hex, divide by 16 and read remainders bottom-up. Convert decimal 26:
- 26 / 16 = 1 remainder r10
- 1 / 16 = 0 remainder r1
Read bottom-up: r1 then r10. Since 10 is written as A, the answer is 1A. So decimal 26 equals hex 1A.
Watch the remainders closely with hex. Any remainder from 10 to 15 must be written as a letter, not as two digits. A remainder of 10 becomes A, 13 becomes D, and 15 becomes F. Forgetting this swap is the most common hex mistake.
You can always check your work by converting back. Read 1A into decimal: 1 x 16 + 10 x 1 = 16 + 10 = 26. The number returns to where it started, which confirms the conversion is correct.
A Quick Reference
The table below lists the decimal numbers 0 through 16 with their binary and hex forms. It is a handy check while you practice, and it shows the pattern clearly.
| Decimal | Binary | Hex |
|---|---|---|
| 0 | 0 | 0 |
| 1 | 1 | 1 |
| 2 | 10 | 2 |
| 3 | 11 | 3 |
| 4 | 100 | 4 |
| 5 | 101 | 5 |
| 6 | 110 | 6 |
| 7 | 111 | 7 |
| 8 | 1000 | 8 |
| 9 | 1001 | 9 |
| 10 | 1010 | A |
| 11 | 1011 | B |
| 12 | 1100 | C |
| 13 | 1101 | D |
| 14 | 1110 | E |
| 15 | 1111 | F |
| 16 | 10000 | 10 |
Notice two milestones. At decimal 10 the hex digit becomes A, and at decimal 16 both binary and hex roll over to a new place. For converting other kinds of values, our guide on converting fractions, decimals, and percentages covers everyday number swaps.
Want the answer without the paperwork? Type any value and switch bases instantly with our Base Converter. It handles binary, decimal, and hex in one place, so you can check your hand work or convert big numbers in a second.
Frequently Asked Questions About Number Bases
What Does It Mean to Convert Between Number Bases?
It means writing the same value using a different set of digit symbols and place values. The amount does not change; only the way you write it does. For example, decimal 13, binary 1101, and hex D all name the exact same quantity. Converting just translates the number from one base into another.
How Do I Convert Binary to Decimal by Hand?
Write the place value under each binary digit, starting from the right with 2^0 = 1, then 2, 4, 8, and so on. Multiply each digit by its place value and add the results. For 1101 that is 8 + 4 + 0 + 1 = 13. You only add the places that hold a 1.
How Do I Convert Decimal to Binary?
Divide the decimal number by 2 and record the remainder, then keep dividing the quotient by 2 until it reaches 0. Read the remainders from bottom to top to get the binary number. For 13 the remainders are r1, r0, r1, r1, which read upward as 1101.
Why Does Hexadecimal Use Letters?
Hex is base 16, so it needs sixteen digit symbols, but we only have ten normal digits, 0 through 9. To fill the gap, hex uses the letters A through F for the values 10 through 15. So A = 10, B = 11, and F = 15. The letters are just single symbols for those values.
What Is 255 in Hexadecimal?
Decimal 255 equals hex FF. Each F stands for 15, and hex places are powers of 16. So FF means 15 x 16 + 15 x 1 = 240 + 15 = 255. This is why 255 shows up so often in computing, since two hex digits cover 0 to 255.
How Are Binary and Hex Related?
They fit together neatly because 16 is 2^4. One hex digit equals exactly four binary digits. For example, hex F is binary 1111, and hex A is binary 1010. That tidy match is why programmers use hex as a short, readable way to write long strings of binary.
Do These Methods Work for Any Base?
Yes. To read any base into decimal, multiply each digit by its place value, which is a power of the base, and add. To go from decimal into any base, divide by that base repeatedly and read the remainders bottom-up. The steps are identical; only the base number you use changes.
Sources
Authoritative Sources Used in This Article
This article is for general education only. Always double-check the formulas and math for your own problem before you rely on the result. Reviewed for accuracy by Prof. Dr. Khalil Mudassar, PhD. Last updated September 11, 2026.
Author
Shakeel Muzaffar is the Founder and Editor-in-Chief of MultiCalculators.com, bringing over 15 years of experience in digital publishing, product strategy, and online tool development. He leads the platform's editorial vision, ensuring every calculator meets strict standards for accuracy, usability, and real-world value. Shakeel personally oversees content quality, formula verification workflows, and the platform's commitment to publishing tools that are genuinely useful for students, professionals, and everyday users worldwide.




