I'm currently studying the Abstract Syntax Notation One and reading the ITU-T Recommendation X.690.
On page 15 in paragraph 8.3.2, there is written:
If the contents octets of an integer value encoding consist of more than one octet, then the bits of the first octet and bit 8 of the second octet:
- shall not all be ones; and
- shall not all be zero.
NOTE – These rules ensure that an integer value is always encoded in the smallest possible number of octets.
I understand that for the integer to be always encoded in the smallest possible number of octet, the first octet shall not be zero.
But what about ones? If I want to encode the value 65408 (1111 1111 1000 0000) using the Basic Encoding Rules, how should I do it?