Click the bits to build an 8-bit pattern. Below it you see the ideal square signal, the strength of each harmonic, and how the signal looks when only the first 1, 2, … 10 harmonics get through the channel.
Each bar is the amplitude √(an² + bn²) of harmonic n, a sine wave that repeats n times per period. Tall bars contribute most to the shape. Harmonic 8 is always zero for an 8-bit pattern, because it completes exactly one cycle per bit. Click a bar to work through its calculation below, or pick c (DC) there for the constant part.
g(t) = c/2 + Σn=1…N [ an sin(2πnft) + bn cos(2πnft) ], f = 1/T