The method
Each binary digit is worth a power of 2, starting from 1 on the right: 1, 2, 4, 8, 16 and so on. Add up the values of the places that hold a 1.
1101
8 + 4 + 0 + 1 = 13So binary 1101 is 13 in decimal. The working table shows every bit, its position, its place value and its contribution.
Signed numbers
Computers store negative numbers in two's complement. In that form the top bit has a negative weight. Choose a width, such as 8 bits, and the tool reads your bits as a signed value:
- 01111111 is 127, the largest 8-bit value.
- 10000000 is -128, the smallest.
- 11111111 is -1.
The same bits mean different numbers when read as signed or unsigned, so 11111111 is 255 unsigned but -1 signed. If you give fewer bits than the width, zeros are added on the left.
Useful numbers
An 8-bit unsigned value reaches 255, a 16-bit value reaches 65535, and a 32-bit value reaches 4294967295. Each extra bit doubles the range.
Batch conversion
Paste one binary number per line in the list box to convert many at once. Spaces and underscores in the digits are ignored.
Going the other way? Use decimal to binary. To get hex, use binary to hex. The guide covers two's complement in more detail.