Hacker News new | ask | show | jobs
by gmueckl 2603 days ago
The spectrum of a signal is its Fourier transform. Only sine and cosine signals have a "pure" signal with a single frequency. Anything else decomposes into a whole host of spectral contributions. Square waves are especially bad because they require contributions from infinitely many harmonics to produce the steep flanks. That is also why a clean square wave cannot exist: some kind of band limit is always present, resulting in ringing around the flanks.

See also Fourier Analysis on the Wikipedia article: https://en.m.wikipedia.org/wiki/Square_wave