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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:aed:204d:: with SMTP id 71mr1326468qta.116.1579860258765; Fri, 24 Jan 2020 02:04:18 -0800 (PST) X-Received: by 2002:a05:6830:1e16:: with SMTP id s22mr2086530otr.340.1579860258525; Fri, 24 Jan 2020 02:04:18 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!g89no5641830qtd.0!news-out.google.com!o19ni791qtr.1!nntp.google.com!g89no5641822qtd.0!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 24 Jan 2020 02:04:18 -0800 (PST) In-Reply-To: <4878f44b-9f82-45d0-86eb-a63894a2c5bf@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=185.22.143.5; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 185.22.143.5 References: <4878f44b-9f82-45d0-86eb-a63894a2c5bf@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Creating several types from a base type and conversion From: AdaMagica Injection-Date: Fri, 24 Jan 2020 10:04:18 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:57932 Date: 2020-01-24T02:04:18-08:00 List-Id: Am Freitag, 24. Januar 2020 10:35:04 UTC+1 schrieb Ken Roberts: > It was my understanding that big/little-endian representations were mainly how > data was accessed from memory that used 8-bit bytes for physical memory layout. > > Using a 16-bit register as an example: > > register: [first byte][second byte] Assuming the register is interpreted as a signless whole number, first byte is the MSB, second byte the LSB. > > In big-endian format the memory usage would be: > > adx 0: [first byte] MSB > adx 1: [second byte] LSB > adx 2: [first byte] > adx 3: [second byte] > > In little-endian format the memory usage would be: > > adx 0: [second byte] LSB > adx 1: [first byte] MSB > adx 2: [second byte] > adx 3: [first byte] > > Is my understanding off? So it's OK. See https://en.wikibooks.org/wiki/Ada_Programming/Attributes/%27Bit_Order