On Wed, Dec 10, 2008 at 9:45 PM, Umut Emin <[EMAIL PROTECTED]> wrote: > Thanks Heinrich for the hint, > > I have read the sentence also. But out of this sentence, > I can not take out that the most-significant > octet(not bit), should come the first and the subsequents follow. > > say i have a number 9456 > > which is F024[on mem:0xf001, mem:0xf002] on my machine (a > little e. arch.) so from my machine's point of view, it is the > F0 which is the first octet (defined as "bits 8 to 1 of the first > octet" in standards). > > > so i think the problem lies in the standard: it is not calling > the first octet as "most significant octet".
The standard does not talk about any machine representations, it talks about a two's complement binary number as an abstract concept. Such a number has by convention the most significant digit (bit in this case) first, thats just like a decimal number which by convention has the most significant digit first. But I agree, this relies on convention and is not explicitly expressed. The note however makes this precise: "NOTE – The value of a two's complement binary number is derived by numbering the bits in the contents octets, starting with bit 1 of the last octet as bit zero and ending the numbering with bit 8 of the first octet. Each bit is assigned a numerical value of 2^N, where N is its position in the above numbering sequence. The value of the two's complement binary number is obtained by summing the numerical values assigned to each bit for those bits which are set to one, excluding bit 8 of the first octet, and then reducing this value by the numerical value assigned to bit 8 of the first octet if that bit is set to one." There are some other hints on the byte order. For example clause 8.3.2. states conditions on "the bits of the first octet and bit 8 of the second octet" which would not make sense if the order is not most significant bit first.
_______________________________________________ Asn1 mailing list [email protected] http://lists.asn1.org/mailman/listinfo/asn1
