function B = dec2bin_stack(N)
% N is decimal number, B is binary bits
B=''; % initialization
Quot = 1; % non 0 value
while (Quot ~= 0) Quot = floor(N/2);% quotient Resi = mod(N,2);% residue B = [num2str(Resi),B]; % save in stack N = Quot;% update N
end