Number Base Converter
The Number Base Converter converts numbers between positional numeral systems such as decimal, binary, octal, and hexadecimal. Number bases are fundamental in computing, digital electronics, programming, and mathematical notation.
How to use this calculator
- Select the base of the number you are entering.
- Enter a valid number using only digits supported by that base.
- Select the target base.
- Review the converted representation.
Positional number systems
A number in base b represents digits multiplied by powers of b according to their position.
- In decimal, the base is 10 and the available digits are 0 through 9.
- In binary, the base is 2 and only 0 and 1 are used.
- In hexadecimal, the base is 16 and the symbols 0–9 and A–F represent the sixteen possible digit values.
- Conversions commonly pass through a numeric value and then represent that value using the destination base.
Worked examples
Example: binary to decimal
The binary number 1010 represents a combination of powers of two.
1×8 + 0×4 + 1×2 + 0×1 = 10
Binary 1010 equals decimal 10.
Example: decimal to hexadecimal
The decimal value 255 can be represented using hexadecimal notation.
255 = 15×16 + 15
Decimal 255 equals hexadecimal FF.
Understanding the result
Changing the number base does not change the underlying numeric value; it changes how that value is written.
The valid digits depend on the base. Binary accepts only 0 and 1, while hexadecimal additionally uses A through F.
Leading zeros can be meaningful in some programming or data formats even though they do not normally change the numeric value.
Important notes
Make sure every entered digit is valid for the selected source base.
Computer systems often use hexadecimal because it provides a compact representation of binary data.
When working with programming languages, check whether the language uses prefixes or syntax to identify binary, octal, decimal, or hexadecimal literals.
Frequently asked questions
What is a number base?
A number base determines how many unique digit symbols are used before a new positional place is required.
What base does normal decimal counting use?
Everyday decimal notation uses base 10, with the digits 0 through 9.
Why is hexadecimal useful in computing?
Hexadecimal provides a compact way to represent binary information because one hexadecimal digit corresponds to four binary bits.
Related calculators
- Decimal to Fraction Calculator — Convert a terminating decimal to a simplified fraction.
- Fraction to Decimal Calculator — Convert a fraction to a decimal value.
- Mixed Number Calculator — Convert between mixed numbers, improper fractions, and decimal values.
- Roman Numeral Converter — Convert numbers to Roman numerals and Roman numerals back to numbers.
- Unit Converter — Convert length, weight, temperature, volume, speed, and digital storage units.
- Prime Number Checker — Check if a number is prime, and find all prime numbers up to any limit.
Related explanations
Learn the method behind the number or compare the terminology before using the calculator.
- Percentage Change vs Percentage Difference — Understand the difference between percentage change and percentage difference, including when each formula is appropriate.
- How to Calculate Salary from an Hourly Rate — Convert hourly pay into weekly, monthly, and annual estimates and understand the assumptions behind the result.
- Standard Deviation — Understand standard deviation as a measure of spread and the difference between population and sample standard deviation.
This page provides a calculation tool plus explanatory information so you can understand what the result means and when the underlying method may not fit your situation.