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)

DecimalBinaryOctalHexadecimal
0000000
1000111
2001022
3001133
4010044
5010155
6011066
7011177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F

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}\)
Number Base Converter | Binary, Octal, Decimal, Hexadecimal | MathCalcLab | MathCalcLab