Hi All,
I'm just a little curious about the term "hexadecimal number". I take it to mean a
string of hexadecimal characters. So, my first inclination is to create a character
set as an ASN.1 enumerated type:
HexChar ::= ENUMERATED { x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD, xE,
xF }
An efficient encoding method could fit each such character into a nibble. BER would be
a bad choice.
Then,
HexNumber ::= SEQUENCE OF HexChar
for example,
decimal-999901 HexNumber ::= { xF, x4, x1, xD, xD }
This is, of course, a big-endian representation of a variable-length bit vector
(string of nibbles). You could fix the length of the number like this
HexNumber ::= SEQUENCE OF HexChar (SIZE(8))
which would improve the efficiency of the encoding, at the expense of a longer value
notation.
Is this the kind of hex number you were thinking of? Can you tell us a little more
about the way you intend to use it?
Regards,
Patrick Henry
On Tue, 09 October 2001, "Egon Andersen, Talura" wrote:
>
> Mildred Frisco wrote:
> >
> > i mean data with range 1 to 8 bytes
> >
>
> Then I would make a datatype as:
>
> HexadecimalType ::= OCTET STRING (SIZE(1..8))
>
> Best regards
> Egon Andersen
>
> --
> * Talura ApS * Phone: +45 43 52 50 00 *
> * Baldersh�j 24 B * mailto:[EMAIL PROTECTED] *
> * DK-2635 Ish�j * http://www.talura.dk *
Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com