Base-n number converter
A tool to convert numbers from one base to another, such as decimal to binary or ternary to hexadecimal.
It's generally thought that we use a base-10 system of counting because we have 10 digits on our two hands. All numbers are written as sums of powers of a base number. For decimal, which uses 10 as a base, we have 100 (1), 101 (10), 102 (100) and so on. For example, \[ 24 = 2 \times 10^1 + 4 \times 10^0 \]
But it doesn't have to be that way! We can use any number as a base to represent that same number, just with different symbols. You might be familiar with binary from the world of computing, which has just two states, "off and on", or 0 and 1. Let's try writing 24 in, say, base 4. The building blocks we use are all powers of 4. \[ 24 = 1 \times 4^2 + 2 \times 4^1 + 0 \times 4^0 \]
So, in base 4, decimal 24 is written as 120. The above tool will do all these calculations for you so you can convert from any base to another ranging all the way from binary to hexadecimal. Simply enter a number in any input field, and all the other fields will update accordingly.
Note that for binary, it's not possible to enter the character "2", for ternary it is not possible to enter a "3" and so on. And for base 11 and above, we run out of number symbols, so A represents the number 10, B represents 11 etc.
If you've found this educational demo helpful, please consider supporting us on Ko-fi.