function temp=dec(A)
temp=0;
k=length(A);
for ii=k:-1:1,
    temp=temp+A(ii)*2^(k-ii);
end