2959 Views

what is restoring division algorithm


Anjali 10th Nov, 2019
Answers (2)
NAVEEN MEENA Student Expert 10th Nov, 2019

Dear Anjali, as you know that division algorithms can be restoring as well as non-restoring. I am mentioning you the restoring algorithm. Restoring division operates on fixed-point fractional numbers and depends on the assumption 0 < D < N.[citation needed]

The quotient digits q are formed from the digit set {0,1}.

The basic algorithm for binary (radix 2) restoring division is:

R := N

D := D << n -- R and D need twice the word width of N and Q

for i := n − 1 .. 0 do -- For example 31..0 for 32 bits

R := 2 * R − D -- Trial subtraction from shifted value (multiplication by 2 is a shift in binary representation)

if R ≥ 0 then

q(i) := 1 -- Result-bit 1

else

q(i) := 0 -- Result-bit 0

R := R + D -- New partial remainder is (restored) shifted value

end

end

-- Where: N = Numerator, D = Denominator, n = #bits, R = Partial remainder, q(i) = bit #i of quotient

The above restoring division algorithm can avoid the restoring step by saving the shifted value 2R before the subtraction in an additional register T (i.e., T = R << 1) and copying register T to R when the result of the subtraction 2R − D is negative.

All the best

Hope this helps


Payal 10th Nov, 2019

Hii aspirants

let me clear your doubt.

In a division algorithm there is a quotient and a remainder when we divide two number.Here, n-bit dividend is loaded in Q and divisor is loaded in M. Value of Register is initially kept 0 and this is the register whose value is restored during iteration due to which it is named Restoring.

I hope my answer will help you out

Good luck

Related Questions

Chandigarh University Admissi...
Apply
Ranked #1 Among all Private Indian Universities in QS Asia Rankings 2025 | Scholarships worth 210 CR
Amity University, Noida Law A...
Apply
700+ Campus placements at top national and global law firms, corporates, and judiciaries
Amity University, Noida BBA A...
Apply
Ranked amongst top 3% universities globally (QS Rankings)
UPES | BBA Admissions 2025
Apply
#41 in NIRF, NAAC ‘A’ Grade | 100% Placement, up to 30% meritorious scholarships | Last Date to Apply: 28th Feb
MAHE Manipal M.Tech 2025
Apply
NAAC A++ Accredited | Accorded institution of Eminence by Govt. of India | NIRF Rank #4
Sanskriti University LLM Admi...
Apply
Best innovation and research-driven university of Uttar Pradesh
View All Application Forms

Download the Careers360 App on your Android phone

Regular exam updates, QnA, Predictors, College Applications & E-books now on your Mobile

150M+ Students
30,000+ Colleges
500+ Exams
1500+ E-books