# Design of XOR Photonic Gate Using Highly Nonlinear Fiber
## 2 Design of XOR Photonic Logic Gate  
Consider two synchronized pulse light beam signals operating at 20 Gbps, aligned at two different wavelengths with a specific data modulation format which are injected into the highly nonlinear fiber, as conceptually depicted in Figure 1. Both signals are within the same polarization states. A non-return to zero with on-off keying (NRZ-OOK) modulation format is selected here due to its constant power levels when transmitting an entire bit slot. This makes the NRZ modulation format a common choice for optical fiber communications systems, e.g., for metropolitan-area networks (MAN). As a result, the data is in NRZ-OOK format comprising picosecond full width half maximum (FWHM) pulse width. Because the duty cycle is very small, a reduced amount of average power is needed to generate significant and noticeable SPM-XPM idlers.  
In order to increase the strength of the generated SPM-XPM idler, the lights are co-polarized with each other [13]. Signal A here acts as a pump signal at an operating wavelength, \(\lambda_{\text{A}}\), while signal B acts as a probe signal at an operating wavelength, \(\lambda_{\text{B}}\). After propagating through the HNLF medium, the spectrum of probe B experiences an SPM and XPM induced frequency shift at \(\lambda^{\prime}_{\text{B}}\) which is proportional to the slope of the power profile of the pump signal. At the output of the HNLF, the probe spectrum mainly contains two fundamental lobes [14]:One spectral lobe at \(\lambda_{\rm B}\), which is identical to the probe spectrum before the XPM which is formed by the logical zeros of pump A.  
Second, the spectral lobe at \(\lambda^{\prime}_{\rm B}\), which is a spectrally shifted replica of the probe spectrum which is formed by the logical ones of pump A as illustrated at the output of the HNLF.  
The resultant idlers generated by the SPM and XPM will act as the photonic XOR gate of the two input signals. The actual logic gate output is acquired by spectrally filtering out one of the generated idler wavelengths. A band pass filter (BPF) can be employed to select the desired output spectrum in order to perform the logical operation of the gate.  
The two optical pulses were generated by a user defined bit sequence generator (UDBSG) and an optical Gaussian pulse generator (OGPG). Polarization controllers were used to enhance synchronization between the signals. They were followed by isolators which reject the reflected light in the transmission path. Both sequences were then amplified by Erbium-doped fiber amplifiers (EDFA). Optical cross-connectors (XC) with different coupling coefficients acted as power splitters and combiners to generate the pump and probe signals with different optical power levels.  
Furthermore, optical circulators (OCs) were used to ensure the injection of the propagated pump and probe into the HNLF. By adjusting the cut-off wavelength of the BPF, the desired optical logic gate could be generated as will be explained later. Also, variable optical attenuators (VOA) and optical delay lines (ODL) were used for synchronization purposes. Indeed, an optical receiver was used to measure the performance of the system using a certain analysis method by connecting eye pattern and bit error rate analyzers.  
The propagation of the signals was monitored in the time domain using an optical time domain visualizer (OTDV) and in the frequency domain using an optical spectrum analyzer (OSA). The optical power was detected at each stage by an optical power meter (OPM). Figure 2 shows the circuit diagram of the proposed XOR gate, composed of the various interconnected elements, in particular, the UDBSG, OGPG, EDFA, XC, OC, BPF, and VOA. The signal flow sequence is also shown in Figure 2, including the output of the XC at each stage. Note that this design is simulated by the Optisystem software package (based on realistic photonic models) and that it was used for the physical layer implementation of various optical communication systems, such as long hauls, LANs, and MANs.