From: Nate Eldredge Newsgroups: comp.os.msdos.djgpp Subject: Re: [ot] - some basic stuff Date: 05 Jul 2000 01:15:22 -0700 Organization: Posted via Supernews, http://www.supernews.com Lines: 34 Sender: nate AT mercury DOT bitbucket Message-ID: <83n1jx9en9.fsf@mercury.bitbucket> References: <39632793 DOT 15954 DOT AA1ABF AT localhost> X-Complaints-To: newsabuse AT supernews DOT com User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Leon AT caresystems DOT com DOT au writes: > Many appologies if this is off topic > just is rather very simple - but something i have > forgot > what is the difference between > bitwise EXCLUSIVE OR symbol (ie ^) > and > bitwise INCLUSIE OR symbol (ie |) Inclusive or: A bit is set in x|y if either of the corresponding bits in x and y were set, or both. Exclusive or: A bit is set in x|y if either of the corresponding bits in x and y were set, *but not both*. Truth tables: |x 0 1 y 0 0 1 1 1 1 ^x 0 1 y 0 0 1 1 1 0 HTH -- Nate Eldredge neldredge AT hmc DOT edu