Slide 23 of 41
Notes:
With our “mental model” of types and values, we see the two null values in the type with different tag lists.
In a BER encoding, we will get for the “product-based” value:
where [null] is the default tag for the NULL type.
Similarly for the “basic” value.
Notice that the encodings for the two values will differ only in the encoding of the middle tag - all other parts of the encoding are the same.
Notice two further points: if the outermost [1] tag on the CHOICE had been implicit, it would have over-ridden the middle tags that distinguish the two values, and we would have a bust encoding. ASN.1 dictates that you are never allowed to implicitly tag a CHOICE type, so the situation of overriding those tags that are needed to prevent ambiguity can never arise in a legal specification.