Path: utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!nrl-cmf!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: (really about xor) Message-ID: <7220@brl-smoke.ARPA> Date: 8 Feb 88 12:46:50 GMT References: <3819@sigi.Colorado.EDU> <5080013@hpfcdc.HP.COM> <7120@brl-smoke.ARPA> <3476@ihlpf.ATT.COM> <564@cresswell.quintus.UUCP> <131@puivax.UUCP> <2701@mmintl.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 14 In article <2701@mmintl.UUCP> franka@mmintl.UUCP (Frank Adams) writes: >In article <131@puivax.UUCP> ian@puivax.UUCP (Ian Wilson) writes: >>exclusive or being the only information-preserving logical operation. >Equivalence also has this property. What in the world are you two talking about?? A binary Boolean operation maps a 2x2-domain into a 2-range, which HAS to lose information. This has little to do with the XOR swap method, which works because the information is divided between two storage bins. As I think I pointed out, you could also use differencing in a similar fashion, and I'm sure there are other operators that would serve. The important thing is not to lose dimensionality of the combined set of data (such as would happen if one variable were copied onto the other).