Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Decimal (DEC)
255
base 10
Hexadecimal (HEX) FF
Octal (OCT) 377
Senary (base 6) 1103
Binary (BIN) 11111111

What is the Base-N Conversion Calculator?

This tool converts a non-negative integer written in one numeral system into five common bases at once: decimal (base 10), hexadecimal (base 16), octal (base 8), senary (base 6), and binary (base 2). It is a pure mathematical converter with no region-specific rules, so it works the same anywhere. Programmers, students, and electronics hobbyists use it to quickly switch between representations of the same value.

How to use it

Type your number in the "Value (x)" box using digits that are valid for the base you select. Choose the input base with the radio buttons. For hexadecimal you may use the letters A–F (upper or lower case). For senary only 0–5 are valid, octal 0–7, and binary 0–1. Then read off all five equivalent representations. Supported range is 0 to \(2^{64} - 1\); only whole numbers are supported (no fractions or negative values).

The formula explained

Parsing reads each digit from most significant to least: \(N = N \times \text{radix} + \text{digitValue(digit)}\), where 0–9 map to 0–9 and A–F map to 10–15. The general positional value is given by:

$$N_{10} = \sum_{i=0}^{k-1} d_i \cdot \text{Base}^{\,i} \qquad\text{where } d_i \text{ are the digits of } \text{Value (x)}$$

Formatting into a target base \(b\) uses repeated division: take \(r = N \bmod b\), record the digit, set \(N = N \div b\), and repeat until \(N = 0\); reverse the collected digits. Remainders 10–15 become A–F for hex.

Diagram showing a number expanded as digits multiplied by powers of a radix
Positional notation: each digit is weighted by the radix raised to its position.

Worked example

Enter 129 in decimal. Hexadecimal: \(129 = 8\times16 + 1 \to\) "81". Octal: \(129 = 2\times64 + 0\times8 + 1 \to\) "201". Senary: \(3\times36 + 3\times6 + 3 = 129 \to\) "333". Binary: \(128 + 1 \to\) "10000001".

Repeated division of a decimal number by a base producing remainders read upward
Converting a decimal number to another base by repeated division, reading remainders from bottom to top.

Base Conversion Reference Table

The table below lists common non-negative integers expressed in five number systems: decimal (base 10), hexadecimal (base 16), octal (base 8), senary (base 6) and binary (base 2). Use it to spot-check the converter or to memorize the most frequently used boundary values such as 15, 16, 255 and the powers of two.

Decimal (10) Hexadecimal (16) Octal (8) Senary (6) Binary (2)
0 0 0 0 0
1 1 1 1 1
2 2 2 2 10
5 5 5 5 101
6 6 6 10 110
7 7 7 11 111
8 8 10 12 1000
10 A 12 14 1010
15 F 17 23 1111
16 10 20 24 10000
32 20 40 52 100000
64 40 100 144 1000000
100 64 144 244 1100100
255 FF 377 1103 11111111

Note that 255 (the largest value an 8-bit byte can hold) is FF in hexadecimal and eight 1s in binary, which is why a single hex pair maps cleanly onto one byte.

Definitions & Glossary

Base / radix
The number of distinct digit symbols a positional numeral system uses, and the factor by which place value increases from one column to the next. Base \(b\) uses digits \(0\) through \(b-1\).
Decimal (base 10)
The everyday number system using ten digits, 0–9. Each column is a power of 10: ones, tens, hundreds, and so on.
Hexadecimal (base 16)
A base-16 system using sixteen symbols 0–9 and A–F. Widely used in computing because each hex digit represents exactly four binary bits (a nibble).
Octal (base 8)
A base-8 system using digits 0–7. Each octal digit corresponds to exactly three binary bits; historically common in early computing and in Unix file permissions.
Senary (base 6)
A base-6 system using digits 0–5. Less common in practice but useful as a teaching tool and in certain mathematical contexts.
Binary (base 2)
The base-2 system using only the digits 0 and 1 (bits). It is the native language of digital electronics, where each bit is an on/off state.
Digit value (A–F = 10–15)
In bases above 10, letters extend the digit set beyond 9. In hexadecimal: A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15.
Positional notation
A system in which a digit's contribution depends on its position. The value of a number is \(N_{10} = \sum_{i=0}^{k-1} d_i \cdot b^{\,i}\), where \(d_i\) is the digit in position \(i\) (counting from 0 on the right) and \(b\) is the base.
Most significant digit (MSD)
The leftmost digit of a number, carrying the highest place value and contributing the most to the overall magnitude.
Least significant digit (LSD)
The rightmost digit, occupying the ones place (\(b^0\)) and contributing the smallest amount to the value.
Unsigned 64-bit range
An unsigned 64-bit integer can represent values from 0 up to \(2^{64}-1 = 18{,}446{,}744{,}073{,}709{,}551{,}615\), which is FFFFFFFFFFFFFFFF in hexadecimal — sixteen F digits.

FAQ

Can it handle decimals like 12.5? No, only whole numbers are supported. Are negative numbers allowed? No; the range starts at 0. Is hex input case-sensitive? No — both "ff" and "FF" parse to 255, and output hex is always uppercase.

Last updated: