DEC2BIN


Description Converts a decimal number (base 10) to a binary number (base 2).

Syntax DEC2BIN ( integer [, places])
Argument Description
integer Any negative or positive whole number or zero. For the purposes of this function, the integer entered must be small enough to convert within the limits of the target. Any integer between -512 and 511 may be used.
places Optional number of characters to use in the output. If places is omitted, the function returns the number of spaces required to display the result. The places argument can be used to 0-pad a positive number.If the number is negative, places is ignored and 10 characters are returned.

Remarks The result of this function is a text string.

Examples This function returns 100000000:

DEC2BIN(256)

This function returns 1000000000:

DEC2BIN(-512)

This function returns 01010

DEC2BIN(10,5)

See Also BIN2DEC, BIN2HEX, BIN2OCT, DEC2HEX, DEC2OCT, HEX2BIN, HEX2DEC, HEX2OCT, OCT2BIN, OCT2DEC, OCT2HEX