Floating-point unit

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 143.107.161.161 (talk) at 17:51, 12 August 2004. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Jump to navigation Jump to search

A floating point unit (FPU) is a part of a CPU specially designed to carry out operations on floating point numbers. Typical operations are floating point arithmetic (such as addition and multiplication), but some systems may be capable of performing exponential or trigonometric calculations as well (such as square roots or cosines).

Not all CPUs have a dedicated FPU. In the absence of an FPU, the CPU may use a microcode program to emulate an FPUs function using an arithmetic and logical unit (ALU), which saves the added hardware cost of an FPU but is significantly slower.

In some computer architectures, floating point operations are handled completely separate from integer operations, with dedicated floating point registers and independent clocking schemes. Floating point addition and multiplication operations are typically pipelined, but more complicated operations, like division, may not be, and some systems may even have a dedicated floating point divider circuit.

Add-On FPUs

Until the mid 1990's, it was common for the FPU to be entirely separate from the CPU in home computers and for it to be an optional item. It would only be purchased if needed to speed up or enable math-intensive programs. Examples include the 387 and 487 FPUs, for use with 386 and 486 CPUs, and the 68881 FPU, used with the 680x0 line, commonly found in Macintosh computers. Since then, the FPU has generally been included as part of the processor.

Sample Code

Template:InfoRequest

See also

execution unit, IEEE floating-point standard (also known as IEEE 754)