Using the signed modulo operation:
$(x\ \mathrm{mod}\ 2) = \begin{cases} 0\ \mathrm{if}\ x\ \mathrm{is\ even} \\ 1\ \mathrm{if}\ x > 0\ \mathrm{and}\ x\ \mathrm{is\ odd} \\ -1\ \mathrm{if}\ x < 0\ \mathrm{and}\ x\ \mathrm{is\ odd} \\ \end{cases}$
Using the signed modulo operation:
$(x\ \mathrm{mod}\ 2) = \begin{cases} 0\ \mathrm{if}\ x\ \mathrm{is\ even} \\ 1\ \mathrm{if}\ x > 0\ \mathrm{and}\ x\ \mathrm{is\ odd} \\ -1\ \mathrm{if}\ x < 0\ \mathrm{and}\ x\ \mathrm{is\ odd} \\ \end{cases}$
If the question is what I think it is, then you have an integer program with (integer) variables $x$ and $y$, and you want to enforce the constraint that $x$ and $y$ have the same parity. This is the case when $x-y$ is even, so you can add some variable $z$ and the the equation $x - y - 2z = 0$