Select pages from below
Get latest updates at your E-mail

Friday 13 November 2015

single precision floating point mantissa multiplication :-

In this blog we mention the points for single precision floating point precision mantissa multiplication . For single precision floating point multiplication , we have 32 bit .

In single precision floating point multiplication bits explain are given like below

1:- 23 bits for mantissa
2:- 8 bits for exponent
3:- 1 bit sign

so if we combined  all the bits then total bits will come 32 bit .

In the single precision floating point multiplication also work structure :-

Like we have two numbers

X = 10.5
Y = 10.4

Mantissa of X (Mx)(23 bits ) = 10101000000000000000000

How we can find mantissa ?



We have to find the mantissa for the X number . In the number 10.5 we have to break the number in two parts.

10 (before the point )
.5 (after the point )

firstly we have to find the binary number of the 10 . The binary of the 10 is 1010 .
then we have to find the binary number of .5

.5 * 2  = 1.0

So combined 10.5 decimal number binary is 1010.100000000000000000000

now we have to find the mantissa of 10.5 . so we will shift the point towards left .

1.01010000000000000000000 * 2^3 .

In this 01010000000000000000000 is the mantissa of X of 23 bit .

Mx = 01010000000000000000000

Exponent

Ex(exponent ) :- 127+3(from power of 2 ) = 130 = 10000010 (binary )

Sign

If the umber is positive then sign bit will be 0 else sign bit will be 1 .

according to this

Mx(mantissa of x)= 01010000000000000000000
Ex (exponent of y ) = 10000010
Sx (sign of x) = 0

Y= 10.4
My =  01001100110011001100110
Ey = 10000010
Sy = 0

Now we will multiply both the mantissa numbers for find final mantissa number .

Example :-



For design the mantissa multiplication VHDL program see this video :-



Ez = Ex + Ey - 127

For Sz  =  Sx xor Sy

like this we can implement the single precision multiplication .

For any query , please post your query in comment box .