Number Base Converter
Convert numbers between binary, octal, decimal and hexadecimal instantly and for free.
Online Number Base Converter
Quick Reference
| Decimal | Binary | Octal | Hexadecimal |
|---|---|---|---|
| 10 | 1010 | 12 | A |
| 255 | 11111111 | 377 | FF |
| 1024 | 10000000000 | 2000 | 400 |
What is a Number Base Converter?
A number base converter is a tool that transforms numbers between different numeral systems. The most common are binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16).
Each system has specific applications: binary is fundamental in computing, decimal is our everyday system, hexadecimal is used for color codes and memory addresses, and octal for file permissions in Unix systems.
Binary (Base 2)
Uses only 0 and 1. It's the fundamental language of computers.
Octal (Base 8)
Uses digits 0 to 7. Used in Unix/Linux file permissions.
Decimal (Base 10)
Uses digits 0 to 9. It's the system we use in everyday life.
Hexadecimal (Base 16)
Uses 0-9 and A-F. Common in web colors (#FF5733) and memory addresses.
How to Use the Converter?
- 1
Select the base of the number you want to convert (binary, octal, decimal or hexadecimal).
- 2
Enter the number in the input field. Make sure to use only valid digits for that base.
- 3
Click the 'Convert' button to see the results.
- 4
The results will appear in all 4 bases. You can copy any result by clicking the copy icon.
Main Use Cases
💻 Programming
Understand bitwise operations, network masks, state flags and internal data representation in memory.
🎨 Web Design
Convert color codes. For example, #FF5733 (hex) = RGB(255, 87, 51). Useful for working with CSS and design tools.
🔧 Unix/Linux Systems
Understand and configure file permissions. For example, chmod 755 uses octal notation (7=rwx, 5=r-x).
📚 Education
Learn number systems, binary arithmetic and fundamental concepts of computer science and mathematics.
Practical Examples
Decimal 255 → Hexadecimal FF
The number 255 in decimal is FF in hexadecimal. This is the maximum value of a byte (8 bits) and is commonly used in RGB color codes.
Binary 1010 → Decimal 10
Binary 1010 represents decimal 10. Calculated as: (1×2³) + (0×2²) + (1×2¹) + (0×2⁰) = 8 + 0 + 2 + 0 = 10.
Octal 777 → Full Permissions
In Unix/Linux, chmod 777 gives full permissions (rwxrwxrwx) to owner, group and others. Each 7 in octal = 111 in binary = rwx.
Frequently Asked Questions (FAQ)
Why do computers use binary?
Computers use binary because electronic circuits have two natural states: on (1) and off (0). This makes binary the most efficient and reliable system for digital hardware.
When is hexadecimal used?
Hexadecimal is used in web colors (#RRGGBB), memory addresses, error codes, compact representation of binary data and in low-level programming. It's more readable than binary and more compact than decimal.
What does 0x mean in programming?
The 0x prefix indicates that a number is in hexadecimal. For example, 0xFF is 255 in decimal. It's a convention used in C, C++, JavaScript, Python and many other languages.
How do I manually convert from binary to decimal?
Multiply each digit by 2 raised to its position (starting from 0 on the right) and add the results. Example: 1011 = (1×2³) + (0×2²) + (1×2¹) + (1×2⁰) = 8 + 0 + 2 + 1 = 11.