You can write the algorithm; the DFT equation which is:
X(W) = x(0)*exp(-j*0*W)+ x(1)*exp(-j*1*W)+..... untill N-1 where N is the number of samples after which the spectrum is periodic (sampling frequency). In this case you'll take only two time samples one of them is zero valued that result having an impulse at frequency of 1000 Hz.