# Why does (x-y/2)&y plot a sierpinski triangle?

The function (x-y/2)&y = 0 can be used to plot a sierpinski triangle. For example:

Why does this happen?

-
See this link –  Babak S. Nov 16 '13 at 15:20

The function computes the parity of the values in the Pascal Triangle. To prove that the output resembles a Sierpinski triangle (of course it's just a finite representation of this...) you may just show that the parity structure for rows $1$ to $2^k$ is repeated at the left and the right side for rows $2^k+1$ to $2^{k+1}$, and that the middle part always has even values. It's just some manipulation of $C(k,n)$ :-)