What Is a Number Base Converter?
A number base converter translates a number from one positional numeral system to another — for example from binary (base 2) to decimal (base 10), or from decimal to hexadecimal (base 16). Computers store everything in binary, network engineers read hex, and old systems use octal, so converting between these bases is a daily task in programming, electronics, and computer science classes. This tool supports binary, octal, decimal, and hexadecimal in any direction.
How to Use It
Type the number you want to convert, pick its current base under "From Base," then choose the base you want under "To Base." Hexadecimal digits use the letters A–F (case does not matter). The calculator shows the result in your chosen output base plus the decimal equivalent, so you can always check your work.
The Formula Explained
Conversion happens in two stages. First the input is read into decimal using place value: each digit is multiplied by the base raised to its position. For binary 1010 that is \(1\times2^3 + 0\times2^2 + 1\times2^1 + 0\times2^0 = 8 + 0 + 2 + 0 = 10\). Second, that decimal value is converted to the target base using repeated division: keep dividing by the new base and collect the remainders, then read them from last to first.
$$\text{Decimal} = \sum_{i=0}^{k-1} d_i \cdot \text{From Base}^{\,i} \;\longrightarrow\; \text{Output in } \text{To Base}$$
Worked Example
Convert hexadecimal FF to decimal. Place value gives $$\text{F}\times16^1 + \text{F}\times16^0 = 15\times16 + 15\times1 = 240 + 15 = 255$$ To then express 255 in binary, repeated division by 2 yields 11111111 — the familiar maximum value of an 8-bit byte.
Common Base Conversion Reference Table
This table lists frequently used values across the four standard number bases. Decimal (base 10) is the everyday counting system; binary (base 2), octal (base 8) and hexadecimal (base 16) are common in computing. Notice how each power of two — 16, 32, 64, 128, 256 — produces a clean single-digit roll-over in hexadecimal and an exact power in binary.
| Decimal (10) | Binary (2) | Octal (8) | Hex (16) |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 |
| 3 | 11 | 3 | 3 |
| 4 | 100 | 4 | 4 |
| 5 | 101 | 5 | 5 |
| 6 | 110 | 6 | 6 |
| 7 | 111 | 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 |
| 16 | 10000 | 20 | 10 |
| 32 | 100000 | 40 | 20 |
| 64 | 1000000 | 100 | 40 |
| 128 | 10000000 | 200 | 80 |
| 255 | 11111111 | 377 | FF |
Key Terms Explained
- Base (radix)
- The number of distinct digit symbols a numeral system uses. Base 10 uses ten symbols (0–9); base 2 uses two (0–1). The base also determines the multiplier between adjacent positions.
- Positional notation
- A system in which a digit's contribution depends on its position. Each position represents a successive power of the base, increasing from right to left.
- Place value
- The value contributed by a single digit, equal to the digit multiplied by the base raised to the power of its position. For example, the leading 7 in octal 745 has place value \(7\times 8^2 = 448\).
- Digit
- A single symbol within a number. The valid digits range from 0 up to (base − 1); hexadecimal extends 0–9 with the letters A–F for values 10–15.
- Nibble
- A group of 4 bits. One nibble maps exactly to a single hexadecimal digit (0–F), which is why binary-to-hex conversion is done by grouping bits into nibbles.
- Byte
- A group of 8 bits (two nibbles), able to represent \(2^8 = 256\) values, from 0 to 255 (00 to FF in hex).
- Most significant digit (MSD)
- The leftmost digit of a number, carrying the highest place value.
- Least significant digit (LSD)
- The rightmost digit, carrying the lowest place value (the base raised to the power 0, i.e. 1).
- Binary (base 2)
- Uses digits 0 and 1. The native language of digital electronics, where each bit is an on/off state.
- Octal (base 8)
- Uses digits 0–7. Each octal digit corresponds to exactly 3 binary bits; historically common in computing and still used for file permissions.
- Decimal (base 10)
- Uses digits 0–9. The standard system for everyday human counting and arithmetic.
- Hexadecimal (base 16)
- Uses digits 0–9 and A–F. Compactly represents binary because each hex digit equals exactly 4 bits, widely used for memory addresses and color codes.
FAQ
What do the letters in hex mean? In base 16 the digits go 0-9 then A=10, B=11, C=12, D=13, E=14, F=15.
Why is binary base 2? Binary uses only two digits, 0 and 1, matching the on/off states of electronic switches inside a computer.
Can I convert decimals (fractions)? This calculator works with whole numbers (integers). Fractional base conversion uses a separate multiply-by-base method.