All Topics  
Floating point unit

 

   Email Print
   Bookmark   Link






 

Floating point unit



 
 
A floating-point unit (FPU) is a part of a computer
Computer

A computer is a machine that manipulates Data according to a list of Code .The first devices that resemble modern computers date to the mid-20th century , although the computer concept and various machines similar to computers existed earlier....
 system specially designed to carry out operations on floating point
Floating point

In computing, floating point describes a system for numerical representation in which a String of digits represents a rational number.The term floating point refers to the fact that the radix point can "float": that is, it can be placed anywhere relative to the Significant figures of the number....
 numbers. Typical operations are addition
Addition

Addition is the mathematics process of putting things together. The plus sign "+" means that numbers are added together. For example, in the picture on the right, there are 3 + 2 apples?meaning three apples and two other apples?which is the same as five apples, since 3 + 2 = 5....
, subtraction
Subtraction

Subtraction is one of the four basic arithmetic operations; it is the inverse of addition, meaning that if we start with any number and add any number and then subtract the same number we added, we return to the number we started with....
, multiplication
Multiplication

Multiplication is the Operation of scaling one number by another. It is one of the four basic operations in elementary arithmetic .Multiplication is defined for Natural number in terms of repeated addition; for example, 4 multiplied by 3 can be calculated by adding 3 copies of 4 together:...
, division
Division (mathematics)

In mathematics, especially in elementary arithmetic, division is an arithmetic operation which is the inverse of multiplication.Specifically, if c times b equals a, written:...
, and square root
Square root

In mathematics, a square root of a number x is a number r such that r2 = x, or, in other words, a number r whose square is x....
. Some systems (particularly older, microcode
Microcode

Microcode is a layer of lowest-level instructions involved in the implementation of machine code instructions in many computers and other processors; it resides in a special high-speed memory and translates machine instructions into sequences of detailed circuit-level operations....
-based architectures) can also perform various transcendental function
Transcendental function

A transcendental function is a function that does not satisfy a polynomial equation whose coefficients are themselves polynomials, in contrast to an algebraic function, which does satisfy such an equation....
s such as exponential or trigonometric calculations, though in most modern processors these are done with software library routines.

In most modern general purpose computer architecture
Computer architecture

Computer architecture in computer engineering is the conceptual design and fundamental operational structure of a computer system. It is a blueprint and functional description of requirements and design implementations for the various parts of a computer, focusing largely on the way by which the central processing unit performs internally an...
s, one or more FPUs are integrated with the CPU
Central processing unit

A central processing unit is an electronic circuit that can execute computer programs. This broad definition can easily be applied to many early computers that existed long before the term "CPU" ever came into widespread usage....
; however many embedded processors, especially older designs, do not have hardware support for floating-point operations.

In the past, some systems have implemented floating point via a coprocessor
Coprocessor

A coprocessor is a computer processor used to supplement the functions of the primary processor . Operations performed by the coprocessor may be floating point arithmetic, graphics, signal processing, string processing, Savitsky-Golay derivation, or encryption....
 rather than as an integrated unit; in the microcomputer
Microcomputer

A microcomputer is a computer with a microprocessor as its central processing unit. Another general characteristic of these computers is that they occupy physically small amounts of space when compared to mainframe computer and minicomputers....
 era, this was generally a single microchip
Integrated circuit

In electronics, an integrated circuit is a miniaturized electronic circuit that has been manufactured in the surface of a thin Wafer of semiconductor material....
, while in older systems it could be an entire circuit board
Printed circuit board

A printed circuit board, or PCB, is used to mechanically support and electrically connect electronic components using Conductor pathways, or signal traces, industrial etchinged from copper sheets laminated onto a non-conductive substrate....
 or a cabinet.

Not all computer architectures have a hardware FPU.






Discussion
Ask a question about 'Floating point unit'
Start a new discussion about 'Floating point unit'
Answer questions from other users
Full Discussion Forum



Encyclopedia


A floating-point unit (FPU) is a part of a computer
Computer

A computer is a machine that manipulates Data according to a list of Code .The first devices that resemble modern computers date to the mid-20th century , although the computer concept and various machines similar to computers existed earlier....
 system specially designed to carry out operations on floating point
Floating point

In computing, floating point describes a system for numerical representation in which a String of digits represents a rational number.The term floating point refers to the fact that the radix point can "float": that is, it can be placed anywhere relative to the Significant figures of the number....
 numbers. Typical operations are addition
Addition

Addition is the mathematics process of putting things together. The plus sign "+" means that numbers are added together. For example, in the picture on the right, there are 3 + 2 apples?meaning three apples and two other apples?which is the same as five apples, since 3 + 2 = 5....
, subtraction
Subtraction

