How to use it
Type in any of the four boxes and the other three update. Very large numbers work too. The note underneath tells you how many bits the value needs.
How number bases work
In everyday decimal, each position is worth ten times the one to its right. Binary works the same way with two: each position is worth double. So binary 1011 is eight plus two plus one, which is eleven. Computers use binary because a circuit that is either on or off is simple and reliable.
Hexadecimal is base 16, using the digits 0 to 9 and then the letters A to F. One hex digit stands for exactly four binary digits, which makes it a compact way to write binary. That is why colours on the web, memory addresses and network hardware addresses are written in hex.
Questions people ask
What is the largest number in one byte?
A byte is eight bits, so it holds 0 to 255. In hex that is 00 to FF.
Why do hex numbers start with 0x?
It is a label programmers add so that 10 in hex, which means sixteen, is not mistaken for ten.
See the glossary for bit, byte and related terms.