Skip to main content
Version: Streamsheets 3.0

DEC.TO.BIN

Converts a decimal number to binary.

Syntax

=DEC.TO.BIN(Number, [Places])

Arguments

NameTypeDescription
NumberNumberThe decimal number to convert.
Places (optional)NumberThe number of characters to use for returned value. If value has less characters then it is padded with leading zeros.

Return

TypeDescription
Number or ErrorThe binary number or a #NUM! error if given number is not a valid decimal number. The #VALUE! error is returned if specified places is not numeric or negative.

Examples

FormulaResultComment
=DEC.TO.BIN(9)
1001converts decimal 9 to binary
=DEC.TO.BIN(9, 6)
001001converts decimal 9 to binary with 6 characters