# Design of XOR Photonic Gate Using Highly Nonlinear Fiber
## 5 Performance Analysis  
At the optical coupler stage, the XOR photonic gate is launched at 20 Gbps with acceptable signal qualities in both the time and spectral domains. The output is then followed by the optical receiver for analytical processing by the eye pattern diagram and the BER analyzer in Figures 9 and 10. Next, key physical-layer performance metrics are observed and calculated based upon prior observations in order to assess and characterize the optical signals generated.  
The maximum quality factor (\(Q\)-factor) of the oscillation as recorded from Figure 10 is \(Q=25.9796\), which shows reduced power and energy losses resulting in reduced damping rates. The eye amplitude indicates the level of distinction between logic 1 and logic 0 levels, which is determined as follows: level one \(-\) level zero = 225 \(-\) 17 = 208 (23.18063 dB), i.e., the work here shows a large difference  
Figure 8: XOR gate output in the spectral domain.  
Figure 9: Eye pattern analyzer for the XOR gate.  
between the logic 1 level and the logic 0 level histogram mean values of the plotted eye diagram. The extinction ratio between the two optical signal levels is determined as:  
\[ER(dB)=10\log_{10}=\frac{One\ Level}{Zero\ Level}=10\log_{10}\frac{225}{17}=11.217 336\ \mathrm{dB} \tag{1}\]  
The recorded values here indicate a high quality generated optical signal. This value can significantly improve bit error ratio (BER) levels, as well as reduce the number of errors and the amount of error correction required. Furthermore, the opening eye factor is calculated as:  
\[\begin{array}{ll}Openning\ Factor&=\frac{(One\ Level-\sigma_{one})-(Zero\ Level+\sigma_{zero})}{Eye\ Pattern\ Amplitude}\\ &=\frac{(225-20)-(20+18)}{208}=0.8028846\end{array} \tag{2}\]  
Moreover, a high opening eye factor is recorded. This indicates minimal signal distortion levels for the proposed XOR gate. The resultant signal therefore features low noise levels whereby the amplitude levels are sufficient to be distinguished as marks. In addition, the optical signal to noise ratio (OSNR) is also defined as:  
\[\mathrm{OSNR}=10\log_{10}=\frac{(One\ Level-Zero\ Level)}{\sigma_{one}+ \sigma_{zero}}=7.36186\ \mathrm{dB} \tag{3}\]  
This value suggests a reduced impairment degree at which the XOR optical signal is carried out in the HNLF medium and the induced optical amplifiers. Figure 10 plots the \(Q\)-factor against a one bit period, yielding a minimum BER of 3.20295 \(\times\) 10\({}^{-149}\).  
Note that the recorded BER value here indicates a minimum level of random noise, jitter, and other disturbances resulting in reduced bit errors. Finally, the quantitative power penalty required to compensate for propagation degradation and dispersion, thereby achieving comparable SNR (or BER) performance levels as compared to ideal system is calculated as:  
\[Power\ Penalty=\frac{E_{eye}}{2E_{avg}}=\frac{1}{2(0.8028846)}=0.62275\ \mathrm{W}\ (-22.0586\ \mathrm{dB}) \tag{4}\]  
Figure 10: BER analyzer for the XOR gate.  
Note that the proposed gate features a very low power penalty, i.e., power consumption levels, because it performs the required functionalities at very low input power values. Furthermore, the output power values can be amplified and improved if cascaded circuits were to be based on this design, such as optical sub-tractors.  
Overall, the simulation results here show that the proposed XOR all-optical logic gate provides good performance using the HNLF implemented structure at 20 Gbps. Namely, the clear eye opening percentage = 80.28846% low BER, along with a small power penalty at \(-\)2.0568 dB and a high extinction ratio at 11.217336 dB. The results demonstrate a high level of distinction between logic zeros and ones at the receiver side due to the high extinction ratio.