## 5 Numerical Results  
This section considers the performance of a system employing a three-dimensional single weight zero cross-correlation (3D-SWZCC) code using two terms: the bit error rate (BER), in terms of the number of concurrent users, amount of received power, data bit rate, optical bandwidth, and the quality factor (Q), in terms of the number of concurrent users, with the assistance of MATLAB software. After running MATLAB software, in the workspace window, the mathematical equations obtained in terms of SNR, BER, and Q are rewriter as clear in Section 4 as a function of various parameters. First, the parameters shown in Table 3 are typed in the variable declaration section. We set the data bit rate \(R_{b}=1\) Gbps, the PD sensitivity \(\Re=0.75\), the Optical bandwidth \(\Delta f=5\) Thz, the effective source power \(P_{r}=-10\) dBm, the load resistor at receiver \(R_{L}=1030\)\(\Omega\), the receiver noise temperature \(T_{n}=300\) K, the electron charge \(e=1.6\times 10^{-19}\) c, and the Boltzmann constant \(K_{b}=1.38\times 10^{-23}\) J\(\cdot\)K\({}^{-1}\). Second, the equations for BER, SNR, and Q are written as calculated previously. Due to the numerical simulation being based on the concept of comparison, each code including 3D-PD, 3D-PD/MD, 3D-DCS/MD, 3D-MD, and 3D-PTZCC is generated by writing its own mathematical formulas as mentioned above. All the instructions of each code are signified differently from the other codes in order to avoid similarities during calculation. Third, by using the recognized drawing commands, such as \"plot\", \"semilogy\", etc., and the figure definition commands, such as legend, \"xlabel\", \"ylabel\", etc., all the codes are grouped in a single figure in order to guarantee a fair evaluation between the codes according to the factor to be measured (BER, SNR, Q,... etc.) by varying one of the parameters, such as number of users, spectral width, effective source power,... etc., as shown in the following figures. This section mentions the effects of moving from two-dimensional (2D) to 3D SWZCC code. Further, the code is compared with 3D-perfect difference (3D-PD), 3D-hybrid perfect difference/multi-diagonal (3D-PD/MD), 3D-hybrid dynamic cyclic shift/MD (3D-DCS/MD), and 3D-Pascal's triangle ZCC (PTZCC) codes [1; 22; 23; 24] for the same spectral, temporal, and spatial code lengths, which are (\(L_{1}=7\)), (\(L_{2}=13\)) and (\(L_{3}=3\)), respectively. The parameters applied for numerical analysis are listed in Table 3.  
Figure 4 shows the BER alteration as a function of the number of simultaneous users for set parameters, such as a received power of \(-10\) dBm and a data rate of 1 Gbps. As shown, our proposed code can accommodate a greater number of users, up to 454, while the 1D and 2D cases can accommodate just 68 and 157 users, respectively. As a result, the system cardinality has been optimized by about 6.67 and 2.89 times from transitioning from 1D to 3D and from 2D to 3D, respectively. Additionally, the OCDMA system based on the 3D-SWZCC code has outperformed the 3D-PD, 3D-PD/MD, 3D-DCS/MD, and 3D-PTZCC codes, for the same code lengths, by about 4.24, 3.72, 3.22, and 1.32 times, respectively, where the system cardinality for each code is 107, 122, 141, and 354 users, respectively. This means that the system can potentially meet the demands of optical networks. Figure 5 shows the SNR alteration as a function of the number of simultaneous users when the electrical bandwidth and effective source power are set to 6.5 GHz and \(-10\) dBm, respectively. It is clear that our proposed code, 3D-SWZCC, has a greater SNR because of the high output current resulting from the photodiode (SDD technique) compared with dark current noise. Additionally, in view of the inverse relevance between the SNR and dark current, this contributes to increasing the SNR value. For K \(<\) 50, the curves of the codes that belong to ZCC families (1D, 2D, 3D-SWZCC, and 3D-MD codes) [3; 15; 25] have greater SNR values than the others.