function xxx = decpt2bin(xx)
%The function converts column-wise if an array is provided.
%Range 1024.999 i.e.1024999 to 20 bit number
if(xx>1024.999)
    xxx=(dec2bin(0,20));
    return;
else
    yy=abs(xx*1000);
    xxx=(dec2bin(yy,20));
end