MATLAB Function Reference
  Go to function:
    Search    Help Desk 
dec2bin    Examples   See Also

Decimal to binary number conversion

Syntax

Description

str = dec2bin(d) returns the binary representation of d as a string. d must be a nonnegative integer smaller than .

str = dec2bin(d,n) produces a binary representation with at least n bits.

Examples

dec2bin(23) returns '10111'.

See Also

bin2dec     Binary to decimal number conversion

dec2hex     Decimal to hexadecimal number conversion



[ Previous | Help Desk | Next ]