Excel DEC2BIN Function

Using the Excel DEC2BIN Function


The Excel DEC2BIN function converts a decimal number to a binary number.


=DEC2BIN (number, [places])

Syntax Breakdown

Required. The number, in decimal format, that you wish to convert to a binary. Negative numbers are represented using two's-complement notation. If the number argument is negative, the places argument will be ignored and the function will return a 10 character (10 bit) binary number.

Optional. The number of characters to be used. If omitted, the function uses the minimum number of characters necessary. If the input is not an integer, it will be truncated.

Usage Notes

DEC2BIN converts a number from decimal format to its binary equivalent.

DEC2BIN Errors
The function will return an error in the following instances:

1) The #NUM! error if places is zero or negative

2) The #VALUE! error if places in non-numeric

3) The #NUM! error if number is < -512 or > 511

4) The #VALUE! error if number is non-numeric

5) The #NUM! error if not enough places are provided