dec2bin
Convert decimal integer to its binary representation
描述
binStr = dec2bin(
returns the binary, or base-2, representation of the decimal integerD
)D
. The output argumentbinStr
是一个字符acter vector that represents binary digits using the characters0
and1
.
IfD
is a numeric vector, matrix, or multidimensional array, thenbinStr
is a two-dimensional character array. Each row ofbinStr
represents an element ofD
.
Examples
Input Arguments
Tips
The output of
dec2bin
is the same whether your computer stores values in memory using big-endian or little-endian format. For more information on these formats, seeEndianness.