Decoding floating point numbers, Waveace remote control – Teledyne LeCroy WaveAce 1000_2000 Remote Control User Manual
Page 90

WaveAce Remote Control
; remote command COMM_FORMAT.
; text arbitrary length text string
; (maximum 160)
; unit_definition a unit definition consists of a 48 character
; ASCII string terminated with a null byte
; for the unit name.
Decoding Floating Point Numbers
Single precision values are held in four bytes. If these are arranged in decreasing value order we get
the following bits:
bit 31, bit 30, bit 29, bit 28 . . . . . bit 3, bit 2, bit 1, bit 0
NOTE: If the byte order command CORD is set for low byte first, the bytes as received in a waveform descriptor
are received in reverse order. However, 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
constructed as follows:
S = (-1)
s
E = 2
(e - 127)
F = 1 + f
S
,
E
, and
F
are calculated directly from the 32 bits. The following diagram illustrates the calculation of
the vertical gain example:
88
920836 Rev B