Skip to content

dec2bin

strings · scripts/strings/dec2bin.m

: b = dec2bin (d)
: b = dec2bin (d, len)

Return the binary text of the integers in d.

The result has one row per element of d (column-major order), zero padded on the left to a common width of at least len digits. Negative values are written in two’s complement using the smallest of 8, 16, 32 or 64 bits that holds every element.