Implementation of XOR gate as a neural network