Related Integer Combination

The title and tags are a little goofy since I'm not quite sure what to call this. This may be more of a computer science question, but I thought I'd ask here too.

I have two integers $n$ and $m$ that are arbitrarily (logically) related with integers $x$ and $y$, respectively, where all values are finite and $> 0.$

I'd like to know if there's a way to combine $n$ and $x$, and $m$ and $y$, into two numbers (integer, decimal, whatever) such that neither will overlap. Additionally, I need to be able to perform some kind of operation to reverse the previous process to once again obtain $n$ and $x$, and $m$ and $y$.

Let me know if this isn't clear. Thanks in advance!

-
As far as I can tell, this is a question about two numbers, not four. – Qiaochu Yuan Sep 27 '10 at 18:34
@Qiaochu Yuan yeah, you're right. – Nalandial Sep 27 '10 at 20:24