已阅读5页,还剩6页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1 CHAPTER 3 Data Storage (Solutions to Review Questions and Problems) Review Questions Q3-1.We discussed five data types: numbers, text, audio, images, and video. Q3-2.If the length of the bit pattern is L bits, the number of symbols that can be rep- resented by the bit pattern is 2L. Q3-3.In the bitmap graphic method each pixel is represented by a bit pattern. Q3-4.In vector graphic method, the size of the file is smaller and the image can be easily rescaled. However, vector graphic can not be used to represent the details of colors in a photo. Q3-5.The three steps are sampling, quantization, and encoding. Q3-6.Representations are the same except that the representable range of positive integers in unsigned method is twice the other methods. Q3-7.In both representations, the upper half of the range represents the negative numbers. However, the wrapping is different as shown in Figure Q3.7. In addition, there are two zeros in sign-and-magnitude but only one in twos complement. Figure Q3.7Wrapping for two number representations Wrapping in sign-and-magnitude representation Wrapping in twos complement representation Minimum-0+0Maximum Minimum0Maximum Wrapping Wrapping 2 Q3-8.In the signed-and-magnitude representation, there are two zeros. In twos complement representation there is only one zero. In the excess representa- tion, zero is represented by a positive number (bias) such as +127 and +1023. Q3-9.In both systems, the leftmost bit represents the sign. If the leftmost bit is 0, the number is positive; if it is 1, the number is negative. Q3-10. a. Normalization is necessary to make calculations easier. b. Mantissa is the bit sequence to the right of the decimal point after normal- ization. c. The computer stores the sign of the number, the exponent, and the mantissa. Problems P3-1.25 = 32 patterns. P3-2.102 = 100 if zero is allowed. 92 = 81 if zero is not allowed. P3-3. a. If zero is allowed, (102 for numbers) (263 for letters) = 1757600. b. If zero is not allowed, (92 for numbers) (263 for letters) = 1423656. P3-4.2n = 8 n =3 or log28 = 3. P3-5.2n = 7 n 3 or log27 = 2.81 3. P3-6.2n = 900 n 10 or log2900 = 9.81 10. With n = 10 we can uniquely assign 210 = 1024 bit pattern. Then 1024 900 = 124 patterns are unassigned. These unassigned patterns are not sufficient for extra 300 employees. If the company hires 300 new employees, it is needed to increase the number of bits to 11. P3-7.24 10 = 6 are wasted. P3-8.256 level can be represented by 8 bits because 28 = 256. Therefore, the num- ber of bits per seconds is (8000 sample/ sec) (8 bits / sample) = 64,000 bits /seconds P3-9. a. 23 = 16 + 4 + 2 +1 = (0000 1011)2 b. 121 = 64 + 32 + 16 + 8 +1 = (0111 1001)2 c. 34 = 32 +2 = (0010 0010)2. d. Overflow occurs because 342 255. 3 P3-10. a. 41 = 32 + 8 +1 = (0000 0000 0010 1001)2. b. 411 = 256 + 128 + 16 + 8 + 2 + 1 = (0000 0001 1001 1011)2. c. 1234 = 1024 + 128 + 64 + 16 + 2 = (0000 0100 1101 0010)2. d. 342 = 256 + 64 + 16 + 4 + 2 = (0000 0001 0101 0110)2. P3-11. a. The number 12 = b. Overflow occurs because 145 is not in the range 128 to +127. c. The number 56 = d. Overflow occurs because 142 is not in the range 128 to +127. P3-12. a. The number 102 = b. The number 179 = c. The number 534 = d. Over flow because 62,056 is not in the range (32768, +32767). P3-13. a. 0110 1011 = 64 + 32 + 8 + 2 +1 = 107. b. 1001 0100 = 128 + 16 + 4 = 148. c. 0000 0110 = 4 + 2 = 6. d. 0101 0000 = 64 + 16 = 80. Convert 12 to binary0 0 0 0 1 1 0 0 Apply twos complement operation1 1 1 10 1 0 0 Convert 56 to binary0 0 1 1 1 0 0 0 Convert 102 to binary0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 Convert 179 to binary0 0 0 0 0 0 0 0 1 0 1 1 0 0 1 1 Apply twos complement 1 1 1 1 1 1 1 1 0 1 0 0 1 1 0 1 Convert 534 to binary0 0 0 0 0 0 1 0 0 0 0 1 0 1 1 0 4 P3-14. a. 0111 0111 = b. 1111 1100 = c. 0111 0100 = d. 1100 1110 = P3-15.We change the sign of the number by applying the twos complement opera- tion. a. 01110111 10001001 b. 11111100 00000100 c. 01110111 10001001 d. 11001110 00110010 P3-16. a. 01110111 10001001 01110111 b. 11111100 00000100 11111100 c. 01110100 10001100 01110100 d. 11001110 00110010 11001110 Leftmost bit is 0. The sign is +0 1 1 1 0 1 1 1 Integer changed to decimal119 Sign is added+ 119 Leftmost bit is 1. The sign is 1 1 1 1 1 1 0 0 Apply twos complement operation0 0 0 00 1 0 0 Integer changed to decimal4 Sign is added4 Leftmost bit is 0. The sign is +0 1 1 1 0 1 0 0 Integer changed to decimal116 Sign is added+ 116 Leftmost bit is 1. The sign is 1 1 0 01 1 1 0 Apply twos complement operation0 0 1 10 0 1 0 Integer changed to decimal50 Sign is added50 5 P3-17. a. b. c. d. P3-18.Answers are shown with space between the three parts for clarity: a. S = 1, E = 0 + 127 = 127 = (01111111)2, M = 10001 (plus 18 zero added at the right to make the number of bits 23) 1 01111111 10001000000000000000000 b. S = 0, E = 3 + 127 = 130 = (10000010)2, M = 111111 (plus 17 zero added at the right) 0 10000010 11111100000000000000000 c. S = 0 E = 4 + 127 = 123 = (01111011)2, M = 01110011 (plus 15 zero added at the right) 0 01111011 01110011000000000000000 d. S = 1 E = 5 + 127 = 122 = (01111010)2, M = 01101000 (plus 15 zero added at the right) 1 01111010 01101000000000000000000 P3-19.Answers are shown with spaces between the three parts for clarity: a. S = 1 = 0 + 1023 = 1023 = (01111111111)2, M = 10001 (plus 47 zero added at the right) 1 01111111111 1000100000000000000000000000000000000000000000000000 b. S = 0 E = 3 + 1023 = 1026 = (10000000010)2 M = 111111 (plus 46 zero added at the right) 010000000010 1111110000000000000000000000000000000000000000000000 c. S = 0 E = 4 + 1023 = 1019 = (01111111011)2 1.10001= 20 1.10001 23 111.1111= 25 1.111111 22 101.110011= 20 1.01001100 25 101101.00000110011000= 20 1.0110100000110011000 6 M = 01110011 (plus 44 zero added at the right) 0 01111111011 0111001100000000000000000000000000000000000000000000 d. S = 1 E = 5 + 1023 = (01111111010)2 M = 01101000 (plus 44 zero added at the right) 101111111010 0110100000000000000000000000000000000000000000000000 P3-20.Answers are shown with spaces between the three parts for clarity: a. 7.1875 = (111.0011)2 = 22 1.110011 S = 0 E = 2 + 127 = 129 = (10000001)2 M = 110011 (plus 17 zero at the right) 0 10000001 11001100000000000000000 b. 12.640625 = (1100.101001)2 = 23 1.100101001 S = 1 E = 3 + 127 = 130 = (10000010)2 M = 100101001 (plus 14 zero at the right) 1 10000010 10010100100000000000000 c. 11.40625 = (1011.01101)2 = 23 1.01101101 S = 0 E = 3 + 127 = 130 = (10000010)2 M = 01101101 (plus 15 zero at the right) 0 10000010 01101101000000000000000 d. 0.375 = 0.011 = 22 1.1 S = 1 E = 2 + 127 =125 = (01111101)2 M = 1 (plus 22 zero at the right) 1 01111101 10000000000000000000000 P3-21. a. (01110111)2 = b. (11111100)2 = 0 1 1 10 1 1 1 +64 32 160 4 2 1 +119 1 1 1 11 1 0 0 64 32 168 4 2 1 124 7 c. (01110100)2 = d. (11001110)2 = P3-22. a. 53 = 32 + 16 + 4 + 1 = b. 107 = (64 + 32 + 8 + 2 + 1) = c. 5 = (4+1) = 10000101 d. 154 creates overflow because 154 is not in the range 127 to +127. P3-23. a. (53)16 = b. (107)16 = 0 1 1 10 1 0 0 +64 32 160 4 0 0 +116 1 1 0 01 1 1 0 64 0 08 4 2 0 78 + 0 32 160 4 0 1 00 1 10 1 0 1 =0011 0101 64 32 08 0 2 1 11 1 01 0 1 1 =1110 1011 0 0 00 4 0 1 10 0 00 1 0 1 =1000 0101 Convert 53 to binary0 10 1 0 0 1 1 Convert 107 to binary0 11 0 1 0 1 1 Apply ones complement operation1 00 10 1 0 0 8 c. (5)16 = d. (154)16 = Overflow because 154 is not in the range of 127 to 127 P3-24. a. (01110111)2 = b. (11111100)2 = c. (01110100)2 = d. (11001110)2 = P3-25. a. 01110111 10001000 01110111 b. 11111100 00000011 11111100 c. 01110100 10001011 01110100 d. 11001110 00110001 11001110 Convert 5 to binary0 00 0 01 0 1 Apply ones complement operation1 11 11 0 1 0 Leftmost bit is 0. The sign is plus01 1 1 0 1 1 1 Integer changed to decimal119 Sign is added+119 Leftmost bit is 1. The sign is minus11 1 1 1 1 0 0 Apply ones complement operation0 0 0 00 0 1 1 Integer changed to decimal3 Sign is added3 Leftmost bit is 0. The sign is plus01 1 1 0 1 00 Integer changed to decimal116 Sign is added+116 Leftmost bit is 1. The sign is minus11 0 0 1 1 1 0 Apply ones complement operation0 0 110 0 0 1 Integer changed to decimal49 Sign is added49 9 P3-26. a. (01110111)2 b. (11111100)2 c. (01110100)2 d. (11001110)2 P3-27. a. With 3 digits we can express 103 = 1000 integers, 500 for positives and 500 negatives. Then we can represent numbers in the range of 499 to 499. b. The first digit determine the sign of the number. The number is positive if the first digit is 0 to 4 and negative if the first digit is 5 to 9. c. We have two zeros, one positive and one negative. d. +0 = 000 and 0 = 999. P3-28. a. +234 234. b. +560 Overflow because 560 is not in the range 499 to 499. c. 125 874. d. 111 888. Ones complement =10001000Twos complement =10001001 +1 10001001 Ones complement =00000011Twos complement =00000100 +1 00000100 Ones complement =10001011Twos complement =10001100 +1 10001100 Ones complement =00110001Twos complement =00110010 +1 00110010 10 P3-29. a. With 3 digits we can represent 103 = 1000 integers, 500 for zero and posi- tives and 500 for negatives. Then we can represent numbers in the range of 500 to 499. b. The first digit determine the sign of the number. The number is zero or pos- itive if the first digit is 0 to 4 and negative if the first digit is 5 to 9. c. No, there is only one representation for zero (0 = 000). d. NA. P3-30. a. +234 234. b. +560 Overflow because 560 is not in the range 500 to 499. c. 125 874 + 1 = 875. d. 111 888 + 1 = 889. P3-31. a. With 3 digits we can represent 163 = 40
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025-2026学年秋天的雨试讲教案
- 2025-2026学年如何做教学简报设计
- 3.14 人性的崛起-文艺复兴美术 教学设计-高中美术人教版 (2019) 必修美术鉴赏
- (2026版)预防校园欺凌工作计划
- 火灾报警总线安装施工方案及技术措施
- 种植屋面防水施工方案及技术措施
- 锅炉使用单位劳动防护用品管理制度
- 击剑馆灯光系统施工方案及技术措施
- 粉尘作业场所车工日常检查安全操作规程
- 编剧剧本格式标准工作手册
- 物业客服的礼仪礼貌培训
- 餐馆用工合同
- 中国颅内破裂动脉瘤诊疗指南2021版
- DL∕T 2584-2022 增量配电网接入电力系统技术规定
- TD/T 1069-2022 国土空间生态保护修复工程验收规范(正式版)
- (高清版)WST 360-2024 流式细胞术检测外周血淋巴细胞亚群指南
- CTT4000用户手册(维护分册)V1.1
- 2024年广东阳江市交通投资集团有限公司招聘笔试参考题库含答案解析
- QCC点焊良率改善提案
- 药品调剂基础:中药处方调剂实操
- 公共体育场田径跑道和足球场建设项目可行性研究报告
评论
0/150
提交评论