b01b10b21b31MAPRX1b = np.reshape(bits, (-1, 4))2I = (2*b[:,0]-1)*(3-2*b[:,1])3Q = (2*b[:,2]-1)*(3-2*b[:,3])4s = I + 1j*Q1011 → (+3, +1)(+3.00, +1.00) → 10111011I +3Q +1
−3−1+1+3−3−1+1+3I (in-phase)Q (quadrature)CONSTELLATION00000001001000110100010101100111100010011010101111001101111011110123101101234−3−1+1+3t (ms)volts (example)TRANSMITTED s(t)1011000111010110
Coloured parts: what the current step is about; everything else rests in whiteBlocks: bit buffer, mapper, oscillator, two mixers, adder, noisy channel, receiver and a Python code cardPlots: the constellation diagram (I across, Q up) and the transmitted wave s(t)Tokens carry bits, the I and Q levels and each symbol's wave; the ringed dot is the current symbol16-QAM: four bits pick one of 16 points (I, Q), sent as s(t) = I·cos(2π·fc·t) − Q·sin(2π·fc·t) with fc = 2000 Hz and 1 ms symbols. The Gray table 00 → −3, 01 → −1, 11 → +1, 10 → +3 is the one in the MIT 6.02 notes (ch. 14, Fig. 14-16). Which bit pair goes to I is a choice each standard fixes; here the first two bits pick I.

Bits to a point

  1. 16-QAM has 16 different symbols, and 2⁴ = 16, so each symbol carries 4 bits. The bit buffer hands the mapper its first four bits: 1011. Our message is 16 bits, so it needs 4 symbols.

A point becomes a wave

Back to bits

More bits per symbol

The working

# step 1/11 · bits

message   1011 0001 1101 0110  (16 bits)

16-QAM: M = 16 symbols
bits per symbol = log2(16) = 4

symbols needed = 16 / 4 = 4
symbol 0 = 1011

The carrier is a teaching value: 2000 Hz with 1 ms symbols puts just two carrier cycles in each symbol so you can see them. Real radios use carriers of megahertz or gigahertz and many cycles per symbol; the maths is the same. Every curve and number in the figure is computed from this model. The noise is pseudo-random with a fixed seed, so the figure shows the same points every time. Noise, SNR and error rates get their own lessons in the next module.