comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@telepath.com>
Subject: Re: Bit operations in Ada (one's complements and sum)
Date: Sat, 09 Sep 2000 00:01:01 GMT
Date: 2000-09-09T00:01:01+00:00	[thread overview]
Message-ID: <39B97FE3.3A0129B5@telepath.com> (raw)
In-Reply-To: 8pbt1a$vo8$1@nnrp1.deja.com

ebresie@usa.net wrote:

> I am curious if there exists either built in or already developed
> somewhere, a bit manipulation package.
>
> I am trying to have 16-bit numbers that are made into one's complement
> and have one's complement summation occur with the values.

One's complement is just a "not" operation. You won't find a package to do
that, because it is too trivial of an operation for someone to make an
entire package out of. You just use the "not" operator on a packed array of
booleans or on a modular integer.

Some examples of this for unpacked arrays of boolean (aka: "Sets") are up on
AdaPower at http://www.adapower.com/lang/sets.html . But if you would like
to perform math operations on the same data without converting it, modular
integers would probably be better for you.

--
T.E.D.

Home - mailto:dennison@telepath.com  Work - mailto:dennison@ssd.fsi.com
WWW  - http://www.telepath.com/dennison/Ted/TED.html  ICQ  - 10545591





  reply	other threads:[~2000-09-09  0:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-08 23:34 Bit operations in Ada (one's complements and sum) ebresie
2000-09-09  0:01 ` Ted Dennison [this message]
2000-09-09  5:22   ` Epistemology [was: Bit operations in Ada (one's complements and sum)] Nick Roberts
2000-09-09 20:18     ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox