第4章-按位操作.doc

  1. 1、本文档共5页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
第4章-按位操作

Chapter 4 Operation On Bits By 黄永平,权勇,孙永雄,王智,丰小月,孙铭会 Knowledge point: 4.1 Arithmetic operations. 4.2 Logical operations. 4.3 Mask. 4.4 Shift operations. REVIEW QUESTIONS 3. What happens to a carry form the leftmost column in the final addition? ( Knowledge point 4.1) A:The carry is discarded. 5. Define the term overflow. ( Knowledge point 4.1) A:Overflow is an error that occurs when you try to store a number that is not within the range defined by the allocation. 8. Name the logical binary operations. ( Knowledge point 4.2) A:NOT, AND, OR, and XOR. 10. What does the NOT operator do? ( Knowledge point 4.2) A:It inverts bits.(it changes 0 to 1 and 1 to 0) 11. When is the result of an AND operator true? ( Knowledge point 4.2) A:Both bits are 1. 12. When is the result of an OR operator true? ( Knowledge point 4.2) A:Neither bit is 0. 13. When is the result of an XOR operator true? ( Knowledge point 4.2) A:The two bits are not equal. 17. What binary operation can be used to set bits? What bit pattern should the mask have? ( Knowledge point 4.3) A:OR. Use 1 for the corresponding bit in the mask. 18. What binary operation can be used to unset bits? What bit pattern should the mask have? ( Knowledge point 4.3) A:AND. Use 0 for the corresponding bit in the mask. 19. What binary operation can be used to flip bits? What bit pattern should the mask have? ( Knowledge point 4.3) A:XOR. Use 1 for the corresponding bit in the mask. MULTIPLE-CHOICE QUESTIONS 20. c is an arithmetic bit operation.. ( Knowledge point 4.1) a. The exclusive OR b. The unary NOT c. Subtraction d. All of the above 21. d is a logical bit operation.. ( Knowledge point 4.2) a. The exclusive OR b. The unary NOT c. The binary AND d. All of the above 22. The c method of integer representation is the most common method to store integer in computer memory. ( Knowledge point 4.1) a. signed-and-magnitude b. one’s complement c. two’s complement d. unsigned integer

文档评论(0)

haihang2017 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档