Subtraction is one of the four basic arithmetic operations; it is the inverse of addition, meaning that if we start with any number and add any number and then subtract the same number we added, we return to the number we started with....
, multiplication
Multiplication

Multiplication is the Operation of scaling one number by another. It is one of the four basic operations in elementary arithmetic .Multiplication is defined for Natural number in terms of repeated addition; for example, 4 multiplied by 3 can be calculated by adding 3 copies of 4 together:...
, division
Division (mathematics)

In mathematics, especially in elementary arithmetic, division is an arithmetic operation which is the inverse of multiplication.Specifically, if c times b equals a, written:...
, and square root
Square root

In mathematics, a square root of a number x is a number r such that r2 = x, or, in other words, a number r whose square is x....
. Some systems (particularly older, microcode
Microcode

Microcode is a layer of lowest-level instructions involved in the implementation of machine code instructions in many computers and other processors; it resides in a special high-speed memory and translates machine instructions into sequences of detailed circuit-level operations....
-based architectures) can also perform various transcendental function
Transcendental function

A transcendental function is a function that does not satisfy a polynomial equation whose coefficients are themselves polynomials, in contrast to an algebraic function, which does satisfy such an equation....
s such as exponential or trigonometric calculations, though in most modern processors these are done with software library routines.

In most modern general purpose computer architecture
Computer architecture

Computer architecture in computer engineering is the conceptual design and fundamental operational structure of a computer system. It is a blueprint and functional description of requirements and design implementations for the various parts of a computer, focusing largely on the way by which the central processing unit performs internally an...
s, one or more FPUs are integrated with the CPU
Central processing unit

A central processing unit is an electronic circuit that can execute computer programs. This broad definition can easily be applied to many early computers that existed long before the term "CPU" ever came into widespread usage....
; however many embedded processors, especially older designs, do not have hardware support for floating-point operations.

In the past, some systems have implemented floating point via a coprocessor
Coprocessor

A coprocessor is a computer processor used to supplement the functions of the primary processor . Operations performed by the coprocessor may be floating point arithmetic, graphics, signal processing, string processing, Savitsky-Golay derivation, or encryption....
 rather than as an integrated unit; in the microcomputer
Microcomputer

A microcomputer is a computer with a microprocessor as its central processing unit. Another general characteristic of these computers is that they occupy physically small amounts of space when compared to mainframe computer and minicomputers....
 era, this was generally a single microchip
Integrated circuit

In electronics, an integrated circuit is a miniaturized electronic circuit that has been manufactured in the surface of a thin Wafer of semiconductor material....
, while in older systems it could be an entire circuit board
Printed circuit board

A printed circuit board, or PCB, is used to mechanically support and electrically connect electronic components using Conductor pathways, or signal traces, industrial etchinged from copper sheets laminated onto a non-conductive substrate....
 or a cabinet.

Not all computer architectures have a hardware FPU. In the absence of an FPU, many FPU functions can be emulated, which saves the added hardware cost of an FPU but is significantly slower. Emulation can be implemented on any of several levels - in the CPU as microcode
Microcode

Microcode is a layer of lowest-level instructions involved in the implementation of machine code instructions in many computers and other processors; it resides in a special high-speed memory and translates machine instructions into sequences of detailed circuit-level operations....
, as an operating system
Operating system

An operating system is an interface between hardware and applications; it is responsible for the management and coordination of activities and the sharing of the limited resources of the computer....
 function, or in user space
User space

A conventional operating system usually segregates virtual memory into kernel space and user space. Kernel space is strictly reserved for running the kernel , kernel extensions, and some device drivers....
 code.

In most modern computer architectures, there is some division of floating-point operations from integer
Integer

The integers are natural numbers including 0 and their negative and non-negative numberss . They are numbers that can be written without a fractional or decimal component, and fall within the set ....
 operations. This division varies significantly by architecture; some, like the Intel x86
X86 architecture

The generic term x86 refers to the most commercially successful instruction set architecture in the history of personal computing. It derived from the model numbers, ending in "86", of the first few processor generations Backward compatibility with the original Intel 8086....
 have dedicated floating-point registers
Processor register

In computer architecture, a processor register is a small amount of Computer storage available on the CPU whose contents can be accessed more quickly than storage available elsewhere....
, while some take it as far as independent clocking schemes.

Floating-point operations are often pipelined. In earlier superscalar
Superscalar

A superscalar Central processing unit architecture implements a form of parallel computer called instruction level parallelism within a single processor....
 architectures without general out-of-order execution
Out-of-order execution

In computer engineering, out-of-order execution, OoOE, is a paradigm used in most high-performance microprocessors to make use of Instruction cycle that would otherwise be wasted by a certain type of costly delay....
, floating-point operations were sometimes pipelined separately from integer operations. Today, many CPUs/architectures have more than one FPU, such as the PowerPC 970
PowerPC 970

