:Square wave:

A complex waveform which, ideally, switches instantaneously between two amplitude levels. An approximation to a perfect square wave can be synthesised by adding sine waves according to the following formula:

where F = the fundamental frequency. The more components one adds, the better the approximation to a perfect square wave.