Binary to Decimal

Encoders & Decoders

How to use the Binary to Decimal

Convert binary to decimal in two steps:

1

Enter the binary number

Type or paste any binary number using 0 and 1 digits. Spaces and underscores between nibble groups are ignored automatically (e.g. '1010 1010' works fine).

2

Read the result

The decimal result appears instantly below. The 'Also represented as' panel shows the same value in hex, octal, and other formats.


When to use this tool

Use to convert binary values encountered in programming and computer science:

  • Reading binary values from bitfield registers, hardware documentation, or embedded systems datasheets
  • Converting binary output from debuggers, memory dumps, or network packet captures to readable decimal values
  • Checking the decimal value of a binary flag combination in a bitmask operation
  • Verifying binary-to-decimal conversions when learning computer science or preparing for technical interviews
  • Translating binary representation of ASCII character codes to decimal for character encoding work
  • Converting binary color component values (e.g. 11111111 = 255) when working with image processing or graphics

Frequently asked questions

Q:How does binary to decimal conversion work?
Each binary digit (bit) represents a power of 2, starting from 2⁰ (= 1) at the rightmost position. To convert, multiply each bit by its positional power of 2 and sum the results. For example, 1010 = 1×2³ + 0×2² + 1×2¹ + 0×2⁰ = 8 + 0 + 2 + 0 = 10. The tool uses JavaScript's BigInt for arbitrary precision, so it handles numbers of any size correctly without floating-point errors.
Q:Can I enter binary with spaces between groups?
Yes — spaces and underscores used for readability grouping (e.g. '1010 1010', '1111_0000', or '1010 1111 0000 0101') are automatically stripped before conversion. This lets you paste binary from documentation or datasheets that use nibble (4-bit) or byte (8-bit) grouping without manually removing the separators.
Q:What is the maximum binary number I can convert?
There is no practical limit — the tool uses JavaScript's BigInt type which supports integers of arbitrary size. You can convert binary numbers with hundreds or even thousands of bits and the decimal result will be exact. Normal JavaScript numbers (floating-point) would lose precision for numbers beyond 2⁵³, but BigInt avoids this entirely.
Q:Why does the 'Also represented as' panel show a bit length category?
The bit length annotation (8-bit, 16-bit, 32-bit, 64-bit) shows which common CPU register or data type width contains this value. A number with 8 or fewer bits fits in an 8-bit byte. Up to 16 bits fits in a 16-bit short integer. This context is useful when working with hardware registers, protocol fields, or fixed-width integer types in C, Java, or Rust.
Q:What is the difference between binary and decimal?
Decimal (base 10) uses ten digits (0–9) and is the number system humans use daily. Binary (base 2) uses only two digits (0 and 1) and is the native language of computers because electronic circuits can represent two states (on/off, high/low voltage) reliably. Every decimal number has a unique binary representation, and all computer memory, files, and processing are fundamentally binary at the hardware level.
Q:How do I convert a binary number to decimal manually to verify the result?
Write out the binary number and number the positions from right to left starting at 0. For each 1-bit, calculate 2 raised to that position number. Sum all those values. Example: 1101 = 2³ + 2² + 2⁰ = 8 + 4 + 1 = 13. For 0-bits, the contribution is 0 and can be skipped. The result is always a positive integer (this tool handles unsigned binary — for two's complement signed binary, the interpretation depends on the bit width).