The PowerPC 970, PowerPC 970FX, PowerPC 970GX, and PowerPC 970MP, are 64-bit Power Architecture central processing unit from IBM introduced in 2002....
, and processors based on the NetBurst and AMD64 architectures (such as the Pentium 4
Pentium 4

The Pentium 4 brand refers to Intel's line of single-core mainstream Desktop computer and laptop central processing units introduced on November 20, 2000 ....
 and Athlon 64
Athlon 64

The Athlon 64 is an eighth-generation, AMD64-architecture microprocessor produced by AMD, released on September 23, 2003. It is the third processor to bear the name Athlon, and the immediate successor to the Athlon XP....
, respectively.)

When a CPU is executing a program that calls for a floating-point operation, there are three ways to carry it out:
  • a floating-point unit emulator (a floating-point library)
  • add-on FPU
  • integrated FPU


Floating-point library


Some floating-point hardware only supports the simplest operations -- addition, subtraction, and multiplication. But even the most complex floating-point hardware has a finite number of operations it can support -- for example, none of them directly support arbitrary-precision arithmetic
Arbitrary-precision arithmetic

In computer science, arbitrary-precision arithmetic, also called bignum arithmetic, is a technique whereby computer programs perform calculations on integers or rational numbers with an arbitrary number of numerical digits of precision , typically limited only by the available memory of the host system....
.

When a CPU is executing a program that calls for a floating-point operation not directly supported by the hardware, the CPU uses a series of simpler floating-point operations. In systems without any floating-point hardware, the CPU emulates it using a series of simpler fixed-point arithmetic
Fixed-point arithmetic

In computing, a fixed-point number representation is a real data type for a number that has a fixed number of digits after the radix point . Fixed-point number representation can be compared to the more complicated floating point number representation....
 operations that run on the integer arithmetic logic unit
Arithmetic logic unit

In computing, an arithmetic logic unit is a digital circuit that performs arithmetic and logicaloperations. The ALU is a fundamental building block of the central processing unit of a computer, and even the simplest microprocessors contain one for purposes such as maintaining timers....
.

The software that lists the necessary series of operations to emulate floating-point operations is often packaged in a floating-point library.

id software released a game, Quake
Quake

Quake is a first-person shooter computer game that was released by id Software on June 22, 1996. It was the first game in the popular Quake of computer and video games....
 which was the first 3D game to require a hardware FPU to play.

Integrated FPUs

In some cases, FPUs may be specialized, and divided between simpler floating-point operations (mainly addition and multiplication) and more complicated operations, like division. In some cases, only the simple operations may be implemented in hardware, while the more complex operations could be emulated.

In some current architectures, the FPU functionality is combined with units to perform SIMD
SIMD

In computing, SIMD is a technique employed to achieve data level parallelism....
 computation; an example of this is the replacement of the x87
X87

x87 is a math-related instruction subset of the x86 architecture of Central processing unit. It is so called because initially such instructions were processed by an coprocessor#Intel coprocessors chip 8087....
 instructions set with SSE
Streaming SIMD Extensions

In computing, Streaming SIMD Extensions is a SIMD instruction set extension to the x86 architecture, designed by Intel and introduced in 1999 in their Pentium III series processors as a reply to AMD's 3DNow! ....
 instruction set in the x86-64
X86-64

x86-64 is a superset of the x86. x86-64 Central processing units can run existing 32-bit or 16-bit x86 programs at full speed, but also support new programs written with a 64-bit address space and other additional capabilities....
 architecture used in newer Intel and AMD processors.

Add-on FPUs

In the 1980s, it was common in IBM PC
IBM PC

The IBM Personal Computer, commonly known as the IBM PC, is the original version and progenitor of the IBM PC compatible hardware platform ....
/compatible microcomputers for the FPU to be entirely separate from the CPU
Central processing unit

A central processing unit is an electronic circuit that can execute computer programs. This broad definition can easily be applied to many early computers that existed long before the term "CPU" ever came into widespread usage....
, and typically sold as an optional add-on. It would only be purchased if needed to speed up or enable math-intensive programs.

The IBM PC
IBM PC

The IBM Personal Computer, commonly known as the IBM PC, is the original version and progenitor of the IBM PC compatible hardware platform ....
, XT
IBM Personal Computer XT

The IBM Personal Computer XT, often shortened to the IBM XT or simply XT, was IBM's successor to the original IBM Personal Computer....
, and most compatibles based on the 8088 or 8086 had a socket for the optional 8087 coprocessor. The AT
IBM Personal Computer/AT

