I needed to to this as part of an upcoming project. The context was in the visualization of complex mappings, which is why the following code uses complex numbers:
(* adapted from https://mathematica.stackexchange.com/a/7359 *)
complexGrid = Compile[{{xmin, _Real}, {xmax, _Real}, {xn, _Integer},
{ymin, _Real}, {ymax, _Real}, {yn, _Integer}},
Block[{rx, ry},
rx = xmin + (xmax - xmin) Range[0, xn - 1]/(xn - 1);
ry = ymin + (ymax - ymin) Range[yn - 1, 0, -1]/(yn - 1);
Outer[Plus, I ry, rx]]];
complex2bw = Compile[{{Z, _Complex}, {sp, _Real}},
Mod[Round[Mod[Im[Z]/(2 sp), 1]] + Round[Mod[Re[Z]/(2 sp), 1]], 2],
RuntimeAttributes -> {Listable}];
and thus,
Image[complex2bw[complexGrid[-4, 4, 500, -2, 2, 250], 1/2]]

yields a $500\times 200$ checkerboard image.
Change the spacing parameter:
Image[complex2bw[complexGrid[-4, 4, 500, -2, 2, 250], 2]]

Graphics@Table[{GrayLevel@Mod[x + y, 2], Rectangle[{x, y}]}, {x, 0, 10}, {y, 0, 10}]- then you can useTranslate,ScaleandRotateto manipulate it as a graphics object. – kirma Apr 05 '18 at 11:34