Floating Point Division

Performing division is a difficult task as we have seen in case of fixed point arithmetic also. Divider architectures are complex to implement. Floating point division is nothing but a fixed point division with some extra hardwares to take care for the exponents. This extra hardwares make the divider circuit more complex. A floating point division where a number a divides another number b can be expressed as

\frac{S_b.M_b.2^{E_b}}{S_a.M_a.2^{E_a}} = (S_a\oplus S_b).\frac{M_b}{M_a}.2^{bias+(E_b - E_a)}

Thus it can be said that in a floating point division, mantissas are divided and exponents are subtracted.

The major steps for a floating point division are

  • Extract the sign of the result from the two sign bits.
  • Find the magnitude of the difference between two exponents ( E ). Add E to the bias if E_b>E_a or subtract E from the bias if E_b<E_a.
  • Divide mantissa of b ( M_b ) by mantissa of a ( M_a) considering the hidden bits.
  • If there is a leading zero then normalize the result by shifting it left.
  • Due to the normalization, the exponent is to be decremented according to the number of left shifts.

Floating point division can be more clearer with an example. Lets discuss a division operation between two numbers b= -3 and a=15.5 . The result of the division operation is -0.1935 .

Example : Floating Point Division

  • Representation: The input operands are represented as a = 1\_1010\_11110000000 and b = 0\_1000\_10000000000
  • Sign extraction: As one of the number is negative then sign of the output will be negative. Thus S = 1.
  • Exponent subtraction: E_a = 1010 and E_b = 1000 . Thus magnitude of their difference is E = 0010 . As E_b<E_a thus the resulted exponent is 0111 - 0010 = 0101.
  • Mantissa division: Divide the mantissas by any division algorithm used in the fixed point arithmetic. Considering the hidden bits, the division operation is restricted to 12-bits. The result of the division is 01100011000 .
  • There is a leading zero in the result thus a left shift can be applied to normalize the result. Thus the new result is 11000110000 . The final value of the mantissa ( M ) is 1000110000 excluding the hidden bit.
  • The action of normalization step must reflect on exponent correction. The value of the exponent is corrected by a decrement corresponding to a left shift. The new value of the exponent ( E ) is 0100.
  • The final result is 1\_0100\_1000110000 . The decimal value of this is -0.1933.

A simple architecture for floating point division is shown below in Figure 1 . There are three 4-bit subtractors used in the divider architecture, two for exponent subtraction and one for correction of exponents. The major hardware block is the divider block. The divider used here is a 12-bit unsigned divider and that can be any divider circuit as discussed in the blog for division. If the result of the divider contains any leading zero then normalizing step is executed. But here in this case, as the hidden bit is also considered thus the result can not go below 0.5 . Thus there will be maximum of one leading zero present in the result. This why only the MSB of the result ( q ) is considered and left shift block shifts only by one bit. Pipeline registers are also must be inserted according to the pipe lining stages of the divider.

Figure 1: A Basic Scheme for Floating Point Division

4 thoughts on “Floating Point Division”

        1. We do not provide emergency service here. You have to be happy with whatever we are having here..

Comments are closed.

Shopping Basket