Number Base Converter
How to Use This Converter
Type your number in any of the four fields: decimal, binary, octal, or hexadecimal. The tool converts it instantly into all the other bases at the same time. You can type a decimal like 255, a binary like 11111111, or a hex value like FF. All four outputs update as you type.
Number Bases Explained
Every number system uses positional notation. The position of a digit tells you what power of the base to multiply it by. In decimal (base 10), the number 352 means 3 x 100 + 5 x 10 + 2 x 1. The base tells you how many symbols you have before you run out and roll over to the next position.
Decimal has 10 symbols (0-9). Binary has 2 (0 and 1). Each number system works the same way, just with a different base.
The Four Common Bases
| Base | Name | Digits Used | Common Use |
|---|---|---|---|
| 2 | Binary | 0, 1 | Computer hardware, logic circuits |
| 8 | Octal | 0-7 | Unix file permissions, legacy systems |
| 10 | Decimal | 0-9 | Everyday arithmetic |
| 16 | Hexadecimal | 0-9, A-F | HTML colors, memory addresses, RGB |
Converting Decimal to Binary
Divide your decimal number by 2 repeatedly. Write down the remainder at each step (it will always be 0 or 1). When you reach 0, read the remainders from bottom to top. That sequence is your binary number.
6 / 2 = 3 remainder 0
3 / 2 = 1 remainder 1
1 / 2 = 0 remainder 1
Read bottom to top: 1101. So 13 in binary is 1101.
Hexadecimal in Practice
Hexadecimal uses 16 symbols: the digits 0 through 9, then the letters A through F. A = 10, B = 11, C = 12, D = 13, E = 14, F = 15. It is a compact way to write binary because one hex digit always equals exactly 4 binary digits.
You see hex everywhere once you know to look. HTML color codes like #FF5733 are three hex pairs representing red, green, and blue values. Memory addresses in programming are almost always written in hex.
Common Mistakes to Avoid
- Confusing octal with decimal. Octal numbers often start with a leading 0 in code (like 0755 in Unix), which means something different from decimal 755.
- Mixing up uppercase and lowercase hex letters. A and a both mean 10, but some systems are case-sensitive.
- Forgetting that place values double each step in binary. The rightmost position is 1, then 2, 4, 8, 16, 32, and so on.
- Reading binary remainders top to bottom instead of bottom to top when converting from decimal.