From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 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 List-Id: 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