您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 综合/其它 > 计算机组成与设计-第五版答案-CH03-Solution
Solutions3Chapter3SolutionsS-33.157303.257303.30101111011010100Theattractionisthateachhexdigitcontainsoneof16differentcharacters(0–9,A–E).Sincewith4binarybitsyoucanrepresent16differentpatterns,inhexeachdigitrequiresexactly4binarybits.Andbytesarebydefinition8bitslong,sotwohexdigitsareallthatarerequiredtorepresentthecontentsof1byte.3.47533.57777(3777)3.6Neither(63)3.7Neither(65)3.8Overflow(result179,whichdoesnotfitintoanSM8-bitformat)3.910542128(147)3.1010542633.11151214255(365)3.126212StepActionMultiplierMultiplicandProduct0InitialVals001010000000110010000000000000lsb=0,noop0010100000001100100000000000001LshiftMcand001010000001100100000000000000RshiftMplier000101000001100100000000000000Prod=Prod+Mcand0001010000011001000000011001002LshiftMcand000101000011001000000001100100RshiftMplier000010000011001000000001100100lsb=0,noop0000100000110010000000011001003LshiftMcand000010000110010000000001100100RshiftMplier000001000110010000000001100100Prod=Prod+Mcand0000010001100100000001111101004LshiftMcand000001001100100000000111110100RshiftMplier000000001100100000000111110100lsb=0,noop0000000011001000000001111101005LshiftMcand000000011001000000000111110100RshiftMplier000000011001000000000111110100lsb=0,noop0000001100100000000001111101006LshiftMcand000000110010000000000111110100RshiftMplier000000110010000000000111110100S-4Chapter3Solutions3.136212StepActionMultiplicandProduct/Multiplier0InitialVals1100100000000010101lsb=0,noop110010000000001010RshiftProduct1100100000000001012Prod=Prod+Mcand110010110010000101RshiftMplier1100100110010000103lsb=0,noop110010011001000010RshiftMplier1100100011001000014Prod=Prod+Mcand110010111110100001RshiftMplier1100100111110100005lsb=0,noop110010011111010000RshiftMplier1100100011111010006lsb=0,noop110010001111101000RshiftMplier1100100001111101003.14Forhardware,ittakes1cycletodotheadd,1cycletodotheshift,and1cycletodecideifwearedone.Sothelooptakes(3A)cycles,witheachcyclebeingBtimeunitslong.Forasoftwareimplementation,ittakes1cycletodecidewhattoadd,1cycletodotheadd,1cycletodoeachshift,and1cycletodecideifwearedone.Sothelooptakes(5A)cycles,witheachcyclebeingBtimeunitslong.(38)4tu96timeunitsforhardware(58)4tu160timeunitsforsoftware3.15IttakesBtimeunitstogetthroughanadder,andtherewillbeA1adders.Wordis8bitswide,requiring7adders.74tu28timeunits.3.16IttakesBtimeunitstogetthroughanadder,andtheaddersarearrangedinatreestructure.Itwillrequirelog2(A)levels.8bitwidewordrequires7addersin3levels.34tu12timeunits.3.170x330x550x10EF.0x3351,and51321621.Wecanshift0x55left5places(0xAA0),thenadd0x55shiftedleft4places(0x550),thenadd0x55shiftedleftonce(0xAA),thenadd0x55.0xAA00x5500xAA0x550x10EF.3shifts,3adds.(Couldalsouse0x55,whichis641641,andshift0x33left6times,addtoit0x33shiftedleft4times,addtothat0x33shiftedleft2times,andaddtothat0x33.Samenumberofshiftsandadds.)Chapter3SolutionsS-53.1874/213remainder9StepActionQuotientDivisorRemainder0InitialVals0000000100010000000000001111001Rem=Rem–Div000000010001000000101111111100Rem0,R+D,Q000000010001000000000000111100RshiftDiv0000000010001000000000001111002Rem=Rem–Div000000001000100000111000011100Rem0,R+D,Q000000001000100000000000111100RshiftDiv0000000001000100000000001111003Rem=Rem–Div000000000100010000111100101100Rem0,R+D,Q000000000100010000000000111100RshiftDiv0000000000100010000000001111004Rem=Rem–Div000000000010001000111110110100Rem0,R+D,Q000000000010001000000000111100RshiftDiv0000000000010001000000001111005Rem=Rem–Div000000000001000100111111111000Rem0,R+D,Q000000000001000100000000111100RshiftDiv0000000000001000100000001111006Rem=Rem–Div000000000000100010000000011010Rem0,Q1000001000000100010000000011010RshiftDiv0000010000000100010000000110107Rem=Rem–Div000001000000010001000000001001Rem0,Q1000011000000010001000000001001RshiftDiv0000110000000010000000000010013.19.Inthesesolutionsa1ora0wasaddedtotheQuotientiftheremainderwasgreaterthanorequalto0.However,anequallyvalidsolutionistoshiftina1or0,butifyoudothisyoumustdoacompensatingrightshiftoftheremainder(onlytheremainder,nottheentireremainder/quotientcombination)afterthelaststep.74/213remainder11StepActionDivisorRemainder/Quotient0InitialVals0100010000001111001R010001000001111000Rem=Rem–Div010001111000111000Rem0,R+D0100010000011110002R010001000011110000Rem=Rem–Div010001110010110000Rem0,R+D0100010000111100003R010001000111100000Rem=Rem–Div010001110110110000Rem0,R+D0100010001111000004R010001001111000000Rem=Rem–Div010001111110000000Rem0,R+D010001001111000000S-6Chapter3SolutionsStepActionDivisorRemainder/Quotient5R010001011110000000Rem=Rem–Div010001111110000000Rem0,R0=10100010011010000016R010001011010000010Rem=Rem–Div010001001001000010Rem0,R0=10100010010010000113.20201326592inbothcases.3.21jal0x000000003.220×0C000000=00001100000000000000000000000000=00001100000000000000000000000000signispositiveexp=0×18=24127=103thereisahidden1mantissa=0answer=1.0×21033.2363.25100111111.0120normalize,movebinarypoint5totheleft1.111110125signpositive,exp1275132Fin
本文标题:计算机组成与设计-第五版答案-CH03-Solution
链接地址:https://www.777doc.com/doc-1418968 .html