Not sure about the implementation, like is .train() auto scaling the network size? I'm guessing there isn't enough neurons to do 3-bit xor logic. Try adding more hidden layers!
Also keep in mind that there needs to be neurons to convert a value into binary, and back! Which is also going to take a lot of neurons, you could try doing dec -> binary conversion before sending it to the neural network:
Also keep in mind that there needs to be neurons to convert a value into binary, and back! Which is also going to take a lot of neurons, you could try doing dec -> binary conversion before sending it to the neural network: