User`s guide
Chapter 4 Making Measurements 93
Single Real The single real (SREAL) format conforms to IEEE-754 specifications. This
format has 32 bits, 4 bytes per reading as follows:
S EEE EEEE E MMM MMMM MMMM MMMM MMMM MMMM
byte 0 byte 1 byte 2 byte 3
Where:
S = sign bit (1 = negative 0 = positive)
E = base two exponent biased by 127 (to "decode" these 8 bits, subtract 127
from their decimal equivalent).
M = mantissa bits (those right of the radix point). There is an implied most
significant bit (MSB) to the left of the radix point. This bit is always assumed
to be "1". This provides an effective precision of 24 bits with the least
significant bit (right most) weighted 2
-23
. Another way to evaluate this
mantissa is to convert these 24 bits (MSB assumed "1") to an integer and
then multiply by 2
-23
.
The value of a number in the SREAL format is calculated by:
(-1)
s
´ (mantissa) ´ 2
(exponent)
SREAL Example This example resolves the decimal equivalent of the following SREAL
formatted number:
SEEEEEEE EMMMMMMM MMMMMMMM MMMMMMMM
10111011 11001000 01001000 10010000
The sign bit "S" is set "1," this indicates that the number is negative.
The base two's exponent (01110111) evaluates to:
2
6
+ 2
5
+ 2
4
+ 2
2
+ 2
1
+ 2
0
= 119
Since the exponent is biased by 127, the real value is:
exponent - 127 = 119 - 127 = -8
The mantissa [1.10010000100100010010000 (MSB assumed "1")] evaluates
to:
1 +2
-l
+ 2
-4
+ 2
-9
+ 2
-12
+ 2
-16
+ 2
-19
= 1.56471443177
Evaluating the mantissa at the byte level instead of the bit level:
byte 1 byte 2 byte 3 = byte 1 byte 2 byte 3
11001000 01001000 10010000 200 72 144
mantissa =200 ´ 2
-7
+ 72 ´ 2
-15
+ 144 ´ 2
-23
= 1.56471443177
or
mantissa = (200
´ 2
16
+ 72 ´ 2
8
+ 144) ´ 2
-23
= 1.56471443177