comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Binary and XML serialization of types
Date: Tue, 4 Feb 2014 12:14:47 +0100
Date: 2014-02-04T12:14:47+01:00	[thread overview]
Message-ID: <gec95twhywxd$.1bcxbg3f3oz9u$.dlg@40tude.net> (raw)
In-Reply-To: f3369dbc-88c1-4b3e-a5c9-64f69569cd40@googlegroups.com

On Tue, 4 Feb 2014 02:33:49 -0800 (PST), AdaMagica wrote:

>> P.S. I cannot find a reference in RM which states the semantics of
>>
>> Shift_Left. I presume that it is such that
>>
>>     Shift_Left (2#0001#, 1) = 2#0010#
>>
> B.2(9) should be clear enough, especially when you take into account the
> last sentence about tight shift:
> 
> For each such modular type in Interfaces, shifting and rotating
> subprograms as specified in the declaration of Interfaces above. These
> subprograms are Intrinsic. They operate on a bit-by-bit basis, using the
> binary representation of the value of the operands to yield a binary
> representation for the result. The Amount parameter gives the number of
> bits by which to shift or rotate. For shifting, zero bits are shifted in,
> except in the case of Shift_Right_Arithmetic, where one bits are shifted
> in if Value is at least half the modulus. 
> 
> (Note that more significant bits in any scalar value independently of its
> length are always left from less significant ones, independently whether
> you count bits from left to right (BE) or rigth to left (LE).)

Yes, if "binary representation of the value" taken in its mathematical
sense. Yet in the same sentence with "bit-by-bit basis" it may leave a
[false] impression that maybe the representation here is to refer to a
representation in the physical memory, which would have a way different
meaning then.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  reply	other threads:[~2014-02-04 11:14 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23 18:53 Binary and XML serialization of types hanslad
2014-01-23 19:15 ` adambeneschan
2014-01-23 19:17   ` adambeneschan
2014-01-23 19:58     ` hanslad
2014-01-23 20:03       ` adambeneschan
2014-01-23 21:00       ` Dmitry A. Kazakov
2014-01-24  8:54         ` hanslad
2014-01-24 10:01           ` Dmitry A. Kazakov
2014-01-24 14:44             ` hanslad
2014-01-24 15:22               ` Dmitry A. Kazakov
2014-01-31  9:51                 ` hanslad
2014-01-31 10:49                   ` Dmitry A. Kazakov
2014-02-04 10:33                     ` AdaMagica
2014-02-04 11:14                       ` Dmitry A. Kazakov [this message]
2014-02-04 11:20                         ` AdaMagica
2014-02-04 13:04                           ` Dmitry A. Kazakov
2014-02-04 17:16                             ` AdaMagica
2014-02-04 17:57                               ` Dmitry A. Kazakov
2014-02-04 22:34                               ` Simon Wright
2014-02-05  9:02                                 ` AdaMagica
2014-02-05  9:39                                   ` Simon Wright
2014-02-05 10:35                                   ` Dmitry A. Kazakov
2014-02-05 13:03                                     ` AdaMagica
2014-02-05 13:44                                       ` G.B.
2014-02-05 15:34                                       ` Niklas Holsti
2014-02-06  1:32                                       ` adambeneschan
2014-01-24 17:36             ` Simon Wright
2014-01-24  8:44       ` Georg Bauhaus
2014-01-24 17:13         ` Simon Wright
2014-01-23 22:44   ` Simon Wright
2014-01-23 23:43     ` adambeneschan
2014-01-24  0:58       ` Randy Brukardt
2014-01-24  8:29       ` Oliver Kleinke
2014-01-24 16:22         ` adambeneschan
replies disabled

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