Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 3

Unit-3

Square root algorithm


• Let A be the radicand (equivalent to dividend in division)
• Q – the square root
• R – the remainder
• Q2 + R = A or √A = Q and a remainder
• For K bits in A (K even), Q will have K/2 bits; Q = q1q2q3…qK/2
• The first value is 01
• The second test value is 0q101
• The third test value is 00q1q201
• The fourth test value is 000q1q2q301 etc.
• Mark the bits of A in groups of two starting from left
Procedure for square root - Similar to division restoring method
q1 q2 q3 q4
1 1 0 1 = Q = 13

10 10 10 01 = A = 169
01 Subtract first test value 01
01 Answer positive; let q1 = 1
01 10 Bring down next pair
01 01 Subtract second test value 0q101
00 01 Answer positive; let q2 = 1
00 01 10 Bring down next pair
00 11 01 Subtract third test value 00q1q201
negative Answer negative; let q3 = 0
00 01 10 Restore partial remainder
00 01 10 01 Bring down next pair
00 01 10 01 Subtract fourth test value 000q1q2q301
Remainder = 00 00 0 Answer positive (zero); let q4 = 1

You might also like