The first IBM Personal Computer, model 5150, employed a standard 2.25 inch magnetic driven (dynamic) speaker.
For example, the Video BIOS usually cannot activate a graphics card unless working RAM is present in the system while beeping the speaker is possible with just ROM and the CPU registers.
The PC speaker is normally meant to reproduce a square wave via only 2 levels of output (two voltage levels, typically 0 V and 5 V), driven by channel 2 of the Intel 8253 (PC, XT) or 8254 (AT and later) Programmable Interval Timer operating in mode three (square wave signal).
The speaker hardware itself is directly accessible via PC I/O port 61H (61 hexadecimal) via bit 1 and can be physically manipulated for 2 levels of output (i.e. 1-bit sound).
However, by carefully timing a short pulse (i.e. going from one output level to the other and then back to the first), and by relying on the speaker's physical filtering properties (limited frequency response, self-inductance, etc.
With the PC speaker this method achieves limited quality playback, but a commercial solution named RealSound used it to provide improved sound on several games.
[9] The audio fidelity of this technique is further decreased by the lack of a properly sized dynamic loudspeaker, specially in modern machines and particularly laptops that use a tiny moving-iron speaker (often confused with piezoelectric).
The reason for this is that PWM-produced audio requires a low-pass filter before the final output in order to suppress switching noise and high harmonics.