Télécharger Imprimer la page

Keysight Technologies 3458A Guide D'utilisation page 141

Multimètre

Publicité

Two's complement binary coding
Two's complement binary coding is a method that allows a binary number to
represent both positive and negative integers. Two's complement coding is done
by changing the sign and, in effect, the decimal equivalent of the most significant
bit (MSB). When the MSB is set (1), in a 1 byte two's complement number, its
value is 1
that the range of an 8 bit, 1 byte two's complement number is -128 to 127, not 0
to 255.
The following example resolves the decimal equivalent of this two's complement
word:
10110101 10010110
This two's complement word is equivalent to:
–(2
Which evaluates to: –19050
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
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
these 24 bits (MSB assumed "1") to an integer and then multiply by 2
The value of a number in the SREAL format is calculated by:
(-1)
Keysight 3458A User's Guide
7
×
-(2
) = -128. When the MSB is reset (0), its value is 0
15
13
12
10
) + 2
+ 2
+ 2
E MMM MMMM
byte 0
byte 1
s
(exponent)
×
×
(mantissa)
2
8
7
4
2
+ 2
+ 2
+ 2
+ 2
+ 2
MMMM MMMM
MMMM MMMM
byte 2
byte 3
-23
. Another way to evaluate this mantissa is to convert
Making Measurements
×
1
4
7
-(2
) = 0. Note
-23
.
141

Publicité

loading