
If Places is non-numeric, then DEC2BIN reports an invalid argument error (Err:502).If Number is a reference to an empty cell, DEC2BIN returns 0 (possibly with leading zeroes, depending on the value of Places).If, after any truncation, Number is outside the range specified, DEC2BIN reports an invalid argument error (Err:502).If Number is a non-integer value, then DEC2BIN truncates it to an integer.If Number is non-numeric (including an empty string), then DEC2BIN reports a #VALUE! error.The default for positive values of Number is for the returned string to occupy as many characters as necessary to accommodate the binary representation, but you can set the value of Places to add leading zeroes where necessary. Places is ignored for negative values of Number, when DEC2BIN always returns 10 characters. Places is an integer in the range 1 to 10, or a reference to a cell containing that value, which is the number of characters that should be returned for a positive Number. The decimal number should be an integer that is not less than -512 or greater than 512. Number is a string or a number, or a reference to a cell containing one of those types, which gives the decimal number that is to be converted to binary. Returns a text string comprising up to 10 binary digits (0 or 1), which is the binary number in two’s complement form that corresponds to the specified decimal number. The input decimal number must be in the range -512 ≤ d < 512.

Converts a decimal number (base-10) to its binary (base-2) equivalent.
