Binary to Decimal Converter
Type a binary number and read its decimal value, along with hex and octal, as you type.
Convert Binary to Decimal Online
Binary is how computers store every number: a string of bits, each worth twice the one to its right. Reading it as a decimal number is a daily need in networking, embedded work and computer science courses. This page is the Number Base Converter with binary selected as the input base.
The method, step by step
Take 101010. From the right, the positions are worth 1, 2, 4, 8, 16 and 32. Add the values where the digit is 1:
| Digit | 1 | 0 | 1 | 0 | 1 | 0 |
|---|---|---|---|---|---|---|
| Worth | 32 | 16 | 8 | 4 | 2 | 1 |
| Counts | 32 | 0 | 8 | 0 | 2 | 0 |
32 + 8 + 2 = 42, so binary 101010 is decimal 42.
Values worth remembering
| Binary | Decimal | Hex |
|---|---|---|
1111 | 15 | F |
11111111 | 255 | FF |
10000000 | 128 | 80 |
1111111111111111 | 65535 | FFFF |
Four binary digits always make one hex digit, which is why programmers write long bit patterns in hex.
Where binary numbers turn up
- Networking: a subnet mask such as 255.255.255.0 is 24 ones followed by 8 zeros.
- Permissions and flags: each bit switches one option on or off, so 101 means options 1 and 3.
- Hardware registers and protocol headers, where a datasheet lists fields bit by bit.
- Exams and courses, where converting by hand is part of the syllabus; the table above shows the working.
Other directions
For the reverse, use decimal to binary. For hex dumps and colour codes, hex to decimal opens the same converter with hex input.