




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、 These weights are all powers of the base, which is 10. We can rewrite this:162.375Digits10210110010-110-210-3Weights To find the decimal value of a number, multiply each digit by its weight and sum the products.162.375 105 10 7 10 3 10 2 10 6 10 1-3-2-10121 6 2 . 3 7 5 Digits 100 10 1 1/10 1/100 1/
2、1000 Weights 10 basein 284959493 9 basein 345012 What about base 2?3210123222.22220 + 0 = 0 Sum of 0 with a carry of 00 + 1 = 1 Sum of 1 with a carry of 01 + 0 = 1 Sum of 1 with a carry of 01 + 1 = 0 Sum of 0 with a carry of 1 Example Add 1111 and 1100.0 - 0 = 0 Difference of 0 with a borrow of 00 -
3、 1 = 1 Difference of 1 with a borrow of 11 - 0 = 1 Difference of 1 with a borrow of 01 - 1 = 0 Difference of 0 with a borrow of 0 Example Subtract 100 from 111.111001010000 Example Multiply 1101 by 1010. Example Divide 1100 by 100. Example Find the 1s complement of binary number 10110010. Example Fi
4、nd the 2s complement of binary number 10110010. 25250011001100110010bitsMagnitudebitSignbitsMagnitudebitSign The decimal values are determined by summing the weights in all the magnitude bit positions where there are 1s. The sign is determined by examination of the sign bit.21.- isnumber decimal the
5、, therefore1; isbit sign The212221s, are therewhere positionsbit magnitude theallin weights theSumming.024Solution 25251110011000011001nThe decimal values of positive numbers are determined by summing the weights in all bit positions where there are 1s. The decimal values of negative numbers are det
6、ermined by summing the weights in all bit positions where there are 1s, and adding 1 to the result. The weight of the sign bit is given a negative value. 25251110011000011001100100011000000001100100011111111101101110122222101101100000100010000000010110110000010001000000001011011101001000112567-23124
7、-result the to1 Adding2422221s, are therewhere positionsbit magnitude theallin weights theSumming (b)2322221s, are therewhere positionsbit magnitude theallin weights theSumming (a).35670124Solution 25251110011100011001 The decimal values are determined by summing the weights in all bit positions whe
8、re there are 1s. The weight of the sign bit is given a negative value.8622221s, are therewhere positionsbit magnitude theallin weights theSumming (b)8622221s, are therewhere positionsbit magnitude theallin weights theSumming (a).13571246Solution0,20,2xxxxxnc For example, if n=8, then0111111101111111
9、0000001000000010000000010000000100000000000000002222cccc11111110111111011)0000001011111111(100000010)111111111 (000000101000000000000001011111111111111101)0000000111111111(100000001)111111111 (000000011000000000000000122cc1s complement For 2s complement signed numbers, the range of value for n-bit n
10、umbers isnnscombinatioTotal2) 12(211nntocccyxyx222 The addition process is stated as follows: add the two numbers and discard any final carry bit. Example(a) 00000111 + 00000100 = ?(b) 00001111 + 11111010 = ?(c) 00010000 + 11101000 = ?(d) 11111011 + 11110111 = ? Example(a) 01111101 + 00111010 = ?(b)
11、 10001000 + 11101101 = ?ccccyxyxyx2222)( The subtraction process is stated as follows: take the 2s complement of the subtrahend and add. Disiscard any final carry bit. Example (a) 0001000 - 00000011 = ?(b) 11100111 - 00010011 = ? The multiplication operation in most computers is accomplished using p
12、artial product method(部分积方法). The basic steps in the process are as follows: Determine if the signs of the two numbers are the same. This determines what the sign of the product will be. Change any negative number to true (uncomplemented) form. Starting with the LSB of the multiplier, generate the p
13、artial products. Shift each successive partial product one bit to the left. Add each partial product to the sum of the previous partial products to get the final product. If the sign of the product is negative, take the 2s complement of the product. Attach the sign bit to the product. The basic step
14、s in a division the process are as follows: Determine if the signs of the two numbers are the same. This determines what the sign of the quotient will be. Initialize the quotient to zero and initialize the partial remainder to the dividend. Subtract the divisor from the partial remainder using 2s co
15、mplement addition to get the next partial remainder. If the result is positive, add 1 to the quotient and repeat for the next partial remainder; otherwise, the division is complete. The designation 8421 indicates the binary weights of the four bits. 1010, 1011, 1100, 1101, 1110, and 1111 are invalid codes. The 8421 code is the predominant BCD code, and when we refer to BCD, we always mean the 8421 code unless otherwise stated. To determine a decimal number from a BCD
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年广东女子职业技术学院单招职业适应性测试题库1套
- 2025年广东省珠海市单招职业适应性测试题库1套
- 社区教育与终身学习体系的构建
- 2025年江门职业技术学院单招职业技能测试题库含答案
- 科技创新助力糖尿病治疗与控制
- 2025年湖南商务职业技术学院单招职业技能测试题库汇编
- SMIC ERP BPR项目软件版本升级模拟变更 标准程序变更 1-3-027-某大型企业SAP ERP方案44
- 2025年黑龙江冰雪体育职业学院单招职业倾向性测试题库完整
- 2025年云南省安全员知识题库及答案
- 2025年河南省濮阳市单招职业适应性测试题库含答案
- 304不锈钢管材质证明书
- DBJ 46-027-2013 海南省建筑塔式起重机安装使用安全评定规程
- SJG 103-2021 无障碍设计标准-高清现行
- 皇冠假日酒店智能化系统安装工程施工合同范本
- 港口集装箱物流系统建模与仿真技术研究-教学平台课件
- 合肥市城市大脑·数字底座白皮书2020
- 杭州湾跨海大桥项目案例ppt课件
- (完整版)光荣榜25张模板
- 工业催化剂作用原理—金属氧化物催化剂
- 优秀教材推荐意见(真实的专家意见)
- QTD01钢质焊接气瓶检验工艺指导书
评论
0/150
提交评论