






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Divisor: B = 1 0 0 0 1 (^) 0 1 1 1 0 0 0 0 0 0
0 1 1 1 0 0 1 1 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 0 0 0 1 0 0 1 0 1 0 0 0 1 0 1 0 0 1 0 0 0 1 0 0 0 1 1 0
Quotient = Q Dividend = A 5 bits of A < B, quotient has 5 bits 6 bits of A ≥ B Shift right B and subtract; enter 1 in Q 6 bits of remainder ≥ B
Remainder < B, enter 0 in Q; shift right B Remainder ≥ B
Remainder < B, enter 0 in Q
Shift right B and subtract; enter 1 in Q
Shift right B and subtract; enter 1 in Q
Final remainder: 000110
Divisor B = 10001 B + 1 = 01111
Comment E A Q SC 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 0 1 0 1 1 0 1 0 1 1 0 0 0 0 1 1 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1 0 1 0 1 0 0 0 1 1 0 0 1 1 1 1 1 1 0 0 1 0 0 1 1 0 1 0 0 0 1
Dividend: Shl EAQ Add B + 1 E = 1 Set Qn = 1 Shl EAQ Add B + 1 E = 1 Set Qn = 1 Shl EAQ Add B + 1 E = 0, leave Qn = 0 Add B
Divisor B = 10001 B + 1 = 01111
Comment E A Q SC
Shl EAQ Add B + 1 E = 0, leave Qn = 0 Add B Restore remainder Neglect E Remainder in A: Quotient in Q
Restore remainder Shl EAQ Add B + 1 E = 1 Set Qn = 1 (^1)
Divisor M = 1101 = (-3) M + 1 = 0011
Comment A Q 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 1 1 0 1
0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0
Initial value Shl AQ Add
Restore Shl AQ
Sign of A before and after the operation are Sign of A and M are different so, A ← A + M different, so restore the value of A
Add 1 1 0 1 1 1 1 0
Restore Shl AQ Add
Set Q 0 = 1 Shl AQ Add
Restore
Divisor M = 1101 = (-3) M + 1 = 0011
Comment A Q SC
Sign of A and M are different so, A ← A + M
Sign of A before and after the operation are same, so set Q 0 = 1
Sign of A before and after the operation are different, so restore the value of A
Signs of divisor and dividend are different Answer: quotient = 1110 (-2), remainder = 0001 (+1)
Procedure for square root - Similar to division restoring method
negative 00 01 10 00 01 10 01 00 01 10 01
Remainder = 00 00 0
q 1 q 2 1 1 0 1
q 3 q 4 = Q = 13 = A = 169 Subtract first test value 01 Answer positive; let q 1 = 1 Bring down next pair Subtract second test value 0q 101 Answer positive; let q 2 = 1 Bring down next pair Subtract third test value 00q 1 q 201 Answer negative; let q 3 = 0 Restore partial remainder Bring down next pair Subtract fourth test value 000q 1 q 2 q 301 Answer positive (zero); let q 4 = 1