Implements both addition and subtraction -- they are the same in GF(size).
@return sum/difference of a and b
static int addOrSubtract(int a, int b) { return a ^ b; }