Each row of the matrix is either of the form 1,0,1,0,1,..., or of the form 0,1,0,1,0,1,...
These two types of rows are independent and hence rank of matrix is 2.
As a special case, If matrix is of size 1*1, then rank would be 1 (Thanks Suraj for pointing it out).