But XOR is not able to realise all logic gates..We say a gate is universal gate if :
All logic functions possible in the given number of variables can be realised using that particular gate
e.g. if we take example of 2 variable functions , we can realise all of 16 functions using NAND gates or NOR gates only ..So NAND and NOR gates are also known as universal gates..
As for example OR using NAND : P ⋁ Q = (P ↑ Q) ↑ (P ↑ Q)
using NOR : P ⋁ Q = (P ↓ P) ↓ (Q ↓ Q)
Similarly we can realise other gates(boolean functions) using only NOR or only NAND gates hence they are referred as universal gates ..
As contrast to this , we can realise all functions using XOR functions only hence they are not considered as universal gates..