How to convert binary to decimal
Each binary digit is worth twice the one to its right. For 1101: 1×8 + 1×4 + 0×2 + 1×1 = 13. Type the binary number into the Binary box and the decimal, hex and octal values appear instantly.
Quick reference
| Decimal | Binary | Hex | Octal |
|---|---|---|---|
| 10 | 1010 | A | 12 |
| 15 | 1111 | F | 17 |
| 16 | 10000 | 10 | 20 |
| 100 | 1100100 | 64 | 144 |
| 255 | 11111111 | FF | 377 |
| 1024 | 10000000000 | 400 | 2000 |
Prefixes like 0x, 0b and 0o are accepted, and spaces or underscores between digits are ignored. Numbers are handled with BigInt, so a 256-bit value converts exactly.
Questions people ask
How do I convert decimal to hex?
Type the decimal number into the Decimal box. The hexadecimal value appears in the Hexadecimal box, ready to copy.
Can it handle negative numbers?
Yes, with a minus sign. It doesn't show two's complement; for that, convert the positive value and invert the bits for your word size.
What bases are supported?
Binary, octal, decimal and hex are always shown, and the last box can be set to any base from 2 to 36, such as base 36 for short IDs.