Denote by $a(m,n)$ the entry in row $m$, column $n$ of the matrix. By definition
$$a(m,n)=\operatorname{mex}\big(\{a(k,n):k<m\}\cup\{a(m,k):k<n\}\big)\;,\tag{1}$$
where $\operatorname{mex}(A)$ is the smallest non-negative integer not in $A$. The problem is to show that when all of the numbers involved are expressed in binary, $a(m,n)=m\oplus n$, the bitwise exclusive OR of $m$ and $n$. We’ll do this by induction on $m+n$. It’s certainly true when $m+n=0$: $a(0,0)=0=0\oplus 0$. Now assume let $m,n\in\mathbb{N}$, and assume that it’s true for all $m',n'\in\mathbb{N}$ with $m'+n'<m+n$; we’ll show that it’s true for $m$ and $n$.
Let $s=m\oplus n$. To show that $s=a(m,n)$ as defined by $(1)$, I need to show two things:
- if $0\le t<s$, $t\in\{a(k,n):k<m\}\cup\{a(m,k):k<n\}$; and
- $s\notin\{a(k,n):k<m\}\cup\{a(m,k):k<n\}$.
To show (1), suppose that $0\le t<s$, let $d=t\oplus s$, and let $k$ be the number of bits in $d$, so that $2^{k-1}\le d<2^k$. That is, $d$ has a $1$ in the $k$-th position counting from the right. Since $t<s$, this implies that $t$ has a $0$ in the $k$-th position, and $s$ has a $1$ there. Since $s=m\oplus n$, exactly one of $m$ and $n$ must have a $1$ in the $k$-th position; without loss of generality assume that $m$ has a $1$ in the $k$-th position. Then $d\oplus m$ has a $0$ in the $k$-th position and is identical to $m$ in positions to the left of the $k$-th position, so $d\oplus m<m$. Let $k=d\oplus m$; then $$k\oplus n=d\oplus m\oplus n=d\oplus s=t\oplus s\oplus s=t\;.$$ Moreover, $k<m$, so $k+n<m+n$, and therefore $t=k\oplus n=a(k,n)$ by the induction hypothesis. This completes the proof of (1).
To show (2), suppose, on the contrary, that $s\in\{a(k,n):k<m\}\cup\{a(m,k):k<n\}$. Without loss of generality we may assume that $s\in\{a(k,n):k<m\}$. Let $k<n$ be such that $s=a(k,n)$. Clearly $k+n<m+n$, so by the induction hypothesis we have $$k\oplus n=a(k,n)=s=m\oplus n\;,$$ and therefore $$k=k\oplus n\oplus n=m\oplus n\oplus n=m\;,$$ contradicting the choice of $k$. Thus, (2) also holds, and $m\oplus n=a(m,n)$.