Number Base Converter
Convert numbers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16)
Decimal - Valid digits: 0-9
Binary - Valid digits: 0, 1
Enter a valid base number
Quick Reference Table (0-15)
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 |
Results
Enter values and click Calculate to see the result.
Theory & Formula
What are Number Bases?
A number base (or radix) is the number of unique digits used to represent numbers in a positional numeral system. Different bases are used in different contexts, especially in computer science.
Common Number Bases
- Binary (Base 2): Uses only 0 and 1. Fundamental to computer systems.
- Octal (Base 8): Uses digits 0-7. Historically used in computing.
- Decimal (Base 10): Uses digits 0-9. The standard number system.
- Hexadecimal (Base 16): Uses digits 0-9 and letters A-F. Common in computing.
Conversion Method
To convert any base to decimal, multiply each digit by the base raised to its position power
\(N_{base} = d_n \times base^n + d_{n-1} \times base^{n-1} + \ldots + d_1 \times base^1 + d_0 \times base^0\)To convert from decimal to another base, divide by the target base repeatedly
Divide the decimal number by the target base repeatedly, collecting remainders. Read the remainders from bottom to top.
Example: Convert Binary to Decimal
Convert 1011₂ to decimal:
\(1011_2 = 1 \times 2^3 + 0 \times 2^2 + 1 \times 2^1 + 1 \times 2^0\)\(= 8 + 0 + 2 + 1\)\(= 11_{10}\)