b = de2bi(d) converts a nonnegative decimal integer d to a binary row vector. If d is a vector, the output b is a matrix in which each row is the binary form of the corresponding element in d.
b = de2bi(d,n) has an output with n columns.
b = de2bi(d,n,p) converts a nonnegative decimal integer d to a base-p row vector.
b = de2bi(d,,p) specifies the base, p .
b = de2bi(d,...,flg) uses flg to determine whether the first column of b contains the lowest-order or highest-order digits.
Decimal input which can be a scalar, vector, or matrix. Specify elements as nonnegative integers. If d is a matrix, it is treated like the column vector d(:).
To ensure an accurate conversion, d must be less than or equal to 252.
The number of output columns specified as a positive scalar. If necessary, the binary representation of d is padded with extra zeros.
An integer that specifies the base of the output b. Specify as an integer greater than or equal to 2. The first column of b is the lowest base-p digit. The output is padded with extra zeros if necessary so that it has n columns. If d is a nonnegative decimal vector, the output b is a matrix in which each row is the base-p form of the corresponding element in d. If d is a matrix, de2bi treats it like the vector d(:).
Character vector that determines whether the first column of b contains the lowest-order or highest-order digits. If omitted, de2bi assumes 'right-msb'.
Binary representation of d in the form of a row vector or matrix.
Convert decimals 1 through 10 into their equivalent binary representations.
Convert 3 and 9 into binary numbers. Each value is represented by a four-element row.
Repeat the conversion with the number of columns set to 5. The output is now padded with zeros in the fifth column.
Convert the decimals 1 through 6 to their base 3 equivalents. Set the leftmost bit as the most significant digit.