DEC2BIN

DEC2BIN binary representation of the decimal number x

Synopsis

DEC2BIN(x,places)

Arguments

x: integer (− 513 < x < 512)

places: number of digits

Description

If places is given and x is non-negative, DEC2BIN pads the result with zeros to achieve exactly places digits. If this is not possible, DEC2BIN returns #NUM!

If places is given and x is negative, places is ignored.

Note

If x < − 512 or x > 511, DEC2BIN returns #NUM!

Microsoft Excel Compatibility

This function is Excel compatible.

OpenDocument Format (ODF) Compatibility

This function is OpenFormula compatible.

See also

BIN2DEC, DEC2OCT, DEC2HEX.