Step-by-step explanation:
I cannot draw here, but I can tell you, which cells are getting marked black :
1. all cells, where row number = column number.
e.g. (0, 0), (1, 1), (2, 2) ... (8, 8)
2. all cells, where (row number + column number) = 8
e.g. (0, 8), (8, 0), (1, 7), (7, 1) ... (4, 4)
in other words, it makes a giant X through the grid, from (0, 0) to (8, 8), and from (0, 8) to (8, 0) with the central intersection point at (4, 4).