Square root extractor |
Square root extraction |
The square-root extraction is relatively infrequent. Nevertheless, it is used among other things for Euclidean distance and least square. The square-root operator is similar to the division's one, therefore most of what we already know about division applies as well to square root. Often the same operator is used either for division or for extraction, collision of the two operations being too rare to justify two operators, moreover each very costly. |
Square root extraction algorithm |
In the drawing below, the area of each red rectangle represents one bit weight. Only the '1'
are drawn. Therefore the total area shown is the weighted sum of all the bits. The goal of the game is to find a square with an area equal to a given argument, represented by the area of a blue circle, just by observing one test bit ( £ or > ) and by clicking the bits representing the side of the square. After convergence the sough after number is the side of the square. Click on objects to disclose their area. |
Square root extractor |
We want to get Q = ÖA. This is equivalent to Q = A ÷ Q. Therefore if
Q is written on n bits, A is written on 2n bits.
with the initial conditions :
When the recurrence stops, we have Q = Q0 = Si qi
* 2i.
|
Restoring square root extractor |
The restoring square-root extractor utilizes the same conditional subtractor ( "SC" ) cells as the restoring divider.
|
Many cells of this circuit have constant inputs ( '0' or '1' ). They are not simplified here as they are in the restoring divider. |
Non-restoring root extractor |
The non-restoring square root extractor uses the same add/subtract "AS" calls as the non-restoring divider.
|
Since the radix Q is positive, its most significant digit qn is always '1'.
This extractor always gives an odd radix Q. If the final remainder is negative (sign bit = 1), then Q is too large
and can be easily reduced since it is odd. The main interest of the two extractor versions in to show that digit values '0', '1' or '-1' ("BS" notation) can be used for the radix . |