On Tue, 6 Mar 2007, Lev Walkin wrote:
Martin Andersson wrote:
Hello
If I'm using Unaligned PER and have this definition.
some-thing INTEGER ( -8388608 .. 8388607 )
Is this then correct (and also is the way I have have done it applicable
when the integer values is much bigger).
00000000 00000000 00000000 = - 8388608
00000000 00000000 00000001 = - 8288607
......
10000000 00000000 00000000 = 0
10000000 00000000 00000001 = 1
......
11111111 11111111 11111110 = 8388606
11111111 11111111 11111111 = 8388607
yes, this is correct.
Not quite.
Note that the encoding for -8288607 is 0186A1 (hex), not 000001 (hex).
It all would have been correct if the second encoding shown above
were -8388607 instead of -8288607.
-------------------------------------------------------------------------
Bancroft Scott Toll Free :1-888-OSS-ASN1
OSS Nokalva International:1-732-302-0750
[EMAIL PROTECTED] Tech Support :1-732-302-9669
x-1
1-732-302-9669 x-200 Fax :1-732-302-0023
http://www.oss.com
_______________________________________________
Asn1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1