If a square wave has infinite bandwidth, how can we see it on an oscilloscope?

If a square wave requires infinite bandwidth how can we display it on oscilloscopes?

• If you zoom in you will see that the rise time and fall time are finite. Therefore, what you observe on the oscilloscope is not a perfect square wave with infinite bandwidth. Instead it is an imperfect square wave with finite bandwidth. Commented Nov 16, 2020 at 19:05
• Another fundamental reason no-one's mentioned is that you would need infinitely small pixels to fully define an infinitely sharp squarewave (which our eyes couldn't resolve anyway), but because most modern scopes have pretty chunky pixels (e.g. compared to phones), edges that only slope a fraction get rounded up to a single, straight line of pixels so you lose a bit of the finer details (analog scopes had more effective "pixels" but then had focus issues to worry about). As a wise man once said "There are lies, damned lies, and what's on the screen of the oscilloscope"
– Sam
Commented Nov 16, 2020 at 21:57
• Old fart here from the analog oscilloscope days. When the transition times for a square wave are very short, the edges of the square wave get fainter. The maximum slope (delta voltage over delta time) sets an upper limit on how faint the trace can be. Commented Nov 17, 2020 at 19:30
• @Sam Do oscilloscopes have pixels? youtube.com/watch?v=Ea6tw-gulnQ Commented Nov 17, 2020 at 20:23
• @Acccumulation Oh yes, absolutely, it doesn't really matter what you call them, but there is always a finite limit to the screen's ability to define an image (a sub-pixel is still a singular item). Even the old analog scopes of yore had a resolution in the sense that each "pixel" represented each grain of phosphor on the display and a pixel that is half on and half off blurs into one that is half as bright because of light bleed, otherwise we'd just have one continuous film but even then we'd still have a finite resolution, it's just that each pixel is now one atom in size...
– Sam
Commented Nov 17, 2020 at 21:50

We can't. We see a bandlimited version. That's obvious for two reasons:

1. perfect square signals cannot physically exist, for changing a voltage within 0 time would require an infinite amount of power
2. Your oscilloscope has an analog front-end low-pass filter. Its bandwidth is probably printed somewhere prominent on the front panel.
• Do analog scopes have a purpose-designed front-end filter, or is the claimed bandwidth merely the highest frequency at which factors like slew rate won't prevent a scope from meeting other published specifications for accuracy, etc. Commented Nov 16, 2020 at 17:33
• @ThePhoton: Anti-aliasing would be needed on digital scopes, but I wouldn't think analog scopes would need them. Commented Nov 16, 2020 at 17:42
• @supercat, It's 2020. If someone doesn't specify "analog" when talking about scopes, I assume they mean digital. Commented Nov 16, 2020 at 17:43
• @ThePhoton: My question was "do analog scopes..." Digital scopes can display things however their designers want them to display things, so I think the original question is worth answering for both kinds of scopes. Commented Nov 16, 2020 at 17:48
• @ThePhoton Well, he did specify "analog scopes" right in the first sentence :) But yeah, I checked service manual for Tektronics 2245a and at least that analog scope had no explicit low pass filter. It does have a kind of a frequency equalizer circuit to tune response, though.
– jpa
Commented Nov 16, 2020 at 17:48

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.

• Actually they don't require to be different in the same instant. it requires that the left limit be of one value and the right limit be another (in other words, a discontinuity) Commented Nov 17, 2020 at 15:56
• That’s the point: the zero-time interval between the two states is impossible to express: like division by zero, it is undefined. Call it a discontinuity if you want, same thing. Commented Nov 17, 2020 at 20:34

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.

• You may have grown up in the digital age. Analogue scopes are rather different. Commented Nov 16, 2020 at 12:14
• Fair point, but the question didn't specify analogue scope, at least when I saw it. The linked document covered both types, but as The Photon says in his comment to Marcus' answer, I assumed they meant digital. Commented Nov 16, 2020 at 18:29
• This ought to be qualified with 'digital'. "Analog" oscilloscopes are still in use. Commented Nov 18, 2020 at 19:18

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.