Number Base Converter
Conversions
Decimal (Base 10)
255
Binary (Base 2)
11111111
Octal (Base 8)
377
Hexadecimal (Base 16)
FF
About Number Bases
A number base (or radix) defines how many unique digits are used to represent numbers. Our everyday decimal system uses base 10 (digits 0–9). Computers use binary (base 2), operating systems often use octal (base 8), and hexadecimal (base 16) is used widely in programming, colors, and memory addressing.
Where Are These Bases Used?
- Binary: CPU instructions, boolean logic, bit manipulation, data storage
- Octal: Unix file permissions (e.g., chmod 755), legacy systems
- Hexadecimal: Color codes (#FF5733), memory addresses, debugging, IPv6
Frequently Asked Questions
How do I convert binary to decimal?
Multiply each binary digit by 2 raised to its position power (starting from 0 on the right), then sum all values. For 1010: (1×8) + (0×4) + (1×2) + (0×1) = 10. This calculator does it instantly.
What is hexadecimal used for in web design?
Hex codes represent colors. Each pair of hex digits represents the red, green, and blue components (0–255). For example, #FF0000 is pure red (255, 0, 0), and #FFFFFF is white (255, 255, 255).
What does 0x mean before a hex number?
0x is a prefix used in programming languages (C, C++, Python, JavaScript, etc.) to indicate that the number is in hexadecimal. For example, 0xFF = 255 in decimal.
Can I convert negative numbers?
This calculator works with non-negative integers. Negative numbers in binary typically use two's complement representation, which varies by word size (8-bit, 16-bit, 32-bit). For those, specialized tools are recommended.