<< dec2base elementary functions dec2hex >>

dec2bin


Convert decimal number to base 2.


Syntax


R = dec2bin(D)
R = dec2bin(D, N)

Input argument


D

a non negative integer smaller than the value returned by flintmax.

N

an integer value. number of digits.

Output argument


R

result of dec2bin: char array.

Description


dec2bin converts decimal number to base 2.

Example


Y = dec2bin(2)

See also


dec2base, bin2dec.

History


Version Description
1.0.0 initial version

Author


Allan CORNET

<< dec2base elementary functions dec2hex >>