The closer the code is to being completely random, the more uniform the power density will become. Spread spectrum signals never achieve a completely uniform power density and will always exhibit a fine line-structured spectrum. The frequency separation of the line spectra is reduced by increasing the code repetition rate with a faster chip rate or a longer code. Codes Pseudo-random spreading codes have a fixed length. Codes may be formed using a shift register with feedback taps.
Good codes have a low cross-correlation response.
This results in minimum interference between users, especially when signals are synchronized. A receiver that is set to use one particular code can only be reached by the transmitter sending the same code. Cross-correlation is the measure of agreement between two different codes. It can be calculated by determining the number of agreements minus the number of disagreements when the codes are compared chip by chip, while one code is shifted one chip at a time. Good codes also have a high auto-correlation peak, when exactly lined up, which minimizes false synchronization.