Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To find the correct settings for the tagType and berConstruct attributes of a Tag Node (with type set to BERTag), first convert the tag value into binary. The top 2 bits of the binary result represent the tag type - the value to set for the attribute tagType:

tagType

Bit 1

Bit 2

Universal

0

0

Application

0

1

Context

1

0

Private

1

1

The next (3rd) bit determines whether this tag represents a simple or constructed value, and therefore the value to set for the attribute berConstruct:

berConstruct

Bit 3

T

1

F

0

The remaining 5 bits represent the actual tag value. For example, if the given tag value is A5, in binary this is 10100101, and so:

...