Number base converter
Pick the base of your number and type it. Bases 2, 8, 10 and 16 update as you type.

What you enter stays on this page and is not sent anywhere.
Use ± for a negative number and a point for the fraction part. Spaces between digits are ignored.
How it is converted
Divide the whole part by 2
Keep dividing by 2 until the quotient is 0, noting each remainder beside it. Read the remainders from the bottom up.
| 2 | 45 | |
| 2 | 22 | … 1 |
| 2 | 11 | … 0 |
| 2 | 5 | … 1 |
| 2 | 2 | … 1 |
| 1 | … 0 |
Read from the bottom up: 10 1101(2)
How to use it
- Pick the base your number is written in, such as 10 or 16.
- Type the number; a point starts the fraction part and ± makes it negative.
- Read the results, then pick a target base below to see the division or expansion steps.
Questions
How do you convert decimal to binary by hand?
Divide the number by 2 and note the remainder, then divide the quotient by 2 again until it reaches 0. Reading the remainders from last to first gives the binary number: 45 becomes 101101.
Why does 0.1 never end in binary?
A fraction ends in base 2 only if its reduced denominator is a power of 2. 0.1 is 1/10, and 10 has the factor 5, so the binary digits 0011 repeat forever. That is also why computers store 0.1 slightly off.
What is two's complement?
It is how computers store negative whole numbers in a fixed number of bits: flip every bit of the positive value and add 1. In 8 bits, −10 is 11110110, and the range is −128 to 127.
How do hex and binary digits line up?
16 is 2⁴, so each hex digit stands for exactly four binary digits: F is 1111 and 2D is 0010 1101. Octal works the same way with three binary digits per digit, because 8 is 2³.
More tools





