Alright, I am being asked to solve this problem:
Problem: For the vectors v = [0, one, one] and u = [one, one, one] over GF(2), find v + u and v + u + u.
I am stuck and I need some help. So what I assumed I need to do, is:
v = [0, one, one] = 0, 1, 1
u = [one, one, one] = 1, 1, 1
So:
v + u =
0,1,1
1,1,1 +
--------
1,0,0
Why? Because I am assuming that GF(2) is based on XOR. First question: is this correct?
Second:
v + u + u =
0,1,1
1,1,1
1,1,1 +
--------
?,?,?
I have no idea what to do. Is GF(2) the same as modulo 2 or should I also work with XOR here?
As you can see, I have just no clue what GF(2) essentially means / is and I can't use it correctly because of that.
Could someone help me with this please? I want to understand it.
Addition modulo $2$ is the (possibly more) familiar XOR operation on bits; we have $1 + 1 = 0$, and $x + 0 = x = 0 + x$ for all $x \in GF(2)$.
However, there's something that may not be obvious when it comes to expressions like $x + y + z$.
For sums with more than two terms, by definition we must add one pair at a time; $x + y + z = (x + y) + z$, and this can be viewed as a sequence of binary (meaning, having two inputs) XOR operations if you like, where the exact parenthesization doesn't matter, since $+$ is associative. So for example, $1 + 1 + 1 = (1 + 1) + 1 = 0 + 1 = 1$ (and more generally, a sum is $1$ if and only if an odd number of inputs are $1$).
This might be a bit unusual, depending on how you think about XOR with more than two inputs (see for example this answer on EE.SE). Evidently some define this as a sequence of binary XOR operations, as we do here, while others output $1$ if and only if exactly one input is $1$. I hadn't given much thought to the latter viewpoint, and am not sure whether these differing views of multi-input XOR came up in practice, or in what fields one definition might be more common than the other.
So with only two inputs, addition modulo $2$ acts exactly as you'd expect, but you may need some (mental) recalibration with more than two inputs.