FUNCTION REFERENCE

int2bit

Convert integers to column-wise bits.

Convert integers to column-wise bits.

Syntax

y = int2bit(x,n,msbfirst)

Default MSB first; false selects LSB first. Stacks n low bits per value down each column, preserving other dimensions. Signed inputs use two's complement. Floating input retains class (n <= 53 double, 24 single); signed integers produce int8, unsigned integers uint8 (n <= 64).

Example

int2bit([12 5],4)

Differences from MATLAB: logical input is rejected, as in the public input type list. Arrays use engine memory limits.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.