The logic of the xor function:
A B OUT
--- ----
0 0 0
0 1 1
1 0 1
1 1 0
---------
Here, if the paths A,B is compressed to one path as OUT. The xor gate waits for input A and also for input B and gives an equivalent output thus helping in compressing the path to a single equivalent path. thus this helps in observing the inputs provided to any untestable or testable block - a requirement of observability and controllability thus compacting the output. unlike the and gate or "OR" gate, that ignores the other input, xor gate takes care of both the paths to compact to a single path. xor gate reduces the no. of paths as well as improves the testability measure of a ldesign.