MATLAB: Edit:Value Exceeeds while dividing

division

I have 16 bit values and 14 bit values of same size
A=16 bit values ,B=14 bit values
i have sorted suxh a way that maximum value of 14 bit comes under max valu of 16 bit and so on,finally minimum of 14 bit comes min of 16 bit
used command as
[~,idx]=sort(A)
[~,idx1]=sort(idx)
C=B(idx1);
Dw=C./Cw
Dw=Dw*100;
the value of Dw exceeds 5 bit ,plese tell why i get this
suppose if max of 14 bit 8192/max of 16 bit 32767 we get 25 ,which is a 5 bit ,then why get more than 5 bit,please help

Best Answer

[~,i1] = sort(A);
B1 = sort(B);
[~,i2] = sort(i1);
C = B1(i2);