Convert integer datatype to a binary string and back.
int2bin(X) returns the binary representation of X as a string. X must be an integer datatype and non-negative. Unlike Matlab's dec2bin, int2bin supports int64 and uint64 values of X greater than 2^52.
bin2int(S) returns the integer value represented by the binary string S. The class of the output is the minimum unsigned integer class that supports the number of bits in the binary string. Unlike Matlab's bin2dec, bin2int supports binary strings with up to 64 bits.
Andrew Horchler (2022). int2bin - bin2int (https://github.com/horchler/int2bin-bin2int), GitHub. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!