DEC2BIN

The DEC2BIN function converts a decimal number to the corresponding binary number.

DEC2BIN(decimal-string, convert-length)

decimal-string: The string value representing the number to be converted. decimal-string must contain only the numbers 0 through 9.

convert-length: An optional number value specifying the minimum length of the number returned. convert-length must be in the range 1 to 32. If convert-length is omitted, it is assumed to be 1. If it is included, the number returned is padded with leading zeros, if necessary, so that it is at least the length specified by convert-length.

Notes

Examples

=DEC2BIN(100) returns 1100100.

=DEC2BIN(“1001”, 12) returns 001111101001.

=DEC2BIN(-100) returns 11111111111111111111111110011100.

See also
BIN2DEC
DEC2HEX
DEC2OCT
HEX2BIN
OCT2BIN