Free Online Number Base Converter
Free online number base converter for binary, decimal, hexadecimal, and octal. Built for programmers, CS students, and electronics—fast and accurate.
How to Convert Decimal to Binary
To use our number system converter, simply select the source number system (From) and target number system (To) from the dropdown menus. Enter your number in the input field, and the converter will instantly display the result. The tool supports conversions between binary (base-2), decimal (base-10), hexadecimal (base-16), and octal (base-8) number systems. Each conversion is performed with precision and includes validation to ensure accurate results.
Switch number bases for programming and electronics: binary (base 2), decimal (10), hexadecimal (16), and octal (8). Each link below is a dedicated converter with steps.
Hex is common for colors and memory addresses; binary for bitwise work; octal still appears in Unix permissions.
Conversion Examples
Example: Convert Binary 1010 to Decimal
- Step 1: Binary number: 1010
- Step 2: Assign powers of 2 from right to left: 1(2³) 0(2²) 1(2¹) 0(2⁰)
- Step 3: Calculate: 1×8 + 0×4 + 1×2 + 0×1
- Step 4: Result: 8 + 0 + 2 + 0 = 10
1010 (binary) = 10 (decimal)
This demonstrates the basic binary to decimal conversion process.
Example: Convert Decimal 255 to Hexadecimal
- Step 1: Divide 255 by 16: 255 ÷ 16 = 15, remainder 15 (F)
- Step 2: Divide 15 by 16: 15 ÷ 16 = 0, remainder 15 (F)
- Step 3: Read remainders from bottom to top: FF
255 (decimal) = FF (hex)
FF is commonly used in color codes, representing the maximum value for 8 bits.
Example: Convert Hexadecimal FF to Binary
- Step 1: Hex number: FF
- Step 2: F = 15 in decimal = 1111 in binary
- Step 3: F = 15 in decimal = 1111 in binary
- Step 4: Combine: 11111111
FF (hex) = 11111111 (binary)
This shows how each hex digit represents exactly 4 binary bits.
Example: Convert Decimal 493 to Octal (Unix Permission)
- Step 1: Divide 493 by 8: 493 ÷ 8 = 61, remainder 5
- Step 2: Divide 61 by 8: 61 ÷ 8 = 7, remainder 5
- Step 3: Divide 7 by 8: 7 ÷ 8 = 0, remainder 7
- Step 4: Read remainders: 755
493 (decimal) = 755 (octal)
755 is a common Unix file permission value (rwxr-xr-x).
Example: Convert Binary 10101100 to Hexadecimal
- Step 1: Binary: 10101100
- Step 2: Group into 4-bit groups: 1010 and 1100
- Step 3: 1010 = A, 1100 = C
- Step 4: Result: AC
10101100 (binary) = AC (hex)
This demonstrates the direct relationship between binary and hexadecimal.
Common Use Cases
- Decimal to hex for color codes.
- Binary to decimal for bit patterns.
- Hex to binary for low-level debugging.
- Octal for chmod-style permissions.
Frequently Asked Questions
How do I convert binary to decimal?
Add each bit × 2^position from the right. Example: 1010₂ = 8+2 = 10₁₀. Or use the binary-to-decimal tool.
Hex digits?
0–9 and A–F (A=10 … F=15). Each hex digit is 4 binary bits.
Why use hexadecimal?
Shorter than binary, easy to map to bytes (2 hex digits = 8 bits).
Invalid input?
Each base only allows valid digits (binary: 0–1, octal: 0–7, hex: 0–F).