## 4 Results
We attribute the reduction in the QF at higher input powers primarily to CR-SOAsaturation, which leads to amplitude imbalance and reduced differential gain between the MZI arms. Additionally, pattern-dependent nonlinearities may further degrade signal quality under high-power and high-speed conditions, although saturation appears to be the dominant factor. These results emphasize the necessity of precisely managing the power of signal B to maintain optimal performance in all-optical logic gate designs. The observed trends, as shown in Figure 4, suggest that there is an optimal power range for signal B, where the XGM effect is maximized without introducing detrimental saturation effects. For high-speed optical communication systems, power optimization strategies, such as adaptive power adjustment or feedback mechanisms, are crucial to ensure that both input signals remain within their optimal power levels. At data rates exceeding 120 Gb/s, the primary limiting factor is expected to be the carrier recovery time of the CR-SOA rather than the bandwidth of the MZI, which is inherently broad due to its passive nature. As bit intervals become shorter, the slow recovery of carrier density can lead to patterning effects, reduced modulation efficiency, and signal distortion. Future work should explore faster SOA structures (e.g., QD-SOAs) or hybrid material systems to overcome this limitation. Further simulations that vary the power conditions for both signals A and B could provide additional insights into the ideal power levels for different logic operations, ultimately improving the performance and efficiency of CR-SOA-MZI-based systems. This study underlines the importance of careful power management to avoid saturation, ensuring that the logic gates deliver a high QF and maintain efficient signal processing, particularly in systems that require high-speed and reliable operation for advanced optical communication technologies. Future research should focus on exploring optimal power ranges for various logic operations and developing techniques to stabilize performance across a range of operational conditions. Figure 3: Performance of the all-optical encoder and comparator using CR-SOA-MZI at 120 Gb/s, executing five logic operations with high QFs: 17.56 (\(\overline{\text{AB}}\)), 17.04 (\(\overline{\text{AB}}\)), 19.05 (AND), 10.95 (NOR), and 8.33 (XNOR). The results, as shown in Figure 5, illustrate the variation in the QF against the data rate, using the CR-SOA-MZI for different logic gate operations: \(\overline{\text{AB}}\), \(\overline{\text{AB}}\), \(\overline{\text{AB}}\), \(\overline{\text{AB}}\) (AND), \(\overline{\text{A}}\) (NOR), and \(\overline{\text{AB}}\) + \(\overline{\text{A}}\) \(\overline{\text{B}}\) (XNOR). The QF decreases for all logic operations as the data rate increases from 20 Gb/s to 160 Gb/s. For instance, for \(\overline{\text{AB}}\), the QF drops from 24.12 at 20 Gb/s to 4.92 at 160 Gb/s, while for \(\overline{\text{AB}}\), it decreases from 22.61 to 3.75. A similar trend is observed in the AND operation (AB), where the QF decreases from 27.12 at 20 Gb/s to 5.85 at 160 Gb/s, indicating a gradual degradation in performance with increasing data rates. The NOR operation (\(\overline{\text{A}}\) \(\overline{\text{B}}\)) follows the same pattern, with the QF declining from 20.12 to 1.85, and the XNOR operation (\(\text{AB}+\overline{\text{A}}\) \(\overline{\text{B}}\)) experiences a sharper decrease from 17.21 to 0.65. This decline in the QF as the data rate increases suggests that higher-speed operations impose limitations on the system's ability to maintain strong functional performance, likely due to factors such as increased signal distortion, carrier recovery limitations, or phase noise accumulation in the optical setup. The decreasing trend across all logic gates indicates that as the data rate increases, system impairments, such as gain saturation in CR-SOA-MZI configurations, become more pronounced, leading to signal degradation.