What is the PER encoding for the following integers in aligned and unaligned encoding. � �
integer 15 INTEGER (1..65538, ..., 65539) ::=65539 �
Is the following correct or not??? �
E:1 L:00000011 C:00000001 00000000 00000011 for both aligned and unaligned. �
If not please explain......

Both are correct, but the alignment is different. For aligned PER, there are 7 padding bits following the E:1; for unaligned PER, there are none. Thus,


   aligned PER    80 1000 0000
                     1xxx xxxx  extension bit
                     x000 0000  padding

                  03 0000 0011
                     0000 0011  length of value

                  01 \
                  00            three octets of value
                  03 /


unaligned PER 81 1000 0001 1xxx xxxx extension bit x000 0001 first 7 bits of the 8 bit length

                  80 1000 0000
                     1xxx xxxx  last bit of the 8 bit length (making 3)
                     x000 0000  first 7 bits of the 3-octet value

                  80 1000 0000  next 8 bits of the 3-octet value

                  01 0000 0001  next 8 bits of the 3-octet value

                  80 1000 0000
                     1xxx xxxx  last bit of the 3-octet value (making it
                                010003)


The last 7 bits of the unaligned PER are shown as zeroes just to permit my representing it in hex; they're not really there at all. The length of the aligned data is 40 bits; of the unaligned is 33 bits.



===================================================================== Conrad Sigona Voice Mail : 1-732-302-9669 x400 OSS Nokalva Fax : 1-419-831-5035 [EMAIL PROTECTED] My direct line : 1-315-845-1773
_______________________________________________
ASN1 mailing list
[EMAIL PROTECTED]
http://lists.asn1.org/mailman/listinfo/asn1

Reply via email to