Abstract
This paper handles the double weight (DW) code family, one of the proposed codes used in spectral-amplitude-coding optical code division multiple access (OCDMA). The DW code family is constructed using a matrix technique which produces the whole basic code matrix in order to get a specified codeword. An additional mapping technique is used to increase the number of users. Both techniques add more complication to the code construction. A general equation is derived and analyzed in order to compare with the conventional method. Detailed examples are given on how to generate codes using a general equation. We also show in this paper the advantages of this formula compared to the existing construction technique. This newly designed technique allows us to use an equation-based constructing method to build any specified codeword for the DW code family