# Re: Floating Point Division

Discussion in 'VHDL' started by Derek Simmons, May 9, 2010.

1. ### Derek SimmonsGuest

On May 8, 1:26 am, niyander <> wrote:
> Hello,
>
> I am trying to implement (simulation + synthesis) a 32bit floating
> point division unit.
> To perform division basically the 23+1bit (1 hidden bit) mantissa part
> is divided with the other mantissa, and then 8bit exponents are
> subtracted and finally normalization is applied.
> So for the mantissa division part I am following Binary Division by
> Shift and Subtract method (http://courses.cs.vt.edu/~cs1104/Division/
> ShiftSubtract/Shift.Subtract.html).
> I can use this algorithm if both the mantissa's are such that no
> remainder is left (i.e. remainder=0) but if mantissa's are such that a
> remainder is left then how can i proceed with the division? if i
> proceed then quotient would be inaccurate.
>
> I have already searched google for srt division algorithm but i am not
> able to find an simple example. If some one give me srt division
> example/algorithm for a value of 22/7 i would really appreciate that.
>
> Thanks

How about if the remainder is greater than half the number you're
dividing by add one to the least significant bit. If you can track
down a copy of the manual for the Motorola MC88000 processor they have
4 or 8 methods for rounding.

Derek Simmons, May 9, 2010

2. ### niyanderGuest

On May 9, 5:59 am, Derek Simmons <> wrote:
> On May 8, 1:26 am, niyander <> wrote:
>
>
>
> > Hello,

>
> > I am trying to implement (simulation + synthesis) a 32bit floating
> > point division unit.
> > To perform division basically the 23+1bit (1 hidden bit) mantissa part
> > is divided with the other mantissa, and then 8bit exponents are
> > subtracted and finally normalization is applied.
> > So for the mantissa division part I am following Binary Division by
> > Shift and Subtract method (http://courses.cs.vt.edu/~cs1104/Division/
> > ShiftSubtract/Shift.Subtract.html).
> > I can use this algorithm if both the mantissa's are such that no
> > remainder is left (i.e. remainder=0) but if mantissa's are such that a
> > remainder is left then how can i proceed with the division? if i
> > proceed then quotient would be inaccurate.

>
> > I have already searched google for srt division algorithm but i am not
> > able to find an simple example. If some one give me srt division
> > example/algorithm for a value of 22/7 i would really appreciate that.

>
> > Thanks

>
> How about if the remainder is greater than half the number you're
> dividing by add one to the least significant bit. If you can track
> down a copy of the manual for the Motorola MC88000 processor they have
> 4 or 8 methods for rounding.

thanks

niyander, May 9, 2010