Non-restoring division algorithm

前端 未结 2 901
执念已碎
执念已碎 2021-02-06 06:45

Does anyone know the steps for dividing unsigned binary integers using non-restoring division?

It\'s hard to find any good sources online.

i.e if A = 10111

2条回答
  •  野的像风
    2021-02-06 07:03

    (My answer is a little late-reply. But I hope it will be useful for future visitors)

    Algorithm for Non-restoring division is given in below image :

    enter image description here

    In this problem, Dividend (A) = 101110, ie 46, and Divisor (B) = 010111, ie 23.

    Initialization :

    Set Register A = Dividend = 000000
    Set Register Q = Dividend = 101110
    ( So AQ = 000000 101110 , Q0 = LSB of Q = 0 )
    Set M = Divisor = 010111, M' = 2's complement of M = 101001
    Set Count = 6, since 6 digits operation is being done here.
    

    After this we start the algorithm, which I have shown in a table below :

    In table, SHL(AQ) denotes shift left AQ by one position leaving Q0 blank.

    Similarly, a square symbol in Q0 position denote, it is to be calculated later

    enter image description here

    Hope all the steps are clear from the table !!!

提交回复
热议问题