Question: Write an ARM Assembly code subroutine to approximate the square root of an argument using the bisection method. Your code must approximate the square root
Write an ARM Assembly code subroutine to approximate the square root of an argument using the bisection method. Your code must approximate the square root of an integer between 0 and 2^(31) -1. Using integer maths is sufficient (no floating point or fractions are required); your code will return the truncated (integer portion) of the square root.
Base your software on the following pseudocode:

INPUT: Argument x, endpoint values a, b, such that a < b OUTPUT: value which differs from sqrt(x) by less than 1 done = 0 a = 0 b = square root of largest possible argument (e.g. ~216). C = -1 do { c_old
Step by Step Solution
3.47 Rating (150 Votes )
There are 3 Steps involved in it
To implement the bisection method for approximating the square root in ARM Assembly well translate t... View full answer
Get step-by-step solutions from verified subject matter experts
