![Omntec PROTEUS OEL8000III Series Manual Download Page 11](http://html1.mh-extra.com/html/omntec/proteus-oel8000iii-series/proteus-oel8000iii-series_manual_740737011.webp)
PROTEUS
OMNTEC
Mfg., Inc., 2420 Pond Road, Ronkonkoma, NY 11779
Phone (631) 981-2001 Fax (631) 981-2007 www.OMNTEC.com
File Name: DE00014 DE00015 DE00020-10 rev2045.docx Page 11 of 71 Rev Date: 10-15-2021
Serial Interface Manual
OEL8000III Series Models K/X
9.0 ASCII HEX FLOATING POINT FORMAT
Some remote commands use an ASCII Hex format when transmitting or receiving numbers. This procedure will
explain how to convert a number from decimal to ASCII Hex and from ASCII Hex to decimal.
Floating Point Numbers
There are two problems with integers; they cannot express fractions, and the range of the number is limited to the
number of bits used. An efficient way of storing fractions is called the floating point method, which involves
splitting the fraction into two parts, an exponent and a mantissa.
The exponent represents a value raised to the power of 2.
The mantissa represents a fractional value between 0 and 1.
Consider the number
12.50
The number is first converted into the format
2n * 0.xxxxxx
where
n
represents the exponent and 0.xxxxx is the mantissa.
The computer industry agreed upon a standard for the storage of floating point numbers. It is called the IEEE 754
standard, and uses 32 bits of memory (for single precision), or 64 bits (for double precision accuracy). The single
precision format looks like,
Bits
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
+---+-----------------------+---------------------------------------------------------------------+
| S | Exponent value | Mantissa value |
+---+-----------------------+---------------------------------------------------------------------+
S = Sign Bit
The sign bit is 1 for a negative mantissa, and 0 for a positive mantissa.
The exponent uses a bias of 127.
The mantissa is stored as a binary value using an encoding technique.
Working out the FP bit patterns
The number we have is
12.5
which expressed as fraction to the power of 2 is,
12.5 / 2 = 6.25
6.25 / 2 = 3.125
3.125 / 2 = 1.5625
1.5625 / 2 = 0.78125
NOTE: Keep dividing by 2 till a fraction between 0 and 1 results. The fraction is the mantissa value, the number of