## Restoring Division Algorithm for Unsigned IntegerRestoring division is usually performed on the fixed point fractional numbers. When we perform division operations on two numbers, the division algorithm will give us two things, i.e., quotient and remainder. This algorithm is based on the assumption that 0 < D < N. With the help of digit set {0, 1}, the quotient digit q will be formed in the restoring division algorithm. The division algorithm is generally of two types, i.e., fast algorithm and slow algorithm. Goldschmidt and Newton-Raphson are the types of fast division algorithm, and STR algorithm, restoring algorithm, non-performing algorithm, and the non-restoring algorithm are the types of slow division algorithm. In this section, we are going to perform restoring algorithm with the help of an unsigned integer. We are using restoring term because we know that the value of register A will be restored after each iteration. We will also try to solve this problem using the flow chart and apply bit operations. Here, register Q is used to contain the quotient, and register A is used to contain the remainder. Here, the divisor will be loaded into the register M, and n-bit divided will be loaded into the register Q. 0 is the starting value of a register. The values of these types of registers are restored at the time of iteration. That's why it is known as restoring. Now we will learn some steps of restoring division algorithm, which is described as follows:
In this example, we will perform a Division restoring algorithm.
So we should not forget to restore the value of the most significant bit of A, which is 1. So, register A contains the remainder 2, and register Q contains the quotient 3. Next TopicDebugging a Machine-level Program |