TY - EJOUR AU - Parandin, Fariborz AU - Mohamadi, Alireza PY - 2024 DA - April TI - Design and Optimization of a Photonic Crystal-Based All-Optical XOR Gate Using Machine Learning T2 - Majlesi Journal of Electrical Engineering VL - 18 L1 - https://oiccpress.com/Majlesi-Journal-of-Electrical-Engineering/article/design-and-optimization-of-a-photonic-crystal-based-all-optical-xor-gate-using-machine-learning/ DO - 10.30486/mjee.2023.1984121.1111 N2 - In this article, a two-dimensional photonic crystal-based XOR gate is designed and simulated. For this purpose, an initial two-dimensional photonic crystal structure is chosen and waveguides are created for inputs and outputs. Then, defect rods are selected so that the obtained outputs are approximately consistent with the XOR gate truth table. After that, we will be looking for the best output so that the highest optical power is created for logic 1 and the lowest power in the logical state of 0. For this reason, the simulation is performed for four defect rods and the output is obtained for different the radius of the rods. Then, using the K-Nearest Neighbors algorithm, which is a machine learning algorithm, the best output for logic 0 and also for logic 1 is obtained. The results show that the designed logic gate has high output power in logic 1 and very low power in the logic 0 state.   IS - 1 PB - OICC Press KW - Optical XOR gate, Photonic Bandgap, K-Nearest Neighbors, Photonic Crystal EN -