28-06-2012, 11:32 AM
Introduction on Floating Point
Floating Point.ppt (Size: 147 KB / Downloads: 54)
IEEE floating point representation
The IEEE (Institute of Electrical and Electronic Engineers) is an international organization that has designed specific binary formats for storing floating point numbers.
The IEEE defines two different formats with different precisions: single and double precision. Single precision is used by float variables in C and double precision is used by double variables.
Intel’s math coprocessor also uses a third, higher precision called extended precision. In fact, all data in the coprocessor itself is in this precision. When it is stored in memory from the coprocessor it is converted to either single or double precision automatically.
Floating Point Arithmetic
Floating point arithmetic on a computer is different than in continuous mathematics.
In mathematics, all numbers can be considered exact. on a computer many numbers can not be represented exactly with a finite number of bits.
All calculations are performed with limited precision.
The Numeric Coprocessor
Hardware
Instructions
Examples
Quadratic formula
Reading array from file
Finding primes
Hardware
A math coprocessor has machine instructions that perform many floating point operations much faster than using a software procedure.
Since the Pentium, all generations of 80x86 processors have a builtin math coprocessor.
The numeric coprocessor has eight floating point registers. Each register holds 80-bits of data.
The registers are named ST0, ST1, ST2, . . . ST7, which are organized as a stack.
There is also a status register in the numeric coprocessor. It has several flags. Only the 4 flags used for comparisons will be covered: C0, C1, C2 and C3.
Summary
Floating Point Representation
Floating Point Arithmetic
The Numeric Coprocessor