(03-27-2016, 01:44 PM)Bob Jenkins Wrote:(10-11-2015, 06:58 AM)Tachyon Wrote: I'm not sure what you mean by "swapping bits", but writing a bit requires joules per bit, and is an irreversible process.

Replacing (x,y) with (x, y XOR x) is reversible. It is its own reverse, because doing it twice yields (x, y XOR x XOR x) == (x, y).

Yes, and to perform the XOR operation you must perform a write, which consumes energy as noted above. Your "reversible" operation has consumed energy to perform the two writes. If it didn't, then you didn't actually perform the XOR (which is typically done by an XOR gate).

(03-27-2016, 01:44 PM)Bob Jenkins Wrote: So this is a reversible process: (x, y) -> (x, x XOR y) -> (x XOR x XOR y, x XOR y)==(y, x XOR y) -> (y, x XOR y XOR y)==(y, x). That's swapping bits. If you want zeros in the second bit, it's enough to be able to irreversibly clear the first bit.

This might be logically reversible, but it still consumes energy for each op.