Decimal to Binary, Octal and Hexadecimal Converter

Table of Contents

Computers represent numbers using different bases. Below is a quick explanation of number bases, followed by an interactive decimal converter.

Any number \(N\) written in base \(B\) can be expressed as:

\[ N = a_0 + a_1 B^1 + a_2 B^2 + \cdots + a_k B^k \]

where each coefficient satisfies:

\[ 0 \le a_i < B \]

The most common number bases in computing are:

Example 1: Decimal (Base 10)
\[ 3234 = 4 + 3 \times 10^1 + 2 \times 10^2 + 3 \times 10^3 \]
Example 2: Binary (Base 2)
\[ 110110 = 0 + 1 \times 2^1 + 1 \times 2^2 + 0 \times 2^3 + 1 \times 2^4 + 1 \times 2^5 \]
Example 3: Octal (Base 8)
\[ 2674 = 4 + 7 \times 8^1 + 6 \times 8^2 + 2 \times 8^3 \]
Example 4: Hexadecimal (Base 16)

Hexadecimal digits include: \(0\)–\(9\), \(A\)–\(F\), where \(A=10\), \(B=11\), \(C=12\), \(D=13\), \(E=14\), \(F=15\).

\[ A67B = 11 + 7 \times 16^1 + 6 \times 16^2 + 10 \times 16^3 \]

Online Decimal Converter

Enter a non-negative integer (base 10):





Binary (Base 2)
Octal (Base 8)
Hexadecimal (Base 16)

Books & References