function signal_pad = power2pad(signal,def_N)

    signal_pad = signal/max(signal);
    sig_len = length(signal);
    sig_len1 = sig_len;
    
    if(nargin < 2)
        def_N = 11;
    end
    N = 0;

    while(sig_len1 > 1)

        sig_len1 = floor(sig_len1/2);
        N = N+1;
    end

    if(N < def_N)
        zero_len = (2^def_N) - sig_len;

        signal_pad(end+1:end+zero_len) = 0;
    else
        zero_len = ((2^(N+1))-sig_len);

        if(zero_len >= 1)
            signal_pad(end+1:end+zero_len) = 0;
        end
    end
end