## 5 Numerical Results
For the BER threshold, our proposed code can satisfy optical communication needs with an optical bandwidth of 0.03 THz, while the 3D-PD, 3D-PD/MD, 3D-DCS/MD, 3D-PTZCC, and 2D-SWZCC codes [1; 3; 22; 23; 24] force the OCDMA system to access optical bandwidths of 4.6, 4, 3.7, 0.07, and 1.68 THz, respectively. Employing the 3D-SWZCC code enables the OCDMA system to decrease its use of the bandwidth of the light source by 4.75, 3.97, 3.67, and 0.04 THz compared with the 3D-codes PD, PD/MD, DCS/MD, and PTZCC, respectively; additionally, 1.65 THz of bandwidth is saved by moving from 2D to 3D. Figure 6: BER versus data rate for K = 200. Figure 9 highlights the effect of each noise source on the QoS of our system for the electrical and optical bandwidths at 6.5 MHz and 5 THz, respectively. When we take into account the effects of all noise sources, the SNR is diminished and is almost the same for PINN and thermal noise, with a constant difference that is the shot noise value, as shown by the blue and green curves. Additionally, when we ignore the effect of PINN, the SNR also diminishes: it gives average values that are between those given by the PINN and thermal noise curve (green curve) and the curve representing all noise sources (blue curve), as shown by the magenta curve when the number of users is greater than 50. The latter case takes into account both PINN and shot noise while ignoring the thermal noise; in this case, the SNR is decreased by 50%. Figure 8: BER versus optical bandwidth for K = 100. Figure 7: BER versus effective source power for K= 150.  
the SNR will greatly increase, as shown by the red curve. Briefly, we have two cases that have approximately the same results. From this, we can deduce that the OCDMA system is most affected by thermal noise. Further, one can neglect PIIN as well; the SNR is most affected by thermal noise and is not affected much by shot noise. The above result, which demonstrates the low effect of PIIN, comes from the zero cross-correlation feature of our proposed code. These results have been discussed based on the dB values of the SNR as a function of the number of simultaneous users. Using Equation (24), the Q-factor alteration as a function of the number of simultaneous users is plotted for a data rate of 1000 Mbps, as depicted in Figure 10. When the number of users increases, the Q- factor decreases, which demonstrates the negative correlation between them, in contrast to BER and 'K'. At an agreeable Q-factor value for optical communication, which is given by 6 dB, the OCDMA system cardinality is 454, 354, 157, 141, 122, 107, and 68 for the 3D-SWZCC, 3D-MD, 2D-SWZCC, 3D-DCS/MD, 3D-PD/MD, 3D-PD, and 1D-SWZCC codes, respectively [3; 15; 22; 23; 24; 25]. From this, it is clear that the results shown in Figure 10 match the results shown in Figure 4. Therefore, we can say that it is possible to utilize Q-factor or BER criteria to estimate the system performance. On the other side, the total code length of the 3D-SWZCC code amounts to 273 for \(L_{1}=7,\ L_{2}=13\), and \(L_{3}=3\), with K = 454. Moreover, the total code length of the 1D-SWZCC code sequence amounts to L = K = 68; meanwhile, the total code length of the 2D SWZCC code sequence amounts to L = 171 for \(L_{1}=57\) and \(L_{2}=3\) with K = 157. We observe that the progress has been made in terms of the system capacity, in reducing the code length as well. Nonetheless, the effective cardinality (\(\eta\)) of our proposed code can be computed based on the expression in Equation (25) below:  
\[\eta(\%)=\frac{K_{BER=10^{-9}}}{L}\times 100 \tag{25}\]  
From this, we calculate the effective cardinalities of 166, 126, 91, 52, 44, 37, and 100% for the 3D-SWZCC, 3D-MD, 2D-SWZCC, 3D-DCS/MD, 3D-PD/MD, 3D-PD, and 1D-SWZCC codes, respectively. Figure 4:0 SNR versus number of simultaneous users for different noise sources.