Base Converter

Convert numbers between Binary, Decimal, Octal, and Hexadecimal systems.

Invalid character for selected base.

Tip: The input will automatically validate based on your selected base. For example, you cannot type '9' in Binary mode.

Decimal (Base 10)
0
Binary (Base 2)
0
Octal (Base 8)
0
Hexadecimal (Base 16)
0

Understanding Number Bases

A number base (or radix) is the number of unique digits, including zero, used to represent numbers in a positional numeral system. While we use Decimal (Base 10) in daily life, computers rely heavily on Binary (Base 2), Octal (Base 8), and Hexadecimal (Base 16).

Common Bases

Conversion Logic

To convert between bases, we essentially perform repeated division (to convert down) or multiplication (to convert up).

Common Hex Values

In web development, Hex is used for colors:

Frequently Asked Questions (FAQ)

Why are Hex letters uppercase?

Conventionally, hexadecimal letters (A-F) are written in uppercase to avoid ambiguity with lowercase words or variable names. However, `A` and `a` have the same numerical value.

How do I calculate Decimal from Binary?

Look at the digits from right to left. Multiply each digit by $2^0, 2^1, 2^2...$ respectively, and sum the results. For example, $1101_{binary} = 1\times8 + 1\times4 + 0\times2 + 1\times1 = 8+4+0+1 = 13_{decimal}$.