Manual

Waveform Template
WM-RCM-E Rev D ISSUED: February 2005
293
0 01101001 00000110001001001101111.
The first bit, 0, makes the sign of the number S, using the formula S = (-1)
s
= 1.
The next eight bits make the exponent e as follows:
0 X 128 + 1 X 64 + 1 X 32 + 0 X 16 + 1 X 8 + 0 X 4 + 0 X 2 + 1 X 1 = 105, from which we
subtract 127, giving -22.
So the factor E is 2
(e-127)
= 2
-22
, which is 2.3842E-7.
Finally, we need to make the multiplier F. The remaining bits are given the values 0.5, 0.25, 0.125, 0.0625,
0.03125, etc. The first bits that are not zero are the 6th and 7th bits, whose values are 0.015625 and 0.078125,
respectively. To get a rough value, we will take just these two bits, since the next three are zero, giving
0.0234375. We have to add 1 to this, giving 1.023 as a rough value for F.
The final result is therefore S x E x F = 1 X 2.3842E-7 X 1.023 = 2.439, which is a little smaller than the
correct value because we did not use all the bits to calculate the value of F.
Double precision values are held in eight bytes. If these are arranged in decreasing order of value we get the
following bits:
63, 62, 61, 62 . . . . . 3, 2, 1, 0.
We must remember that if the byte order command CORD has been set for low byte first, the bytes as
received in a waveform descriptor will be received in the reverse order. But within a byte, the bits keep their
order: highest at the left, as expected.
From these bits we are to construct three numbers that are to be multiplied together: S x E x F. These in turn
are constructed as follows:
S = (-1)
s
E = 2
(e - 1023)
F = 1 + f
and it is s, e, and f that are calculated directly from the 32 bits. The following diagram illustrates the calculation
of an example.