The IBM Personal Computer/AT, more commonly known as the IBM AT and also sometimes called the PC AT or PC/AT, was IBM's second-generation IBM Personal Computer, designed around the 6 MHz Intel 80286 microprocessor and released in 1984 as model number 5170....
 and 80286-based systems were generally socketed for the 80287, and 80386/80386SX based machines for the 80387 and 80387SX respectively, although early ones were socketed for the 80287, since the 80387 did not exist yet.

Starting with the 80486, in x86 chips the floating-point unit was integrated with the CPU, something true for almost all later x86-architecture processors. One notable exception is the 80486SX; it was also unusual in that no actual coprocessor was available -- the 80487 was a full CPU with an integrated FPU; when installed, the original 80486SX would be disabled.

In addition to the Intel x87 series, several other companies manufactured co-processors for the x86 series. These included Cyrix
Cyrix

Cyrix was a Central processing unit manufacturer that began in 1988 in Richardson, Texas as a specialist supplier of high-performance math coprocessors for Intel 80286 and Intel 80386 systems....
 which marketed its FasMath series as higher performance but fully x87 compatible, and Weitek
Weitek

Weitek Corporation was a former chip-design company that originally concentrated on floating point units for a number of commercial Central processing unit designs....
 which offered a high-performance but not fully x87 compatible series of coprocessors.

In addition to the Intel architectures, FPUs as coprocessors were available for the Motorola
Motorola

Motorola, Inc. is an United States, multinational, Fortune 100, telecommunications company based in Schaumburg, Illinois. It is a manufacturer of wireless telephone handsets, also designing and selling wireless network infrastructure equipment such as cellular transmission base stations and signal amplifiers....
 680x0 line. These FPUS, the 68881
Motorola 68881

The Motorola 68881 was a floating-point coprocessor computer chip that was utilized in some computer systems that used the Motorola 68020 or Motorola 68030 central processing unit....
 and 68882, were common in 68020/68030-based workstation
Workstation

A workstation is a high-end microcomputer designed for technical or scientific applications. Intended primarily to be used by one person at a time, they are commonly connected to a local area network and run multi-user operating systems....
s like the Sun 3 series. They were also commonly added to higher-end models of Apple Macintosh and Commodore Amiga series, but unlike IBM PC-compatible systems, sockets for adding the coprocessor were not as common in lower end systems. With the 68040
68040

68040 is a number which has the following meanings:* The Motorola 68040 computer processor chip.* The Zip Code for the town of Malmo, Nebraska, in the State of Nebraska....
, Motorola integrated the FPU and CPU, but like the x86 series, a lower cost 68LC040 without an integrated FPU was also available.

Also, there are add-on FPUs coprocessor
Coprocessor

A coprocessor is a computer processor used to supplement the functions of the primary processor . Operations performed by the coprocessor may be floating point arithmetic, graphics, signal processing, string processing, Savitsky-Golay derivation, or encryption....
 units for microcontroller
Microcontroller

A microcontroller is a small computer on a single integrated circuit consisting of a relatively simple CPU combined with support functions such as a crystal oscillator, timers, watchdog, serial and analog I/O etc....
 units (MCUs/µCs)]]/single-board computer
Single-board computer

Single-board computers are complete computers built on a single circuit board. The design is centered on a single or dual microprocessor with RAM, IO and all other features needed to be a functional computer on the one board....
 (SBCs)' which serve to provide floating-point arithmetic
Arithmetic

Arithmetic or arithmetics is the oldest and most elementary branch of mathematics, used by almost everyone, for tasks ranging from simple day-to-day counting to advanced science and business calculations....
 capability in systems that might not otherwise possess said functionality. The difference in these types of FPU coprocessors, when compared to more traditional floating-point coprocessors such as the 80x87 series, is that these add-on FPUs are host-processor-independent, possess their own programming requirements, and are often provided with their own integrated development environment
Integrated development environment

An integrated development environment also known as integrated design environment or integrated debugging environment is a software application that provides comprehensive facilities to computer programmers for software development....
s (IDE)s.

See also

  • ALU
    Arithmetic logic unit

    In computing, an arithmetic logic unit is a digital circuit that performs arithmetic and logicaloperations. The ALU is a fundamental building block of the central processing unit of a computer, and even the simplest microprocessors contain one for purposes such as maintaining timers....
  • Execution unit
    Execution unit

    In computer engineering, an execution unit is a part of a central processing unit that performs the operations and calculations called for by the computer program....
  • IEEE floating-point standard
    IEEE floating-point standard

    The first IEEE Standard for Binary Floating-Point Arithmetic set the standard for floating-point computation for 23 years. It became the most widely-used standard for floating point computation, and is followed by many Central processing unit and floating point unit implementations....
     (also known as IEEE 754)
  • floating-point unit