Binary Converter
Choose the kind of number you have, type it, and read the answer. The steps are written out underneath.
The converter could not load. Refresh the page to try again.
Reading this as a binary number.
Flip the bits
Press any key to switch that bit on or off.
This number has too many bits to show as keys. The results above hold the full value.
Two's complement
How a computer stores this number, including negatives.
How it was worked out
How to use this converter
Choose what you have
Pick Binary, Decimal, Hex or Octal. If you switch while a number is showing, its value stays the same and gets rewritten in the new system.
Type or paste the number
Spaces, commas and prefixes such as 0b and 0x are fine. The answer in the blue row is usually the one you came for.
Check the working
Open the tabs under the converter to see each conversion written out, ready to copy into your own notes.
How to convert binary to decimal
Each binary digit, or bit, has a place value that is a power of 2. The rightmost bit is worth 1, the next 2, then 4, 8, 16 and so on. Add the place values of every bit set to 1.
1101 = 8 + 4 + 0 + 1 = 13
The binary to decimal guide covers a faster doubling method, shortcuts and practice questions.
How to convert decimal to binary
Divide the number by 2 and write down the remainder. Keep dividing the quotient by 2 until it reaches 0. Then read the remainders from the last one to the first.
13 gives remainders 1, 0, 1, 1. From last to first: 1101
The decimal to binary guide covers a second method, shortcuts, fractions and practice questions.
Binary, hexadecimal and octal
One hexadecimal digit stands for exactly 4 bits and one octal digit for exactly 3 bits. That is why programmers use them as shorthand for binary. To convert by hand, split the bits into groups from the right and replace each group.
1010 1111 = A F = AF in hexadecimal
The hex to binary and binary to hex guides have the full digit chart and practice questions. For decimal, see hex to decimal and decimal to hex.
Common values
Select a number to load it into the converter.
What is two's complement?
Two's complement is how computers usually store negative whole numbers. To get it by hand, write the positive number at the chosen size, flip every bit, then add 1.
5 = 00000101. Flip = 11111010. Add 1 = 11111011, which is −5
The size limits the range. For example, 8 bits can hold −128 to 127.
Common questions
What is 1010 in decimal?
It is 10, because 8 + 0 + 2 + 0 = 10.
How big a number can I convert?
Up to 16,384 bits, which is about 4,900 decimal digits, with no rounding. Bit keys and the working are available for values up to 32 bits.
Does it support fractions?
Not yet. This converter works with whole numbers only, positive or negative.
Why do results have spaces in them?
Groups are easier to read and check by eye. The Copy button gives you the number without any spaces or commas.