I have been reading this in a book, but can't understand how he used the 8-bit in fourier series equation to get the result below.
The transmission of the ASCII character ‘‘b’’ encoded in an 8-bit byte. The bit pattern that is to be transmitted is 01100010. The Fourier analysis of this signal yields the coefficients:
an =(1/πn)[cos(πn/4) − cos(3πn/4) + cos(6πn/4) − cos(7πn/4)]
bn = (1/πn)[sin(3πn/4) − sin(πn/4) + sin(7πn/4) − sin(6πn/4)]
c = 3/4
I mean if I want to transmit letter 'a' for example, in ASCII Code it's 97 and in 8-bit is 0110 0001. How can I get its Fourier equation? Any help would be appreciated!
If you write the (periodic) function $f(t)$ corresponding to the bit pattern as a Fourier series
$$f(t)=\frac{a_0}{2}+\sum_{n=1}^{\infty}a_n\cos(2\pi nt/T)+\sum_{n=1}^{\infty}b_n\sin(2\pi nt/T)$$
with
$$a_n=\frac{2}{T}\int_{0}^Tf(t)\cos(2\pi nt/T)dt\tag{1}$$ and $$b_n=\frac{2}{T}\int_{0}^Tf(t)\sin(2\pi nt/T)dt\tag{2}$$
Then you get for the coefficient $a_0$ (which is called $c$ in your question)
$$a_0=\frac{N}{4}$$
where $N$ is the number of $1$'s in the byte (regardless of their position). For $n>0$ evaluating the integrals (1) and (2) is trivial because $f(t)$ is piecewise constant. For every $1$ at position $k$, $0\le k< 8$ (from left to right), there is a contribution of
$$\frac{2}{T}\int_{kT/8}^{(k+1)T/8}\cos(2\pi nt/T)dt=\frac{2}{T}\frac{T}{2\pi n}\sin(2\pi nt/T)\Big{|}_{kT/8}^{(k+1)T/8}=\\= \frac{1}{n\pi}\left[\sin\left(\frac{n\pi}{4}(k+1)\right)-\sin\left(\frac{n\pi}{4}k\right)\right]$$
to $a_n$, and for $b_n$ there is a contribution
$$\frac{2}{T}\int_{kT/8}^{(k+1)T/8}\sin(2\pi nt/T)dt=-\frac{2}{T}\frac{T}{2\pi n}\cos(2\pi nt/T)\Big{|}_{kT/8}^{(k+1)T/8}=\\= \frac{1}{n\pi}\left[\cos\left(\frac{n\pi}{4}k\right)-\cos\left(\frac{n\pi}{4}(k+1)\right)\right]$$
So for the byte $01100010$ we have $1$'s at positions $k=\{1,2,6\}$, which gives
$$a_n=\frac{1}{n\pi} \left[ \sin\left(\frac{2n\pi}{4}\right)-\sin\left(\frac{n\pi}{4}\right) + \sin\left(\frac{3n\pi}{4}\right)-\sin\left(\frac{2n\pi}{4}\right) + \sin\left(\frac{7n\pi}{4}\right) -\sin\left(\frac{6n\pi}{4}\right) \right]=\\ = \frac{1}{n\pi} \left[ -\sin\left(\frac{n\pi}{4}\right) + \sin\left(\frac{3n\pi}{4}\right) -\sin\left(\frac{6n\pi}{4}\right) + \sin\left(\frac{7n\pi}{4}\right) \right]$$
In the same way, we obtain for $b_n$
$$b_n=\frac{1}{n\pi} \left[ \cos\left(\frac{n\pi}{4}\right) - \cos\left(\frac{3n\pi}{4}\right) +\cos\left(\frac{6n\pi}{4}\right) - \cos\left(\frac{7n\pi}{4}\right) \right]$$
These results are the same as in your question, apart from the fact that the coefficients $a_n$ and $b_n$ are defined the other way around.