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.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1922c4740861327c X-Google-Attributes: gid103376,public From: The Ludwig Family Subject: Re: Bit manipulation facilities in Ada Date: 1998/11/22 Message-ID: <36575D47.43905794@bellsouth.net>#1/1 X-Deja-AN: 414340357 Content-Transfer-Encoding: 7bit References: <36573C4D.DA431821@physics.purdue.edu> Content-Type: text/plain; charset=us-ascii MIME-Version: 1.0 NNTP-Posting-Date: Sat, 21 Nov 1998 19:39:32 EST Newsgroups: comp.lang.ada Date: 1998-11-22T00:00:00+00:00 List-Id: Look in the index for "modular integers" and look under "arrays", in particular one-dimensional boolean arrays. For both of these categories, the operators "and", "or", "xor", and "not" are available. If you cannot directly use either of these categories of types, you will need either to use Unchecked_Conversion (look up in the index) between your types and one of these types or to overload the "and", "or", "xor", and "not" operators to apply to your own types (the definitions of the over- loadings perhaps using Unchecked_Conversion and the modular or boolean-array operators). This is not particularly difficult, and the type-checking helps you keep straight what you are working with, whereas C basically allows you to hack around at the bits in a rather uncontrolled (and less safe) fashion. Howard W. LUDWIG, Ph.D. Robert T. Sagris wrote: > > I'm thinking about taking an Data Security and Encryption course. > The language for programming projects is open to the students. > > I was wondering if any one could recommend any books that demonstrate > low level bit manipulation in Ada. > > I already have > > Ada as a Second Language > By: Cohen > > Ada 95: Problem Solving and Program Design > By: Feldman and Koffman > > Ada Programming and Methodology > By: Findlay etc. > > None of which seem to cover this in any detail. > > The Professor has already recommended C for its built in Bit operators. > But I would like to try it in Ada, as I've never used in a class. > I could use the practice. > > Robbi Sagris