Generate binary data

generate binary data b_k using randint.
2. define the sampling time, and the data rate. For example, data rate can be R=10kbps, T=1/R, and sampling time Ts=T/40;
3. according to the above define your pulse shape (wave form of the different line codes).
4. obtain the x(t)=\sum_{k=-100}^{100} d_k p(t-kT)
d_k should be correctly mapped from the b_ks generated above.
5. plot the resulting x(t) for the different line codes.
6. obtain the autocorrelation function of x(t) (you may need to average over many realization (10-50 realizations should be enough to get smooth curve).
7. obtain the power spectral density by performing FFT of the autocorrelation function.
8. plot the power spectral density.