dec2bin() Function

Converts a Decimal number to a Binary number as text.

Syntax

dec2bin( value, [place] )

value: (Text) Decimal value to convert, such as 123.

place: (Number) The number of places to return.

Returns

Text

Notes

Negative number values for value are handled using the 2's complement method.

The default value for place is however many places are necessary to represent the number.

Examples

dec2bin(16) returns 10000

Open in Github Built: Thu, Feb 23, 2023 (02:59:22 PM)

On This Page

FEEDBACK