beautypg.com

Teledyne LeCroy X-STREAM OSCILLOSCOPES Remote Control User Manual

Page 298

background image

A

P P E N D I X

I I :

Waveform Template

292

ISSUED: February 2005

WM-RCM-E Rev D

In a way that does not follow the byte boundaries, the bits are to be segregated as follows:

31

30, 29 . . . . 24, 23

22, 21 . . . . 2, 1, 0

sign

exponent bits

fractional bits

bit

0.5, 0.25, 0.125 . . .

The sign bit s is 1 for a negative number and 0 for a positive number, so it is easy to construct the sign from
this:

S = (-1)^s

The 8 exponent bits have the following values:

bit 23 is worth 1, bit 24 is worth 2 . . . bit 29 Æ 64, bit 30 Æ 128, so the resulting number can range
from 0 to 2

8

- 1, which is 255.


127 is then subtracted from this value e creating a range from -127 to +128. This is then used as an exponent

to raise two to a power that is 2^e, to create a value E.

Then we have to create the multiplying number. The values of the 23 bits are as follows:

Bit 22 is worth 0.5, 21 is worth 0.25, 20 is worth 0.125, 19 is worth 0.0625 . . . .

When all the bits are added together, we obtain a positive number f that can be very close to one, differing
from it only by the value of the smallest bit, if all the bits are ones. (Generally the value will be much less than

one.) Then we add one to the result, obtaining 1 + f = F. The use of the added one extends the dynamic range
of the data.


Another way of calculating f is to take the 23-bit number at face value, and divide it by 2^24.


Finally we multiply together the sign, the value E, and the value F to create the final result:

Result = (-1)^s x 2^(e-127) x (1 + f) = S x E x F


Example


In Chapter 4, one of the examples, Vertical Gain, states that the floating point number 34 83 12 6F leads to the

decimal value 2.44141E-07. Let’s see how this is done.

The bytes 34 83 12 and 6F can be written in binary as follows:

0011 0100 1000 0011 0001 0010 0110 1111.

This string of bits is to be split up as follows: