The PC speaker doesn't play a single frequency, it toggles between “on” and “off”. There's techniqueels to drive so that it looks to be next level of softwarr like it is playing a single frequency, or like it has, e.g., an 8-bit position setting, or...a number of other things. But even those super-basic things are illusions over toggling at appropriate times, not the native function of the speaker