Contact

BIN2DEC in Excel: Decode Binary and Understand Signed Width

Engineering Intermediate Microsoft Excel

Convert binary inputs to decimal in Excel and distinguish short positive bit strings from the signed ten-bit two-complement format.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: BIN2DEC(number) converts a binary representation of up to ten characters to a decimal value. Its signed convention is ten-bit two’s complement, so a full ten-bit input beginning with 1 represents a negative number.

Availability and version history

  • Introduced: the first introduction version is not established by the reviewed official history.
  • Availability: official help lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac, Excel 2021, Excel 2021 for Mac, Excel 2019, Excel 2016.
  • Checked: October 14, 2026; official BIN2DEC reference. Documentation and independent models; no native Excel execution or wider platform certification.

Syntax and the width rule

=BIN2DEC(number)

The single argument is required. Valid binary digits are 0 and 1, with at most ten characters. Microsoft documents #NUM! for invalid binary inputs or inputs longer than ten characters.

The width matters. Microsoft’s example converts the shorter string 1100100 to positive 100 even though its first digit is 1. At the full ten-bit width, 1111111111 converts to −1. Do not treat the first digit of every short string as a sign bit.

For a full-width negative input, the two’s-complement calculation is its unsigned positional value minus 1024, or 2^10. Although the reference describes nine remaining bits as magnitude bits, the conversion is not sign-and-magnitude notation. For example, 1000000000 is −512, not negative zero.

Example 1: decode a small binary import

Format A2:A7 as Text before entering the following strings, or prefix each entry with a worksheet apostrophe. The apostrophe is an input marker and is not part of the stored string.

A, binary text Expected decimal
0 0
1 1
1010 10
001010 10
11111111 255
111111111 511

In B2 enter and fill through B7:

=BIN2DEC(A2)

The two strings 1010 and 001010 have the same positional value: 8+2=10. Leading zeros can preserve an external field width without changing this value. Retain column A if that original representation matters.

For a constant, use =BIN2DEC("1010"), which also returns 10. Quoting makes clear that the digits describe a base-2 representation. Ordinary decimal 1010 is a different quantity from the decoded value 10.

Example 2: inspect the signed boundary

Enter these exact strings in D2:D5 as Text and use =BIN2DEC(D2) in E2, filling down:

Binary text Unsigned positional value BIN2DEC result
0111111111 511 511
1000000000 512 -512
1111111110 1022 -2
1111111111 1023 -1

The last three results subtract 1024 from the unsigned value. This is a fixed-width encoding; the final nine digits are not a standalone positive magnitude with a minus sign attached.

A particularly useful comparison is =BIN2DEC("111111111"), returning 511, versus =BIN2DEC("1111111111"), returning −1. Adding one more leading 1 changes the width and enters the signed region.

Advanced example: round-trip values without losing the original text

Enter −100, −1, 0, 10 and 511 in G2:G6. In H2 use =DEC2BIN(G2,10) and fill down. The expected representations are:

Decimal Ten-character representation
-100 1110011100
-1 1111111111
0 0000000000
10 0000001010
511 0111111111

In I2 enter =BIN2DEC(H2) and fill down. The original five decimal values are recovered. DEC2BIN has its own input interval, −512 through 511, which matches this signed format.

The reverse text round-trip is different. =DEC2BIN(BIN2DEC("001010")) gives the minimal representation 1010, not the original six-character string. Supply the intended width explicitly when that is a requirement. A numeric conversion cannot remember how many leading zeros appeared in an import.

Validation and common errors

=BIN2DEC("102") has a documented invalid-digit #NUM! result. An eleven-character string such as "00000000001" also exceeds the documented character limit, even though its positional value would be only 1.

The maximum positive decoded value is 511, not 1023. If a source file defines an unsigned ten-bit field, do not silently decode its high-half values with this signed converter. DECIMAL addresses a different radix-conversion use case; verify that function’s own rules before changing the import.

For actual bit masks already stored as decimal integers, use BITAND or the shift functions rather than treating decimal digits as binary notation. Whitespace, numeric-text coercion beyond these explicit strings and native error precedence were not tested here.

References and verification

Expected outputs are independently calculated examples or documented rules, not captured native Excel results. Formulas use English function names and comma argument separators. Locale, rendering and boundary restrictions are stated where relevant.