计算机组成与设计 第五版答案_ch03_solution资料

上传人:w****i 文档编号:107673985 上传时间:2019-10-20 格式:PDF 页数:16 大小:1.75MB
返回 下载 相关 举报
计算机组成与设计 第五版答案_ch03_solution资料_第1页
第1页 / 共16页
计算机组成与设计 第五版答案_ch03_solution资料_第2页
第2页 / 共16页
计算机组成与设计 第五版答案_ch03_solution资料_第3页
第3页 / 共16页
计算机组成与设计 第五版答案_ch03_solution资料_第4页
第4页 / 共16页
计算机组成与设计 第五版答案_ch03_solution资料_第5页
第5页 / 共16页
点击查看更多>>
资源描述

《计算机组成与设计 第五版答案_ch03_solution资料》由会员分享,可在线阅读,更多相关《计算机组成与设计 第五版答案_ch03_solution资料(16页珍藏版)》请在金锄头文库上搜索。

1、Solutions 3 Chapter 3 Solutions S-3 3.1 5730 3.2 5730 3.3 0101111011010100 Th e attraction is that each hex digit contains one of 16 diff erent characters (09, AE). Since with 4 binary bits you can represent 16 diff erent patterns, in hex each digit requires exactly 4 binary bits. And bytes are by d

2、efi nition 8 bits long, so two hex digits are all that are required to represent the contents of 1 byte. 3.4 753 3.5 7777 (?3777) 3.6 Neither (63) 3.7 Neither (65) 3.8 Overfl ow (result ? ?179, which does not fi t into an SM 8-bit format) 3.9 ?105 ? 42 ? ?128 (?147) 3.10 ?105 ? 42 ? ?63 3.11 151 ? 2

3、14 ? 255 (365) 3.12 62?12 StepActionMultiplierMultiplicandProduct 0Initial Vals001 010000 000 110 010000 000 000 000 lsb=0, no op001 010000 000 110 010000 000 000 000 1Lshift Mcand001 010000 001 100 100000 000 000 000 Rshift Mplier000 101000 001 100 100000 000 000 000 Prod=Prod+Mcand000 101000 001 1

4、00 100000 001 100 100 2Lshift Mcand000 101000 011 001 000000 001 100 100 Rshift Mplier000 010000 011 001 000000 001 100 100 lsb=0, no op000 010000 011 001 000000 001 100 100 3Lshift Mcand000 010000 110 010 000000 001 100 100 Rshift Mplier000 001000 110 010 000000 001 100 100 Prod=Prod+Mcand000 00100

5、0 110 010 000000 111 110 100 4Lshift Mcand000 001001 100 100 000000 111 110 100 Rshift Mplier000 000001 100 100 000000 111 110 100 lsb=0, no op000 000001 100 100 000000 111 110 100 5Lshift Mcand000 000011 001 000 000000 111 110 100 Rshift Mplier000 000011 001 000 000000 111 110 100 lsb=0, no op000 0

6、00110 010 000 000000 111 110 100 6Lshift Mcand000 000110 010 000 000000 111 110 100 Rshift Mplier000 000110 010 000 000000 111 110 100 S-4 Chapter 3 Solutions 3.13 62?12 StepActionMultiplicandProduct/Multiplier 0Initial Vals110 010000 000 001 010 1 lsb=0, no op110 010000 000 001 010 Rshift Product11

7、0 010000 000 000 101 2 Prod=Prod+Mcand110 010110 010 000 101 Rshift Mplier110 010011 001 000 010 3 lsb=0, no op110 010011 001 000 010 Rshift Mplier110 010001 100 100 001 4 Prod=Prod+Mcand110 010111 110 100 001 Rshift Mplier110 010011 111 010 000 5 lsb=0, no op110 010011 111 010 000 Rshift Mplier110

8、010001 111 101 000 6 lsb=0, no op110 010001 111 101 000 Rshift Mplier110 010000 111 110 100 3.14 For hardware, it takes 1 cycle to do the add, 1 cycle to do the shift , and 1 cycle to decide if we are done. So the loop takes (3 ? A) cycles, with each cycle being B time units long. For a soft ware im

9、plementation, it takes 1 cycle to decide what to add, 1 cycle to do the add, 1 cycle to do each shift , and 1 cycle to decide if we are done. So the loop takes (5 ? A) cycles, with each cycle being B time units long. (3?8)?4tu ? 96 time units for hardware (5?8)?4tu ? 160 time units for soft ware 3.1

10、5 It takes B time units to get through an adder, and there will be A ? 1 adders. Word is 8 bits wide, requiring 7 adders. 7?4tu ? 28 time units. 3.16 It takes B time units to get through an adder, and the adders are arranged in a tree structure. It will require log2(A) levels. 8 bit wide word requir

11、es 7 adders in 3 levels. 3?4tu ? 12 time units. 3.17 0x33 ? 0x55 ? 0x10EF. 0x33 ? 51, and 51 ? 32?16?2?1. We can shift 0x55 left 5 places (0xAA0), then add 0x55 shift ed left 4 places (0x550), then add 0x55 shift ed left once (0xAA), then add 0x55. 0xAA0?0x550?0xAA?0x55 ? 0x10EF. 3 shift s, 3 adds.

12、(Could also use 0x55, which is 64?16?4?1, and shift 0x33 left 6 times, add to it 0x33 shift ed left 4 times, add to that 0x33 shift ed left 2 times, and add to that 0x33. Same number of shift s and adds.) Chapter 3 Solutions S-5 3.18 74/21 ? 3 remainder 9 StepActionQuotientDivisorRemainder 0Initial

13、Vals000 000010 001 000 000000 000 111 100 1 Rem=RemDiv000 000010 001 000 000101 111 111 100 Rem0,R+D,Q000 000010 001 000 000000 000 111 100 Rshift Div000 000001 000 100 000000 000 111 100 2 Rem=RemDiv000 000001 000 100 000111 000 011 100 Rem0,R+D,Q000 000001 000 100 000000 000 111 100 Rshift Div000

14、000000 100 010 000000 000 111 100 3 Rem=RemDiv000 000000 100 010 000111 100 101 100 Rem0,R+D,Q000 000000 100 010 000000 000 111 100 Rshift Div000 000000 010 001 000000 000 111 100 4 Rem=RemDiv000 000000 010 001 000111 110 110 100 Rem0,R+D,Q000 000000 010 001 000000 000 111 100 Rshift Div000 000000 0

15、01 000 100000 000 111 100 5 Rem=RemDiv000 000000 001 000 100111 111 111 000 Rem0,R+D,Q0,Q0,Q1 000 011000 000 010 001000 000 001 001 Rshift Div000 011000 000 001 000000 000 001 001 3.19. In these solutions a 1 or a 0 was added to the Quotient if the remainder was greater than or equal to 0. However,

16、an equally valid solution is to shift in a 1 or 0, but if you do this you must do a compensating right shift of the remainder (only the remainder, not the entire remainder/quotient combination) aft er the last step. 74/21 ? 3 remainder 11 StepActionDivisorRemainder/Quotient 0Initial Vals010 001000 000 111 100 1 R010 001000 001 111 000 Rem=RemDiv010 001111 000 111 000 Rem0,R+D010 001000 001 111 000 2 R010 001000 011 110 000 Rem=RemDiv010 001110 010 110 000 Rem0,R+D010 001000 01

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 其它办公文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号