comp.lang.ada
 help / color / mirror / Atom feed
From: fraser@nospam.com
Subject: Re: how to do bit-wise operation on none modular types?
Date: 1999/03/04
Date: 1999-03-04T00:00:00+00:00	[thread overview]
Message-ID: <920576142.710.15@news.remarQ.com> (raw)
In-Reply-To: 36de1ede.43977585@news.pacbell.net

I nearly cried when tmoran@bix.com said:

>>find "X mod 16#10000#" *more* clear than "X and 16#FFFF#"

>but not easily generalizable to "X and 16#FF7F#"

Quite true, which is why one should choose the appropriate tool
for whatever one happens to be doing: bit extraction uses
Boolean operators, modular arithmetic doesn't.  There you go.

The difference between extracting the bottom eight bits and
doing arithmetic modulo 256 can be subtle of course.

Fraser.




  reply	other threads:[~1999-03-04  0:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-03  0:00 how to do bit-wise operation on none modular types? bill
1999-03-03  0:00 ` Tarjei Tj�stheim Jensen
1999-03-03  0:00 ` Tucker Taft
1999-03-03  0:00   ` Samuel Mize
1999-03-03  0:00     ` dennison
1999-03-03  0:00     ` Tucker Taft
1999-03-04  0:00       ` Tom Moran
1999-03-04  0:00         ` fraser [this message]
1999-03-04  0:00       ` robert_dewar
1999-03-05  0:00         ` bourguet
1999-03-05  0:00           ` robert_dewar
1999-03-03  0:00     ` fraser
1999-03-04  0:00       ` Samuel Mize
1999-03-05  0:00         ` fraser
1999-03-04  0:00       ` dennison
replies disabled

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