SW500010 Microchip Technology, SW500010 Datasheet - Page 78

HI-TECH C PRO FOR PIC10/12/16

SW500010

Manufacturer Part Number
SW500010
Description
HI-TECH C PRO FOR PIC10/12/16
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC10/12/16r
Datasheets

Specifications of SW500010

Supported Families
PIC10, PIC12, PIC16
Core Architecture
PIC
Software Edition
Professional
Kit Contents
Software And Docs
Mcu Supported Families
PIC10/12/16
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC10, PIC12, PIC14, PIC16, PIC16E
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
019P
778-1006
778-1006
Supported Data Types and Variables
The value of this number is (-1)
radix point) is the implied bit, which is assumed to be 1 unless the exponent is zero (in which case
the float is zero).
number to the right of the decimal point in the mantissa. Convert this to decimal and divide it by 2
where 23 is the number of bits taken up by the mantissa, to give 0.302447676659. Add one to this
fraction. The floating-point number is then given by:
of these types. Floating point types are always signed and the unsigned keyword is illegal when
specifying a floating point type. Types declared as long double will use the same format as
types declared as double.
3.3.8 Structures and Unions
HI-TECH C PRO for the PIC10/12/16 MCU Family supports struct and union types of any
size from one byte upwards. Structures and unions only differ in the memory offset applied for each
78
Format
32-bit
24-bit
Here are some examples of the IEEE 754 32-bit formats:
Note that the most significant bit of the mantissa column in
The 32-bit example in
The sign bit is zero; the biased exponent is 251, so the exponent is 251-127=124. Take the binary
Variables may be declared using the float and double keywords, respectively, to hold values
IEEE 754 32-bit
modified IEEE 754 24-bit
mantissa is the mantissa, which is to the right of the radix point. There is an implied bit to the
left of the radix point which is always 1 except for a zero value, where the implied bit is zero.
A zero value is indicated by a zero exponent.
Format
Number
7DA6B69Bh
42123Ah
Table 3.4: Floating-point format example IEEE 754
3.4
can be calculated manually as follows.
biased expo-
nent
11111011b
10000100b
Table 3.3: Floating-point formats
Sign
x
x
(251)
(132)
x 2
biased exponent
xxxx xxxx
xxxx xxxx
1.01001101011011010011011b
1.001001000111010b
(1.302447676659)
(1.142395019531)
x 1.mantissa.
1.mantissa
xxx xxxx xxxx xxxx xxxx xxxx
xxx xxxx xxxx xxxx
3.4
(that is the bit to the left of the
mantissa
C Language Features
2.77000e+37
36.557
decimal
e

Related parts for SW500010