in row major order
add(A[i][j]=(i*n+j)*w+base (where array is of order M*N and we assume that indexing starts with zero)
add[5][6]=(5*20+6)*1+1000
= 1106
and when indexing is starts with 1
we use add(A[i][j])=((i-1)*n+(j-1))*w+base (where w is the size of an element in byte)
add[5][6]=(4*20+5)*1+1000
=1085