Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to find a square root of a large number?

Status
Not open for further replies.

joe1986

Full Member level 4
Joined
Jan 25, 2008
Messages
204
Helped
24
Reputation
48
Reaction score
11
Trophy points
1,298
Activity points
2,922
how to find the square root of a large no such as 5432 without using a calculator???.....
 

square root???

analyzing? like
5432 / 2
2716 / 2
1366 / 2
688 / 2
344 / 2

and so on..
 

    joe1986

    Points: 2
    Helpful Answer Positive Rating
Re: square root???

there is a solution maybe useful:

if we have a lookup table from square of number in domain of need, then we choose two square so that our number be between them, example: (73^2)<5432<(74^2)
then we choose form two threshold X1=73 & X2=74 nearest number to our number. example X=74.
Then we use this formula:
(X+Y)^2=(X^2+2XY+Y^2)=5432
if we suppose Y^2 is small, we can select Y=(5432-74^2)/(2*74)=-0.29

then the sqrt(5432)=74-0.29=73.71

this is a good method. but the limitation of it is need to lookup table of square number where if your domain is not big this is good method.

if this solution be good, click helped me!!!!!
 

Re: square root???

buddy no lookup table ....no calculator .........absoluteely manually...........or free hand..............the person above you made sense.............gud try!!!
 

Re: square root???

This is no complex.
you can in first step select (70^2)<5432<(80^2)

Then Y=(5432-4900)/(2*70)=3.8

Then 70+3.8=73.8

you can with a loop decrease the error and increase your certainly.
 
  • Like
Reactions: Severo

    Severo

    Points: 2
    Helpful Answer Positive Rating
Re: square root???

FROM WHERE DID THIS COME (70^2)<5432<(80^2)
 

Re: square root???

Hi Joe,
Here is a method that might prove useful if all you had to do was hand calculation
I will describe it using two numbers say one is 5342 and second 15342.

A. I will write 5342 into pairs of two numbers followed by decimals as shown
53 42. 00 00 00

1) Now take a good look at the first pair its less than 7² so I will subtract 49 from 53. The remainder is 4.

2) Now append the next pair to this remainder I have 442. Now write down twice of the number whose square you have subtracted above that will be 14 right. write it as 140 now compute that number x such that (140+x)*x < 442 that number will be 3. So subtract 143*3 from 442 remainder is 13. Add 2*3 to 140 that will be 146.

I have written down the basic steps above I know the explaination is a bit lousy but thats the best form I could put it in without confusion.
Now let me explain the logic behind this method, its really simple say a given number X = (abcd.efgh...)² now arrange X into number pairs P1 P2 P3 .... note that the pairing shold start from the last number.
Now guess 'a' from P1 then let R1 = P1 - a². Then guess b such that 2ab + b² should be < R1P2. Then let R2 = R1P2 - (2ab + b²).
Then guess c such that 2ac + 2bc + c² < R2P3 ... so on and so forth...

I am attaching a image that will demostrate this method using 5342 and 15342.

~Kalyan.
 
Re: square root???

HEY NICE TRY....................but during an aptitude test i may not hav so much time.............is the METHOD SHOWN by selpak a valid one.........???
 

Re: square root???

Thats a pretty decent method as your are boiling it down to the nearest interval in terms of 2^i and 2^i+1.

I would even go with Salam2000 method of shorting it to the nearest 10s interval as the approximation in this case would be better than 2^i method but will be tedious for numbers with more digits.

~Kalyan.
 

Re: square root???

can u explain Salam2000 method......hard to understand???
 

square root???

y not work ?

square root of 100 is 10
100 / 2
50 / 2
25 / 5
5 / 5
1

2*2 * 5*5 = 4 * 25 = 100
ummm but at ur example well reach to 177 which can be factored (but by itself and one) anymore , i can`t go farther.

anyway u can go to google and type "finding square roots manually" , or for better results "square roots manually"
try it and u`ll find pretty straightforward tutorials, i can`t get u some specific information cause i dun have enough time, i`m sorry.
 

Re: square root???

Here's an idea of how you can zone in to the value fairly quickly. For your example:

Start out with 7^2=49 and 8^2 = 64. Then 70^2 = 4900 and 80^2 = 6400. So your square root is between those two numbers (70 and 80). Start by splitting the difference. 75^2 = (25*3)^2=25^2*3^2=625*9 = 5625. Since that's higher than your number, the square root has to be between 70 and 75. Also, since it's pretty close to your number, just decrease by 1, so 74^2 = 5476. Then try 73^2 = 5329. If you keep decreasing like that, you should zone in pretty fast. The key is to figure out the smallest set of numbers that it's obviously in between. Once you do that, it's not too bad to just multiply out the numbers you're guessing. It's iterative, and it sucks because sometimes it may take awhile, but without a calculator or anything, it's probably one of the faster ways of doing it.

You could also do some kind of weighting to choose your next guess, but figuring out the weights is probably a waste of time.
 

Re: square root???

NOT A BAD IDEA.......................any more METHODS ARE ALWAYS welcome...........????
 

Re: square root???

can u explain Salam2000 method......hard to understand???


Synchronous Square Root Computing Machine
________________________________________
Background

Computing square root of a real number is a fundamental mathematical operation. Before the invention of calculator and computer, people would use method such as bisection and Newtonian algorithm to manually calculate square root. Today, a few buttons pushed, we get the result in no time. In this project we will implement a synchronous square root machine using a simple algorithm.

Square Root Algorithm
1. Split the given number into groups, each containing two digits, starting from the least significant bit. (In our example, these groups will be "89", "34", and "3".)
2. Find the largest number, which when multiplied by itself does not exceed the number, created by the first two-digit group. Write down this number as the first digit of the result. (In our case, the first two-digit number is "3" and the number, which when multiplied by itself does not exceed "3", is "1".)
3. Subtract the square of this number from the number given by the first two digits and concatenate this number with the next two digits from the initial number. (In our case, we have to subtract "1 x 1 = 1" from "3" and then concatenate it with "34". As a result, we get 234.)
4. Multiply by two (for binary numbers, it will be just a shift!) the number, which constitutes the result computed so far, and concatenate it with the largest digit, which satisfies the following condition: the product of this digit and the number resulting from concatenation does not exceed the number received at the previous step. (In our case, the result computed so far is "1"; multiplied by two it will be "2", and the digit to be selected is "8" because "28 x 8 = 224 < 234", while "29 x 9 = 261 > 234".)
5. Write down the digit, which we have just found (in our case, "8") as the next digit of the result.
6. Subtract 224 from 234 and concatenate it with the next group of numbers. In our case it is "1089".
7. If the resulting number (in our case it is "1089") is equal to 0 (the square root is extracted exactly), stop. Else go to step 4.

If the square root cannot be extracted exactly, algorithm should be stopped at step 7 when we have found enough digits belonging to the floating-point part of the result.
To implement this machine we will need shift registers, a subtractor, a comparator, and a few registers to hold intermediate values. Of course, we will also need a FSM to controller the flow of the data.
 

Last edited:

The best choice depends on precision required, due each procedure presents distinct convergence behaviour.

+++
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top