A Digital Spectral Analysis Technique and Its Application to Radio Astronomy