资源预览内容
第1页 / 共82页
第2页 / 共82页
第3页 / 共82页
第4页 / 共82页
第5页 / 共82页
第6页 / 共82页
第7页 / 共82页
第8页 / 共82页
第9页 / 共82页
第10页 / 共82页
亲,该文档总共82页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
QGelmButerOrganizationChapter6Complexarithmeticober槐6.1Single-precisionfix-pointmultiplication6.2Single-precisionfix-pointDivision6.3Floatoperation1、thebasicalgorithmforsign-magmultiplicationDrelationbetweenalgorithmbyhandcalculationandmachine画SignofresultisdeterminedbyXORthesignsoftwonumber,whilethevalueisdeterminedbythemultiplicationofabsolutevalueofthenumber.口Multiplicand(被标敏)xsisnmag=Xf.Xn-1.XIX0口Multiplier(系数)tysianmg=yF.ya-T.yIY0留Multiplicationresult:口zsiznmg=(Xfy+(0.xn-1.XIX0)(0.yan-1.y1Y0)whereXfandyfaresignbits.1、thebasicalgorithmforsign-magmultiplicationOEx-1.0.1101X1.1011(1handcalculation0.1101x01011Problems:Partproduct11011)addendincreases012)Dits0faddendincreases0000十H010.10001111Withsign:1.100011111、thebasicalgorithmforsign-magmultiplicationOEx-1.0.1101X1.1011(2multiplicationinhardware口Setregisters:A:Storesumofpartproduct,high-bitofproductB:StoreMultiplicandC:StoreMultiplier,low-pitofproduct口Setinitialvalues:A=00.0000B=|X|=00.1101C=|Y|=00.10111、thebasicalgorithmforsign-magmultiplicationsteps“condition“operateAC“Cn00.0000.10111Cnz=1+00.110100.1101一一00.0110Ll0l2)“Cnzil+B一00.U01A4170l0011O-00:1001一11.103弘,“Cn=0+0+00.0000110100.1001口000】00111.14)Cn=1+卫+00.110101.0001一00.100011111、thebasicalgorithmforsign-magmultiplication)proce55“Xesy一弘1、thebasicalgorithmforsign-magmultiplicationG)Operationrules(1Operand,resultarerepresentedbysign-magcode;(2)Calculatebyabsolutevalue,andsignbitishandledindependently;(3丿Twosignbitsaresetio(B)and(AJ:(4丿Thestatusof(Cn)decidethenextoperationstep;(5Loopforntimes(faddup、shiftright)1、thebasicalgorithmforsign-magmultiplicationLogicimplementation移位电路A部分积厂LU加法嚣心A-ALUB-ALUALUX2-AB被乘数计数嚣CaLogiccircuitofsign-magmultiplication2、thebasicalgorithmfor2“5complmultiplication面Dataisstoredwith2“5complementrepresentation,whichisnotconvenientformultiplication.町Introducemultiplicationof2“5complement
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号