Added the test for XOR and OR related operations.
Designed the function body to detect XOR and OR related operation
according to the respective test.