Square Root Calculation via Bitwise Operations on Associative Processing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for calculating square roots, particularly in digital form, are complex and inefficient due to the need to consider the entire guessed value and perform cumbersome multiplication and division operations, leading to high computational complexity.
Innovation Solution
A method that iterates on bits of the square root, using bit operations like shifting and OR to simplify calculations, reducing complexity from O(N^2) to O(N) by exploiting the fact that only a few powers of 2 are involved in initial iterations, and utilizing an associative processing unit to perform operations efficiently.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If traditional guessing and testing method is used to calculate square root, then the square root can be found by iterating over bits, but the computational complexity is high due to multiplication operations (2ab+b²) at each iteration
Solution Approach 1:
The patent replaces traditional multiplication operations with bitwise operations (shifts and adds). Specifically, the term 2ab is computed as (a << 1) + b, and b² is computed as (b << 1) + (b >> 1), eliminating the need for complex multiplication hardware while maintaining calculation accuracy.
Solution Approach 2:
The patent changes the computational parameters from working with full multiplication results to working with bit-shifted intermediate values. By representing numbers in binary form and using shift operations to multiply by powers of 2, the complexity is reduced from O(N²) to O(N) where N is the number of bits.
2Measurement precision
If the square root calculation is performed by considering the entire guessed value, then accurate results can be obtained, but the number of operations increases significantly
Solution Approach 1:
The patent segments the square root calculation into individual bit positions, processing one bit at a time from most significant to least significant. Each iteration determines a single bit of the result by comparing the current guess squared with the radicand, rather than evaluating the entire guessed value at once.
Solution Approach 2:
The patent performs partial calculations at each iteration, computing only the necessary terms (2ab + b²) for the current bit position rather than recalculating the entire square from scratch. This partial action approach maintains accuracy while reducing the workload at each step.
Data Source
AI summary
A method for calculating a square root B having N bits of a number X having 2N bits includes iterating on bits bi of square root B starting from the most significant bit until the least significant bit of square root B. For each iteration, the method includes locating a 1 at the squared location of bit bi in a CHECK variable, determining the value of bit bi from the result of a comparison of number X with a function of all previously found bits and a previous comparison outcome, shifting all previously found bits right 1 location in a CHECK variable, and adding the determined value of bit bi into its squared location in the CHECK variable.


