Convert a number between bases 2, 4, 8, 16 and 10

Base 10

Base 2

Base 4

Base 8

Base 16

The radix or base is the number of unique digits, used to represent numbers.

If the base is larger than $10$ we use caracters 'A', 'B', 'C', ... as the digits 10, 11, 12 ...

To represent a number $n$ in a base $b$ we use the notation : $$n = \overline{d_{k} d_{k-1} \cdots d_{1}}^{(b)}$$ Examples:

**The Decimal system :**

The most used system of numbers in the world, is used in arithmetic. Its ten digits are "0"–"9".

**The binary system :**

Used internally by nearly all computers, is base 2. The two digits are "0" and "1".

Example : $\overline{31}^{(10)} = \overline{11111}^{(2)}$

**The Octal system :**

The eight digits are "0"–"7".

Example : $\overline{31}^{(10)} = \overline{37}^{(8)}$

**The Hexadecimal system :**

Often used in computing as a more compact representation of binary (1 hex digit per 4 bits).

The sixteen digits are "0"–"9" followed by "A"–"F" or "a"–"f".

Example : $\overline{31}^{(10)} = \overline{1F}^{(16)}$

If the base is larger than $10$ we use caracters 'A', 'B', 'C', ... as the digits 10, 11, 12 ...

To represent a number $n$ in a base $b$ we use the notation : $$n = \overline{d_{k} d_{k-1} \cdots d_{1}}^{(b)}$$ Examples:

The most used system of numbers in the world, is used in arithmetic. Its ten digits are "0"–"9".

Used internally by nearly all computers, is base 2. The two digits are "0" and "1".

Example : $\overline{31}^{(10)} = \overline{11111}^{(2)}$

The eight digits are "0"–"7".

Example : $\overline{31}^{(10)} = \overline{37}^{(8)}$

Often used in computing as a more compact representation of binary (1 hex digit per 4 bits).

The sixteen digits are "0"–"9" followed by "A"–"F" or "a"–"f".

Example : $\overline{31}^{(10)} = \overline{1F}^{(16)}$

Share page