Well, what you wrote is based on ignorance of signal processing (don't worry, I'm at best a dilettante myself!)
The basic waveform is, per Fourier analysis, a sine wave. Any other waveform is composed of a fundamental sine wave plus higher frequency sine waves. A perfect square wave requires composition of an infinite number of sine waves, and hence also requires an infinite bandwidth and as such is not physically realizable!
When human hearing is stated as being capable of recognizing frequencies up to 20kHz, the waveform is implicitly a sine wave. It's not possible to hear a 20kHz square wave, because what makes it a square wave is the addition of higher frequency sine waves which are inaudible.
Nyquist's sampling theorem, on which digital audio is based, states that to perfectly reconstruct a band-limited signal, the sampling frequency must be at least twice the highest frequency component[*] of the signal. That means that to capture a 20kHz band-limited signal, it is necessary that the sampling frequency be above 40kHz, but if this is fullfilled, a 20kHz sine wave can be perfectly reconstructed! However, a 20kHz square wave _cannot_ be captured without aliasing because of the higher frequency sine waves present, it is in fact not band-limited to 20kHz!
[*] Actually the Nyquist theorem really states that the sampling frequency must be at least twice the bandwidth of the signal. It's possible to perfectly sample a single 20Khz sine wave with a much, much lower sampling frequency, but the signal will be folded down, which is not actually destructive as long as there aren't other frequency components interfering. This form is known as "undersampling" and is used in some radio receivers to down-convert the signal.