
function demo_conv

n=10;
c=dec2two(n)


function c=dec2two(n)

j=1; t=n; divs=0;

while t > 0
    q=t/2; t=floor(q);
    if t == q
        c(j)=0;
    else
        c(j)=1;
    end
    j=j+1;
    divs=divs+1;
end

divs
log2(n)

