The Bell 202 modem (1976) was the first digital modem in widespread use. https://en.wikipedia.org/wiki/Bell_202_modem It uses "audio frequency shift keying" with the two frequencies being 1200Hz ("1") and 2200Hz ("0"). It is still used to transmit Caller ID on wireline phones and by ham radio operators in the ham radio bands. The choice of the frequencies 1200&2200 was a tiny bit unfortunate, because although a "1" consists of a single complete sinusoidal cycle, a "0" consists of *not quite* 2 complete cycles. Here's the rub: when you transition from a 0->1 or from a 1->0, you want the waveform to be *continuous*. So this means that you're going to have to adjust the *phase* of the sinusoid that you generate when you make the transition; i.e., you can't simply start at zero for every bit, else these discontinuities will generate high frequency noise which will widen the overall bandwidth used by the modem. Assuming that you're going to implement the "0" and the "1" by means of *tables* of *digital samples* of the appropriate sinusoids, how many tables do you need? * * * * * * * * * * * * * * * * ** * ------ I believe that 6 tables will be needed, because 11 full cycles of 2200Hz fit exactly 6 full cycles of 1200Hz. We need to keep a modulo 6 counter ("mod6") which keeps track of the number of "0" bits encountered. With each "0" bit, the mod6 counter is incremented, and we use this counter to index which sinusoid table. How come we don't have to keep track of the number of "1" bits? Extra credit: If the overall sampling rate is 6*1200=7200, then we can overlap all of the "0" tables together and index the samples using table0[mod(mod6+i,6)]; ditto for table1. Of course, 6 samples/sinusoid is pretty crude, but we can choose a sampling rate N*6*1200 for integer N>1 and then index the samples accordingly.