# How does direct sequence n-bit chipping code recover bit in the event of interference?

Say for example my data stream was 1010.Using 4-bit chipping code, with a random sequence of 0100101101011001. The XOR'd data which the receiver receives is 1011101110101001.
I understand that receiver, knowing the random sequence, has 4 opportunities to recover a bit in case of interference. (eg. for first 4 received bits, 1=>1,0=>1,1=>1,1=>1 so we know original bit sent was 1)
But what if interference caused say 3 bits to flip?
Eg. the first 4 bits received would be 0101. This would be decoded as 0=>0,1=>0,0=>0,1=>1.
How does the receiver know that the first 3 results are wrong but the final is correct?

(source:Computer networks: a systems approach chapter 2.6)

• Any forward error correction has its limits. – Zac67 Mar 7 at 19:39
• What's the idea then? Is it perhaps a best of 4 kind of logic? – spacecadetmatt Mar 7 at 22:22
• You could start here and work your way up to IEEE 802.11. – Zac67 Mar 7 at 23:22