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,13f10cac2d21b84f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-01 15:59:20 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!195.40.4.120.MISMATCH!easynet-quince!easynet.net!teaser.fr!deine.net!colt.net!newspeer.clara.net!news.clara.net!news-hub.cableinet.net!blueyonder!internal-news-hub.cableinet.net!news-binary.blueyonder.co.uk.POSTED!53ab2750!not-for-mail From: nickroberts@blueyonder.co.uk (Nick Roberts) Newsgroups: comp.lang.ada Subject: Re: Is this a GNAT bug??? Message-ID: <3cd06b13.12244473@news.blueyonder.co.uk> References: <3CC992D6.A87A3443@raytheon.com> <5ee5b646.0204291844.21d7f5f0@posting.google.com> <3CCF12E9.6CA14A29@raytheon.com> X-Newsreader: Forte Free Agent 1.21/32.243 Date: Wed, 01 May 2002 22:59:11 GMT NNTP-Posting-Host: 62.30.113.100 X-Complaints-To: abuse@blueyonder.co.uk X-Trace: news-binary.blueyonder.co.uk 1020293951 62.30.113.100 (Wed, 01 May 2002 23:59:11 BST) NNTP-Posting-Date: Wed, 01 May 2002 23:59:11 BST Organization: blueyonder (post doesn't reflect views of blueyonder) Xref: archiver1.google.com comp.lang.ada:23378 Date: 2002-05-01T22:59:11+00:00 List-Id: On Tue, 30 Apr 2002 16:55:53 -0500, Mark Johnson wrote: >Big endian (Bit_Order == System.High_Order_First) >Byte 00000000 11111111 22222222 33333333 ... >Bit 01234567 01234567 01234567 01234567 ... >Ind 00000000 00111111 11112222 22222233 >-ex 01234567 89012345 67890123 45678901 > >Little endian (Bit_Order == System.Low_Order_First) >Byte 00000000 11111111 22222222 33333333 ... >Bit 76543210 76543210 76543210 76543210 ... >Ind 00000000 11111100 22221111 33222222 >-ex 76543210 54321098 32109876 10987654 My version of the above would be: Big endian (Bit_Order == System.High_Order_First) Byte 00000000 11111111 22222222 33333333 ... Bit8V 76543210 76543210 76543210 76543210 ... Bit8L 12345678 12345678 12345678 12345678 ... Bit16H 00000000 01111111 00000000 01111111 ... Bit16L 12345678 90123456 12345678 90123456 ... Bit32H 00000000 01111111 11122222 22222233 ... Bit32L 12345678 90123456 78901234 56789012 ... Ind 00000000 00111111 11112222 22222233 ... -ex 01234567 89012345 67890123 45678901 ... Little endian (Bit_Order == System.Low_Order_First) Byte 00000000 11111111 22222222 33333333 ... Bit8V 76543210 76543210 76543210 76543210 ... Bit8L 76543210 76543210 76543210 76543210 ... Bit16H 00000000 11111100 00000000 11111100 ... Bit16L 76543210 54321098 76543210 54321098 ... Bit32H 00000000 11111100 22221111 33222222 ... Bit32L 76543210 54321098 32109876 10987654 ... Ind 00000000 11111100 22221111 33222222 ... -ex 76543210 54321098 32109876 10987654 ... where in both cases Bit8V n is defined as contributing 2^n to the value of the byte as an unsigned integer (value 0 to 255). I have added the rows Bit8L, Bit16H/L, and Bit32H/L to both cases, which show what the conventional bit numbering would be on a machine of the given endianness for a unsigned byte, 16-bit and 32-bit integer in memory. (H is for the higher decimal digit, L for the lower.) Am I actually correct?