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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8309f2bc055237c4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-11-11 21:56:45 PST Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3A0E3116.83AEC906@acm.org> From: Jeff Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Bit manipulation References: <8u8v6n$b7o$1@nnrp1.deja.com> <2WTH$pdrCfOd@eisner.decus.org> <8ub6kt$6nd$1@nnrp1.deja.com> <8ubeq8$cgm$1@nnrp1.deja.com> <3A0D38E9.BB87D8CD@mindspring.com> <3A0D86EB.4FAFA2EF@acm.org> <3A0DF35D.729DDE15@mindspring.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sun, 12 Nov 2000 05:56:40 GMT NNTP-Posting-Host: 199.174.133.61 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 974008600 199.174.133.61 (Sat, 11 Nov 2000 21:56:40 PST) NNTP-Posting-Date: Sat, 11 Nov 2000 21:56:40 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: supernews.google.com comp.lang.ada:2037 Date: 2000-11-12T05:56:40+00:00 List-Id: Redryder wrote: > > It goes like this: BIT 0 to BIT 31, BIT 31 to BIT 0 , and so on. I take it you want the resulting bit pattern to be the reverse of the original bit pattern. This is perhaps best accomplished with packed Boolean arrays, as you can easily manipulate the individual bits directly, and can change 2 bits for each value of the loop index. The fastest but most space-consuming solution would use a look-up table. Few implementations will support an array of the required size. You could also use modular types and operations, but this would probably be less clear than packed Boolean arrays. -- Jeff Carter "I unclog my nose towards you." Monty Python & the Holy Grail