Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Converted Value (base 16)
FF
from base 10
Decimal (base 10) value 255
Source base 10
Target base 16

What is a base converter?

A base converter changes how a number is written without changing its actual value. Computers and programmers routinely move between binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16), but this tool supports any base from 2 to 36 using the digits 0–9 followed by A–Z.

A single quantity shown in four different positional number systems
The same value expressed in binary, octal, decimal and hexadecimal.

How to use it

Type the number you want to convert, set the base it is currently written in (From base), and set the base you want it in (To base). For bases above 10, use letters: A=10, B=11, up to Z=35. The calculator also shows the plain decimal (base 10) value so you can check the math.

The formula explained

Conversion happens in two steps. First the input is read into decimal using positional notation: each digit is multiplied by the source base raised to the power of its position and the products are summed. Then the decimal value is converted to the target base by repeated division — divide by the target base, record the remainder, repeat with the quotient, and read the remainders in reverse order.

$$\text{Result} = \left( \sum_{i=0}^{k-1} d_i \cdot \text{From Base}^{\,i} \right)_{10} \longrightarrow \text{To Base}$$

$$\begin{gathered} V_{10} = \sum_{i=0}^{k-1} d_i \cdot \text{From Base}^{\,i} \\[1.5em] \text{Result} = \left( V_{10} \right)_{\text{To Base}} \\[1.5em] \text{where}\quad \left\{ \begin{aligned} d_i &= \text{digit } i \text{ of } \text{Number} \\ k &= \text{number of digits} \end{aligned} \right. \end{gathered}$$

Positional weights expanding a number into a sum of digit times base powers
Each digit is multiplied by the base raised to its position index.

Worked example

Convert binary 1010 to decimal. Positional sum: $$1\cdot 2^3 + 0\cdot 2^2 + 1\cdot 2^1 + 0\cdot 2^0 = 8 + 0 + 2 + 0 = 10$$ To go the other way, 255 in decimal to hex: \(255 \div 16 = 15\) remainder 15 (F), \(15 \div 16 = 0\) remainder 15 (F), giving FF.

Common Number Bases & Their Digit Sets

A number base (or radix) defines how many distinct digit symbols are available and the weight of each position. The table below summarizes the most widely used bases handled by the converter, along with the symbols they use and where each is typically applied.

Base Name Digit Set Typical Use Case
2 Binary 0–1 Native representation in digital electronics and computer memory; every bit is on or off.
8 Octal 0–7 Compact grouping of binary in threes; Unix/Linux file permission modes (e.g. 755).
10 Decimal 0–9 Everyday human arithmetic, currency, measurements and general counting.
16 Hexadecimal 0–9, A–F Compact display of bytes, memory addresses, color codes (e.g. #FF8800) and machine code.
36 Base 36 0–9, A–Z Maximum base using digits plus the Latin alphabet; short alphanumeric IDs and URL slugs.

Decimal–Binary–Octal–Hex Conversion Table

The following reference shows common decimal values alongside their binary (base 2), octal (base 8) and hexadecimal (base 16) equivalents. The lower rows include the round powers of two that mark common byte and word boundaries.

Decimal Binary Octal Hex
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

Note how 255 (the largest value of a single byte) is exactly eight binary 1s and two hex F’s — each hexadecimal digit maps neatly to four bits.

Key Terms Explained

Base / Radix
The number of unique digit symbols a numeral system uses. Base 10 (decimal) uses ten symbols (0–9); base 2 (binary) uses two (0–1). “Radix” is the formal mathematical synonym for base.
Positional notation
A system in which a digit’s value depends on its position. Each position carries a weight equal to the base raised to a power: in base \(b\), the digit in position \(i\) (counting from 0 at the right) contributes \(d_i \cdot b^{\,i}\).
Digit
A single symbol within a number. The valid digits are limited by the base — base 16 allows 0–9 and A–F, where A–F represent the decimal values 10–15.
Most significant digit (MSD)
The leftmost digit, which carries the largest positional weight and therefore has the greatest impact on the number’s value.
Least significant digit (LSD)
The rightmost digit, with positional weight \(b^{0}=1\); changing it alters the value by the smallest amount.
Binary, Octal, Hexadecimal
Number systems of base 2, 8 and 16 respectively. They are favored in computing because their bases are powers of two, so groups of bits convert cleanly: 3 bits per octal digit, 4 bits per hex digit.
Quotient and remainder
The two results of integer division, used to convert from decimal to another base: repeatedly divide by the target base, recording each remainder as a digit (least significant first) until the quotient reaches 0.

FAQ

What is the maximum base? 36, because the standard digit set 0–9 plus A–Z provides 36 symbols.

Does it handle negative numbers? Yes — a leading minus sign is preserved in the output.

Can it convert fractions or decimals? This version handles whole numbers (integers) only.

Last updated: