Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!hplabs!ucbvax!brahms!desj From: desj@brahms.BERKELEY.EDU (David desJardins) Newsgroups: net.lang.ada Subject: Re: AND, OR & XOR on integers Message-ID: <13158@ucbvax.BERKELEY.EDU> Date: Mon, 14-Apr-86 18:48:43 EST Article-I.D.: ucbvax.13158 Posted: Mon Apr 14 18:48:43 1986 Date-Received: Wed, 16-Apr-86 03:49:53 EST References: <1255@enea.UUCP> <4700025@ada-uts> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: desj@brahms.UUCP (David desJardins) Organization: University of California, Berkeley Lines: 13 In article <4700025@ada-uts> stt@ada-uts writes: > >function "XOR"(Left, Right : in Integer) return Integer; > > would be a better start :-) > >Also, if you figure out how to implement this portably >in Ada, without using unchecked conversion, lemme know! Easy. Just use repeated division by two to extract the bits, and multiplication by two to construct the result. -- David desJardins