- 1、本文档共31页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
计算机组与成原理第5讲定点除法
* * 计算机组成原理 Principles of Computer Organization 广义双语教学课程 09/skyclass25/ 青岛理工大学 校级精品课程 /ec/C84/ 第3章 运算方法和运算部件 ( 4 ) Several algorithms exist to perform division in digital designs. These algorithms fall into two main categories: slow division and fast division. Slow division algorithms produce one digit of the final quotient per iteration. Examples of slow division include restoring, non-performing restoring, non-restoring, and SRT division. Fast division methods start with a close approximation to the final quotient and produce twice as many digits of the final quotient on each iteration. Newton-Raphson and Goldschmidt fall into this category. 补码一位乘法 Tow’s complement Multiplication Booths multiplication algorithm is a multiplication algorithm that multiplies two signed binary numbers in twos complement notation. The algorithm was invented by Andrew Donald Booth in 1951 . 比较法(又称Booth法)是实现补码一位乘法的一种方案。 Modern computers embed the sign of the number in the number itself, usually in the twos complement representation. That forces the multiplication process to be adapted to handle twos complement numbers, and that complicates the process a bit more. 补码一位乘法 设 [X]补= X0 .X1X2……Xn-1Xn ,[Y]补= Y0 .Y1Y2……Yn-1Yn 根据校正法 [X·Y]补 = [X]补·(0. Y1Y2……Yn-1Yn)+ [-X]补·Y0 =[X]补·(-Y0 +Y12-1+Y22-2+……+Yn 2-n) 式中,Y0是符号位(“0”为正,“1”为负),Yn+1是在乘数最低位Yn后增设的附加位,初值为0。 =[X]补·[-Y0+(Y1-Y12-1)+(Y22-1-Y22-2)+…+( Yn 2-(n-1)-Yn 2-n)] =[X]补·[(Y1-Y0)+( Y2-Y1)2-1+…+(Yn-Yn-1)2-(n-1) +(0-Yn) 2-n] =[X]补·[(Y1-Y0)+( Y2-Y1)2-1+…+( Yn+1-Yn) 2-n] =[X]补· 则 [X·Y]补 = [X]补·(-Y0 + ) 48页 [P0]补 =0 开始时,部分积为0, 然后在上一步的部分积上加 ( Yi+1-Yi) ·[X]补(i=n,…,2,1,0),再右移一位,得到新的部分积。如此重复n+1步,最后一次不移位,得到[X·Y]补。 从该递推公式可归纳出补码一位比较乘法的运算规则 递推公式( Booth公式): [P1]补 ={[P0]补+( Yn+1-Yn)·[X]补}·2-1 [P2]补 ={[P1]补+( Yn-Yn-1)·[X]补}·2-1 … [Pi]补 ={[Pi-1]补+( Yn-i+2-Yn-i+1)·[X]补}·2-1 … [Pn]补 ={[Pn-1]补+( Y2-Y1)·[X]补}·2-1 [Pn+1]补 =[Pn]补+( Y1-Y0)·[X]补 [X·Y]补=[X]补·[(Y1-Y0)+( Y2-Y1)2-1+…+( Yn+1-Yn) 2-n] =[X·Y]补 部分积的初值=0 位积+部分积 然后
您可能关注的文档
- 蓄电池结与构、工作原理 .ppt
- 蒙卡特罗与方法课件3 .ppt
- 蓝桥杯第与四届大赛规则说明 .ppt
- 蓝色对比与关系、分条内容蓝色PPT图表模板 .ppt
- 薄膜屈曲与力学分析 .ppt
- 蓝宝石晶与体生长技术 .ppt
- 薄膜电容与替代电解电容技术知识 .ppt
- 蓝巢在线与平台文件系统培训课件 .ppt
- 薄膜论坛与报告-浙江正泰太阳能 .ppt
- 薛定谔方与程 一维势阱 .ppt
- 福莱特玻璃集团股份有限公司海外监管公告 - 福莱特玻璃集团股份有限公司2024年度环境、社会及管治报告.pdf
- 广哈通信:2024年度环境、社会及治理(ESG)报告.pdf
- 招商证券股份有限公司招商证券2024年度环境、社会及管治报告.pdf
- 宏信建设发展有限公司2024 可持续发展暨环境、社会及管治(ESG)报告.pdf
- 品创控股有限公司环境、社会及管治报告 2024.pdf
- 中信建投证券股份有限公司2024可持续发展暨环境、社会及管治报告.pdf
- 洛阳栾川钼业集团股份有限公司环境、社会及管治报告.pdf
- 361度国际有限公司二零二四年环境、社会及管治报告.pdf
- 中国神华能源股份有限公司2024年度环境、社会及管治报告.pdf
- 广西能源:2024年环境、社会及治理(ESG)报告.pdf
文档评论(0)