Convert decimal to binary number in string
str = dec2bin(d)
str = dec2bin(d,n)
str = dec2bin(d) binary
representation of d as a string. d must
be a nonnegative integer smaller than 2^52.
str = dec2bin(d,n) produces
a binary representation with at least n bits.
The output of dec2bin is independent of
the endian settings of the computer you are using.
Decimal 23 converts to binary 010111:
bin2dec | dec2hex
Was this topic helpful?