15 bits. This is the maximal sequence length for a four-stage sequence because there are 15 four-bit sequences available. The sixteenth four-bit sequence, 0000, produces its own very dull sequence of all zeroes. This second example is therefore a maximal length linear four-stage shift register sequence, and its length is 24 -1. In general, a linear shift register sequence with r stages repeats every 2r-1 bits, and a maximal length sequence repeats no more often than that. For every r, there is at least one of maximum length, although it may be difficult to find. A maximal length linear shift register sequence almost satisfies the three conditions at the beginning of this section. 1. There are 2r-1 ones and 2r-1-1 zeroes in the 2 1 bit sequence. The fifty-fifty dis- tribution of ones and zeroes is off by one part in 2r. This is one part in a million for 20, a tiny deviation. 2. Run lengths of ones up to r in a row and run lengths of zeroes up to (r- 1) in a row are in correct proportion, and there are no same-digit sequences longer than r. Thus the run lengths up to r are statistically overrepresented by one part in 2', again a tiny deviation. 3. Some mathematical algebra can be used to show that the difference between two off- set sequences generated from the same r coefficients is another maximal length lin- ear r-stage shift register sequence. Therefore, the difference between two offset se- quences has half equal and half not equal within one part in 2r.3 Using offset maximal length linear shift register sequences as PN codes in CDMA, an interfering signal looks like a noise contribution attenuated by the processing gain. Superscript(3)The difference is the same as the sum using the two-element algebraic field in Eq. (8.9). Downloaded from Digital Engineering Library @ McGraw-Hill (www.digitalengineeringlibrary.com) Copyright © 2004 The McGraw-Hill Companies. All rights reserved. Any use is subject to the Terms of Use as given at the website. The CDMA Principle Key Radio Concepts 8.3.2 Orthogonal codes Under t