LOGBOOK

HELP

Quiz Entry - updated: 2026.07.05

How does CDMA spreading and de-spreading work mathematically? Walk through a two-user example.

Each user multiplies their data bit (+1 or -1) by their spreading code to create a spread signal. The receiver extracts one user's data by multiplying the combined signal by that user's code and averaging — other users cancel out.

Two-user chip example: spread, sum on air, correlate to recover x1,x2.

* Worked two-user example: correlating each code recovers x1 and x2. *

Setup — two users with orthogonal codes (SF=4):

  • Spreading code 1: c₁ = (+1, -1, +1, -1)
  • Spreading code 2: c₂ = (+1, +1, -1, -1)
  • Verify orthogonality: c₁ · c₂ = (+1)(+1) + (-1)(+1) + (+1)(-1) + (-1)(-1) = 1 - 1 - 1 + 1 = 0

Spreading:

  • Sender 1 sends bit x₁ = +1: spread signal z₁ = x₁ · c₁ = (+1, -1, +1, -1)
  • Sender 2 sends bit x₂ = -1: spread signal z₂ = x₂ · c₂ = (-1, -1, +1, +1)

On the air — signals combine:

Z = z₁ + z₂ = (0, -2, +2, 0)

De-spreading (receiver wants user 1's data):

y₁ = (1/4) × Z · c₁ = (1/4) × [(0)(+1) + (-2)(-1) + (+2)(+1) + (0)(-1)] y₁ = (1/4) × [0 + 2 + 2 + 0] = (1/4) × 4 = +1 ✓ (correctly recovered!)

De-spreading (receiver wants user 2's data):

y₂ = (1/4) × Z · c₂ = (1/4) × [(0)(+1) + (-2)(+1) + (+2)(-1) + (0)(-1)] y₂ = (1/4) × [0 - 2 - 2 + 0] = (1/4) × (-4) = -1 ✓ (correctly recovered!)

The magic: Even though both signals were transmitted simultaneously on the same frequency, each receiver perfectly recovers its intended data. User 2's signal completely cancels out when correlated with user 1's code, and vice versa. This is the power of orthogonality.

Go deeper:

From Quiz: MOBINFSEC / FDMA, TDMA & CDMA | Updated: Jul 05, 2026