Convert from Integers to 2's Complement Binary in Matlab Nov 23, 2010 Here is how to convert from decimal numbers to binary 2’s complement in Matlab: binary_value = dec2bin(mod((dec_value),2^N),N); where N is the bit-width of binary number.