Convert decimal number to character array representing binary number

`binStr = dec2bin(`

returns the binary, or
base-2, representation of the number `D`

)`D`

. The output argument
`binStr`

is a character vector that represents binary digits using the
characters `'0'`

and `'1'`

.

If `D`

is a numeric vector, matrix, or multidimensional array, then
`binStr`

is a two-dimensional character array. Each row of
`binStr`

represents an element of `D`

.

If the input argument

`D`

has a value greater than the value returned by`flintmax`

, then`dec2bin`

might not return an exact representation.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, see Endianness.