In the wavelet analysis of a signal, if we represent a digital signal in some resolution sampling space, we can use Mallet's algorithm to decompose the digital signal into wavelet components of varingresolution and a vague lowpass spectrum component. In this paper, we discuss a general algorithm of the digital signal representation in some resolution sampling space based on Shannon's sampling theorem, and give the method of how to control the approximating error by choosing the sampling rate. At the end of the paper we offer two computing examples.