非还原分割算法 [英] Non-restoring division algorithm

查看:147
本文介绍了非还原分割算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道使用非还原除法对无符号二进制整数进行除法的步骤吗?

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

很难在网上找到任何好的资源。

It's hard to find any good sources online.

即如果 A = 101110 B = 010111

在非恢复性除法中,如何找到 A除以B ?寄存器在每个步骤中是什么样的?

how do we find A divided by B in non-restoring division? What do the registers look like in each step?

谢谢!

推荐答案

(我的回答是稍后回复。但是我希望它对将来的访问者有用)

(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 :

在此问题中,股息(A)= 101110,即46,除数(B)= 010111,即23。

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

初始化:

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 :

在表中, SHL(AQ)表示将AQ左移一个位置,而Q0留空

类似地,位于Q0位置的正方形符号表示,待稍后计算

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

希望所有步骤都在从表中清除!!!

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

这篇关于非还原分割算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