Number Base Converter
Convert between decimal, binary, octal, and hexadecimal number systems with step-by-step explanations.
Quick Reference Table
| Decimal | Binary | Octal | Hexadecimal |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 2 | 0010 | 2 | 2 |
| 3 | 0011 | 3 | 3 |
| 4 | 0100 | 4 | 4 |
| 5 | 0101 | 5 | 5 |
| 6 | 0110 | 6 | 6 |
| 7 | 0111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
Tips:
- For binary numbers, prefix with 0b (e.g., 0b1010)
- For octal numbers, prefix with 0o (e.g., 0o12)
- For hexadecimal numbers, prefix with 0x (e.g., 0xA)
- Or select the appropriate base from the dropdown menu
This tool converts numbers between decimal, binary, octal, and hexadecimal systems. It shows step-by-step how the conversion works.
How to Use This Tool
Follow these steps to convert a number:
- Type your number in the input field. You can include prefixes like 0b for binary, 0o for octal, and 0x for hexadecimal.
- Select the number base from the dropdown menu. This tells the tool which system your number belongs to.
- Click “Convert.” The tool processes your input and shows the results.
- Review the conversion table to see the number in all forms.
Input Fields Explained
The text box is for entering any number. The dropdown menu is used to choose the base of that number. If you use a prefix, the tool reads it automatically. This way, you get the correct conversion.
Understanding the Output
The conversion results appear in a table. You see the number shown as:
- Decimal: Your number in base ten.
- Binary: The same number in binary with a 0b prefix.
- Octal: The number in octal with a 0o prefix.
- Hexadecimal: The number in hex with a 0x prefix.
The section below the table gives a step-by-step explanation. Read it to understand how the conversion works.
Special Notes and Limitations
This tool works with positive numbers only. Use the correct prefixes if you do not choose the base from the dropdown menu. Some very large numbers may require extra care in conversion.
Common Use Cases
This tool helps students and programmers. It is useful when working with color coding in web design. It also serves well for debugging numeric data in computer programs. Users can rely on the clear steps it provides.
Quick Reference Table
The following table shows a clear comparison between decimal and hexadecimal:
| Decimal | Hexadecimal |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
| 7 | 7 |
| 8 | 8 |
| 9 | 9 |
| 10 | A |
| 11 | B |
| 12 | C |
| 13 | D |
| 14 | E |
| 15 | F |
This table breaks down the comparison to help you read the values easily.
How the Tool Works
The tool first checks your input. It looks for a prefix to pick the number base. If no prefix is found, it uses the base you selected. It then converts the number into a decimal value. Using that, it produces results in binary, octal, and hexadecimal.
A clear step-by-step explanation is shown. This helps you see how the number is converted from one form to another.