Read a bit pattern as an ordinary decimal number
The binary to decimal page is for bit strings that need to be explained in everyday base 10. Binary is exact for switches, flags, and digital logic, but decimal is easier to compare when writing notes, checking homework, or discussing a value with someone who is not reading raw bits.
This converter keeps the task narrow: enter binary digits, optionally with a 0b prefix, and get the decimal integer. It is useful for short classroom values as well as longer bit patterns copied from firmware notes, networking material, or programming examples.
How to convert binary to decimal
- Paste the binary value using only 0 and 1, or keep a supported 0b prefix if the value came from code.
- Use a new line when converting several bit strings so each decimal result stays aligned with its source.
- Check the output for the sample value first if you are teaching or documenting the process.
- Remove spaces inside a single binary number unless those spaces are intended to separate multiple values.
- Decide whether the source is unsigned or two's-complement before treating the result as signed.
Binary to decimal examples
| Input | Result | Why it matters |
|---|---|---|
1010 |
10 |
A simple four-bit classroom example. |
11111111 |
255 |
Eight set bits in an unsigned byte. |
0b100000 |
32 |
A power-of-two value written with a code prefix. |
Binary input rules
Binary values only contain 0 and 1. Digits such as 2 or 9 are valid decimal digits, but they are not valid binary digits, so the page rejects them. That helps catch accidental pastes from a decimal or hexadecimal source.
Grouping can be useful for humans, but this page treats separators as boundaries between values. If you want 1111 0000 to mean one byte, paste it as 11110000. If you leave the space, the converter treats it as two separate values.
How the decimal value is built
Each binary position is a power of two. In 1010, the leftmost 1 contributes 8, the next 0 contributes nothing, the next 1 contributes 2, and the final 0 contributes nothing. The total is 10.
Longer bit strings follow the same rule. The converter performs that positional calculation directly with integer arithmetic, so it does not lose precision on values that are larger than ordinary JavaScript floating-point numbers.
Common binary to decimal workflows
- Checking digital logic examples and truth-table exercises.
- Reading permission bits, feature flags, and compact status values.
- Converting packet or protocol examples into decimal fields.
- Explaining a bit pattern in documentation without asking readers to calculate it manually.
Accuracy notes
The same binary digits can mean different signed values at different widths. For example, 11111111 is 255 as an unsigned value, but it is -1 in signed 8-bit two's-complement. This page returns the unsigned mathematical value unless a minus sign is present.
Leading zeroes do not change the decimal value. They may still be important in a protocol table or register map, so keep the original binary text nearby if display width matters.
Related tools
If this page is close but not exactly the operation you need, the related converters below cover adjacent intents without mixing every feature into one crowded interface. You can move from binary to decimal to Hex to Decimal, Decimal to Hex, Binary Converter, Hex Converter. Keeping each page centered on one core task makes the tool faster to use and makes the explanation easier to follow.
Frequently asked questions
Can I use a 0b prefix?
Yes. 0b1010 is accepted and returns 10.
Why are spaces treated as separate values?
The page supports batch conversion, so spaces, commas, and line breaks separate entries.
Does it support fractional binary numbers?
No. This page is for whole-number binary integers.