IF A=1 or B=1 AND A<>B

Is this proper replacement for XOR statement?