working method of exclusive or logic gate