Zero becomes the best fitness. For the XOR example, let's simply return a 1 for if one of the tests returns the wrong answer, and a 0 for a correct answer. Then sum up the four tests for the fitness. As can be seen from the truth table, every pair of inputs of A and B for AND differs from XOR except for when both A and B are false. So AND has a fitness value of 3.
Crossover is simple for parse trees.
Any subtree or terminal may be switched with any other subtree or terminal. In an actual program, you would recurse through the two trees until two nodes are selected at random, and these would be switched. Mutation is as simple as Crossover. Any function symbol can be replaced by any other function symbol and any terminal can be replaced by any other terminal. Or any subtree or terminal can be replaced with an entirely new subtree generated the same way the initial population was generated.