If a square wave requires infinite bandwidth how can we display it on oscilloscopes?
Link: Oscilloscope fundamentals.
If a square wave requires infinite bandwidth how can we display it on oscilloscopes?
Link: Oscilloscope fundamentals.
We can't. We see a bandlimited version. That's obvious for two reasons:
You are correct that an ideal square wave needs an infinite bandwidth as it contains frequencies up to infinite frequencies.
But this is theory, ideal square waves do not exist in the real world as infinitely high frequencies do not exist either.
If you see a square wave on an oscilloscope that doesn't mean it is ideal. As long as it is close enough then that is also good enough.
For example, on an oscilloscope with a bandwidth of 100 MHz, a 1 MHz square wave will look more than good enough. The frequencies above 100 MHz will be attenuated but their signal content is quite small and do not affect the shape of the square wave that much.
The 'scope won't show a perfect squarewave and if you zoom in on the timebase you should be able to see the rising and falling edges with some slope on them. This will be most obvious on an analogue oscilloscope. The bandwidth will be limited by the input stage.
You can experiment with additive synthesises waveform generator such as the one below to gain an intuitive understanding.
Figure 1. The odd harmonic series generated by \$ \sin(\omega t) + \frac {\sin(3\omega t)} 3 + \frac {\sin(5\omega t)} 5 \frac {\sin(7\omega t)} 7 + \frac {\sin(9\omega t)} 9 + \frac {\sin(11\omega t)} {11} \$. Source Additive synthesis.
You can see that with just the series up to the 11th harmonic that the resultant waveform is beginning to show its squarewave form. You can play with this in the link above. Remember that the squarewave will have odd harmonics only.
Perfect square waves don't exist in the real world. They are a physical impossibility: it requires a signal to be two different values in the same time instant. Further, as the wave's transition time gets smaller, the power required to make transition gets larger, approaching infinity as the time approaches zero.
So basically, a perfect square wave is dividing by zero.
You can also think of a square wave as a sum of Fourier harmonics. As the number of harmonics increases, the squarewave sharpens. Infinite harmonics give a perfect square wave. We can think of this mathematically, but we could never construct such a signal.
Even if we could, such a perfect square wave would need infinite bandwidth to represent it. Physical devices (like oscilloscopes) don't have that, be they digital or analog.
Square waves on oscilloscopes are due to the lines being drawn between sample points, but those lines are a fiction. It is convenient and useful to see a signal as continuous, but the scope only has the sampled points as real data, and anything in between is a construction. In all but the most basic scopes you can choose between linear interpolation and (sin x)/x interpolation (also called sinc). EEVBlog has a video explaining and illustrating this.
Dot mode doesn't have this problem but is much harder to see on the screen. If you use it, it becomes more obvious that the dots (samples) must be seperated in time by the sampling period, so you cannot have a dot directly above (true vertical) another dot of the same signal, so you cannot have true square waves in the scope.
Given any circuit has some equivalent noise resistance, which may vary with frequency, a circuit with infinite bandwidth will require zero capacitance and will produce infinite noise energy. Up to about 200 terahertz.
Thus we exploit the finite bandwidth of any circuit, knowing that any non-zero size of metallic structures has non-zero parasitic capacitance, and thus requires non-zero energy to impose changes of electric fields (called a signal, or your square wave) upon the metallic pieces.
That finite bandwidth, because of the non-zero size, limits the rise and fall time of the circuitry.
Well, first of all, an oscilloscope doesn't display in the frequency space, it displays in the time space.
Second, oscilloscopes have finite resolution, both in physical location on their screen, or in time space. Since the higher frequencies of a square wave have lower amplitudes, at some point they get aliased out.
You cannot create a perfect square wave either... That's a mathematical construct.
What you can realize by using physical hardware is a bandlimited approximation to it. And what you see on your oscilloscope may also be a further bandlimited copy of it...
There is NO physical square wave in real life.
The Oscilloscope only sees a crude approximation as the mathematicians would describe the electronic 'square' wave.