It's basically checking if both numbers are either odd or even, by looking the LSB (least significant bit)
In computing, the least significant bit (LSB) is the bit position in a
binary integer giving the units value, that is, determining whether
the number is even or odd.
10011010
^ least significant bit
Break down
(row ^ col)
bitwise XOR.
XOR is the exclusive OR. XOR behaves like regular OR, except it’ll
only produce a 1 if either one or the other numbers has a 1 in that
bit-position.
10011010
XOR 01000110
-------- =
11011100
(x & 1)
bitwise AND with 1
AND takes two numbers and produces the conjunction of them. AND will
only produce a 1 if both of the values it’s operating on are also 1.
11011100
AND 00000001
-------- =
00000000
Example
for (int row = 0; row < 8; row++)
for (int col = 0; col < 8; col++)
if (((row ^ col) & 1) == 0)
Console.WriteLine($"{row} {col} : {Convert.ToString(row, 2).PadLeft(8,'0')} {Convert.ToString(col, 2).PadLeft(8,'0')} ");
Output
0 0 : 00000000 00000000
0 2 : 00000000 00000010
0 4 : 00000000 00000100
0 6 : 00000000 00000110
1 1 : 00000001 00000001
1 3 : 00000001 00000011
1 5 : 00000001 00000101
1 7 : 00000001 00000111
2 0 : 00000010 00000000
2 2 : 00000010 00000010
2 4 : 00000010 00000100
2 6 : 00000010 00000110
3 1 : 00000011 00000001
3 3 : 00000011 00000011
3 5 : 00000011 00000101
3 7 : 00000011 00000111
4 0 : 00000100 00000000
4 2 : 00000100 00000010
4 4 : 00000100 00000100
4 6 : 00000100 00000110
5 1 : 00000101 00000001
5 3 : 00000101 00000011
5 5 : 00000101 00000101
5 7 : 00000101 00000111
6 0 : 00000110 00000000
6 2 : 00000110 00000010
6 4 : 00000110 00000100
6 6 : 00000110 00000110
7 1 : 00000111 00000001
7 3 : 00000111 00000011
7 5 : 00000111 00000101
7 7 : 00000111 00000111