> This is a re-post ... had forgotten to mention "ASN.1 unaligned PER".
>
> I have a doubt regarding the encoding of a BIT STRING, with named bits in
> ASN.1 unaligned PER.
> Assume the definition of the BIT STRING to be as follows:
>
> abc BIT STRING {
> spare15(0),
> spare14(1),
> spare13(2),
> spare12(3),
> spare11(4),
> spare10(5),
> spare9(6),
> spare8(7),
> spare7(8),
> spare6(9),
> spare5(10),
> spare4(11),
> spare3(12),
> spare2(13),
> uea1(14),
> uea0(15)
> } (SIZE (16))
>
> What will be the encoded output for the following cases:
>
> 1. 1. c1_abc { spare15, spare 13 }
>
> 2. 2. c2_abc { spare15 }
> Will 1 or 1000000000000000 be encoded?
Since you have SIZE(16), it will be encoded in 16 bits with no length field.
If you had instead omitted SIZE(16), any trailing 0s would be omitted, but
there would then have to be a length field.
Note also that underscores are not permitted within names. There are
other ASN.1 syntax errors but it's clear what you meant.
=====================================================================
Conrad Sigona Toll Free : 1-888-OSS-ASN1
OSS Nokalva Voice Mail : 1-732-302-9669 x400
[EMAIL PROTECTED] Fax : 1-419-831-5035
http://www.oss.com My direct line : 1-315-845-1773