Texas Instruments TMS320C3x 사용자 설명서

다운로드
페이지 757
Floating-Point Formats
 
5-4
5.3
Floating-Point Formats
The ’C3x supports four floating-point formats:
-
A short floating-point format for immediate floating-point operands, consisting
of a 4-bit exponent, a sign bit, and an 11-bit fraction
-
(’C32 only) A short floating-point format for use with 16-bit floating-point
data types, consisting of a 2s-complement, 8-bit exponent field, a sign bit,
and a 7-bit fraction
-
A single-precision floating-point format by an 8-bit exponent field, a sign
bit, and a 23-bit fraction
-
An extended-precision floating-point format consisting of an 8-bit exponent
field, a sign bit, and a 31-bit fraction.
All ’C3x floating-point formats consist of three fields:
 an exponent field (e), a
single-bit sign field (s), and a fraction field (f ). The sign field and fraction field
may be considered as one unit and referred to as the 
mantissa field (man).
Figure 5–5. General Floating-Point Format
Exponent
Sign
Fraction
Mantissa
The general equation for calculating the value in a floating-point number is:
x
+
ss.f
2
 
2
e
In the equation, 
s is the value of the sign bit, s is the inverse of the value of the
sign bit, 
f is the binary value of the fraction field, and e is the decimal equivalent
of the exponent field.
The mantissa represents a normalized 2s-complement number. In a normalized
representation, a most significant nonsign bit is implied, thus providing an addi-
tional bit of precision. The implied sign bit is used as follows:
-
If 
s = 0, then the leading two bits of the mantissa are 01.
-
If 
s = 1, then the leading two bits of the mantissa are 10.
If the sign bit, 
s, is equal to 0, the mantissa becomes 01.f
2
, where 
f is the binary
representation of the fraction field. If 
s is 1, the mantissa becomes 10.f
2
, where 
f
is the binary representation of the fraction field.
For example, if f = 00000000001
2
 and 
s = 0, the value of the mantissa (man)
is 01.00000000001
2
. If 
s = 1 for the same value of f, the value of man is
10.00000000001
2
.