projectus.freehost7.com:UG and PG level projects,mini projects and many more here ...

ALGORITHM FOR SQUARE ROOT IMPLEMENTATION:

Consider X is an N bit number whose square root is to be determined. X can be expressed as

(1)

,                               (2)

Considering   to be the nearest perfect square number of. Now assume that the square root of  is . Then equation (2) can be rewritten as

(3)

Now consider,                                       (4)

Where Q is the quotient and R is the remainder.  Inserting equation (4), equation (3) can be reformulated as

(5)

Equation (5) can be rewritten as

(6)

If  then X is a perfect square number whose square root is (Z+Q).

If  then X is not a perfect square number whose nearest integral

square root is (Z+Q). The procedure to calculate the square root by division method can be described in the following steps:

Step 1: Obtain the nearest square root of the N/2 Most Significant Bits (MSB). Assume that the output is Z.

Step 2: Determine the square of Z by combining Yavadunam and Duplex methodology.

Step 3: Subtract the squared output from N/2 MSB.

Step 4: Obtain the double of Z.

Step 5: Combine the output of the subtractor and the next N/4 bits. Divide the combination by 2Z. Assume the quotient as Q and the remainder as R.

Step 6: Determine the square of Q and subtract Q2 from. If the residue is zero then Z+Q is the perfect square root otherwise Z+Q is the square root of nearest perfect square.

Step 7: Divide the residue by the double of (Z+Q) and the quotient is the floating point part of the square root.