Hello, I want to convert integers in the range -400 to +800 to 12 bit binary and vice versa.
dec= -333;a= decimalToBinaryVector(typecast(int16(dec),'uint16'),16);str_x = num2str(a);b=typecast(uint16(bin2dec(str_x)),'int16')
The above code gives me 16 bit Binary value. I want to convert the integer to 12 bit binary and vice versa.
Best Answer