Zero Padding

A technique employed to make the input sequence size equal to a power of 2 is to add zeros to the end of the sequence so that the total number of samples is equal to the next higher power of 2. For example, if you have 10 samples of a signal, you can add six zeros to make the total number of samples equal to

,

as shown in the following illustration.

The addition of zeros to the end of the time domain waveform does not affect the spectrum of the signal. In addition to making the total number of samples a power of two so that faster computation is made possible by using the FFT, zero padding also helps in increasing the frequency resolution (recall that f = fs/N) by increasing the number of samples, N.