- 3
- 0
- 约5.83千字
- 约 31页
- 2016-08-22 发布于河南
- 举报
2-3编码
课前习题: 1、已知:1810=000100102 求其相反数的补码表示: -1810=( )2 2、写出-4910的二进制原码、补码表示。 3、已知:100111012是某个数的补码,问其用十进制的表达为? 4、分别以符号-数值数制、反码、补码将-39表示为一个8位数。 1、已知:1810=000100102 求其相反数的补码表示: -1810=( )2 2、写出-4910的8为二进制原码、补码表示11001111 3、已知:100111012是某个数的补码,问其用十进制的表达为? -99 4、分别以符号-数值数制、反码、补码将-24表示为一个8位数11100111 Sum up for the Complement (总结) Positive number has the same: Sign-Magnitude, Ones’ – Complement, and Two’s- Complement ( 正数的原码、反码、补码相同) Sign extension(符号位扩展) We can convert an n-bit two’s complement number X into an m-bit one, but some care is needed. If m n, we must append m - n copies of X’s sign bit to the left of X . That is, we pad a positive number with 0s and a negative one with 1s; this is called sign extension. If m n, we discard X’s n – m leftmost bits; however, the result is valid only if all of the discarded bits are the same as the sign bit of the result . What is most interesting is that we can also subtract n (or add -n) by moving the arrow 16 - n positions clockwise. Notice that the quantity 16 - n is what we defined to be the 4-bit two’s complement of n, that is, the two’s-complement representation of -n. (P41) 2.6 Two’s – Complement Addition and Subtraction (二进制补码的加法和减法) we define [x] to be the two’s complement representation of x [x + y] = ( [x] + [y] ) [x - y] = ( [x] + [-y] ) -5 1011 +7 0111 + -6 + 1010 + +3 +0011 2.6.3 Overflow(溢出)(P41) 如果加法运算产生的和超出了数制表示的范围,则结果发生了溢出(Overflow)。 Addition of two numbers with different signs can never produce overflow, but addition of two numbers of like sign can . An addition overflows if the signs of the addends’ signs are the same but the sum’s sign is different from the addends’ sign. 2.6.3 the rule for detecting overflow (溢出的
您可能关注的文档
- 国外大学数控.docx
- 国外计算机科学类核心期刊.doc
- 图形学chap4.ppt
- 堪站课程.ppt
- 外围电路.ppt
- 多媒体习题总汇.doc
- 字符串数字转换.doc
- 如何用SurCode Dolby Digital 5.1 Encoder生成AC3格式.docx
- 字符和数字点阵.doc
- 宽带名词解释.doc
- 小区绿化施工协议书.docx
- 墙面施工协议书.docx
- 1 古诗二首(课件)--2025-2026学年统编版语文二年级下册.pptx
- (2026春新版)部编版八年级道德与法治下册《3.1《公民基本权利》PPT课件.pptx
- (2026春新版)部编版八年级道德与法治下册《4.3《依法履行义务》PPT课件.pptx
- (2026春新版)部编版八年级道德与法治下册《6.2《按劳分配为主体、多种分配方式并存》PPT课件.pptx
- (2026春新版)部编版八年级道德与法治下册《6.1《公有制为主体、多种所有制经济共同发展》PPT课件.pptx
- 初三教学管理交流发言稿.docx
- 小学生课外阅读总结.docx
- 餐饮门店夜经济运营的社会责任报告(夜间贡献)撰写流程试题库及答案.doc
最近下载
- 部编版六年级语文下册全册一课一练同步练习题配知识点归纳(含答案).pdf VIP
- 预制空心内夯载体桩技术.pdf VIP
- 2025版《全基础题型》高考数学-基础题(721例题型).docx VIP
- (正式版)DB21∕T 4190-2025 《既有住宅适老化改造建筑设计规程》.pdf VIP
- T_NBSC 001-2026(可口革囊星虫养殖技术规范).pdf
- 餐饮业食品安全管理八项制度.pptx VIP
- 法医学中的法医现场勘查学 .pdf VIP
- 中风的中医诊疗方案.pdf VIP
- 2025年自来水供应专属承包合同样本版.docx VIP
- (2025春新教材)人教版PEP版三年级英语下册全册教案件 .pdf
原创力文档

文档评论(0)