From: desj@brahms.BERKELEY.EDU (David desJardins)
Subject: Re: AND, OR & XOR on integers
Date: Mon, 14-Apr-86 18:48:43 EST [thread overview]
Date: Mon Apr 14 18:48:43 1986
Message-ID: <13158@ucbvax.BERKELEY.EDU> (raw)
In-Reply-To: 4700025@ada-uts
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
next prev parent reply other threads:[~1986-04-14 23:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <306@telesoft.UKE>
1986-03-18 16:55 ` Orphaned Response stt
1986-03-23 16:12 ` AND, OR & XOR on integers Erland Sommarskog
1986-03-31 14:34 ` stt
1986-04-14 23:48 ` David desJardins [this message]
1986-04-17 2:09 ` Dik T. Winter
1986-04-17 2:20 ` Dik T. Winter
1986-03-25 16:20 Doug Bryan
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox