Excel DEC2BIN function

Function              DEC2BIN

Description        Excel DEC2BIN function converts Decimal number system to Binary number system.

Syntax                  DEC2BIN(number, [places])

Number               is the decimal number

[places]               Optional. The number of characters to use. If places is omitted, DEC2BIN uses the minimum number of characters necessary. [places] is useful for showing the return value with leading 0s (zeros).

Example:

Usage Notes:

  • This function shows Binary value of decimal up to 9 places, 10 places if the number is a negative this means number should be between (-)512 to (+)511, otherwise DEC2BIN returns the #NUM! error value.
  • Converts negative integer up to -512 and converts by using two’s complement notation.
  • If number is nonnumerical, DEC2BIN returns the #VALUE! error value.
  • If you have mentioned the places in function and it requires more than places characters, it returns the #NUM! error value.
  • If places is not an integer, it shows #NAME? error.
  • If places is nonnumerical, DEC2BIN returns the #VALUE! error value.
  • If places is zero or negative, DEC2BIN returns the #NUM! error value.