Let k be an algebraically closed field of characteristic 2. We prove that the restricted nilpotent commuting variety C, that is the set of pairs of (n×n)-matrices (A,B) such that A2=B2=[A,B]=0, is equidimensional. C can be identified with the ‘variety of n-dimensional modules’ for Z/2Z×Z/2Z, or equivalently, for k[X,Y]/(X2,Y2). On the other hand, we provide an example showing that the restricted nilpotent commuting variety is not equidimensional for fields of characteristic >2. We also prove that if e2=0 then the set of elements of the centralizer of e whose square is zero is equidimensional. Finally, we express each irreducible component of C as a direct sum of indecomposable components of varieties of Z/2Z×Z/2Z-modules.