早教吧 育儿知识 作业答案 考试题库 百科 知识分享

一道英文数学题.答对我会想办法送300分的.此题过今晚失效.6.Performtheadditionofthefollowingnumberswhicharewrittenasfive-bitbinarynumbersusingtwo'scomplementnotation.Whichadditionswillgiveerrorsduetooverflo

题目详情
一道英文数学题.答对我会想办法送300分的.此题过今晚失效.
6.Perform the addition of the following numbers which are written as five-bit binary numbers using two's complement notation.Which additions will give errors due to overflow?
Afterwards convert your answers to decimal numbers (Base 10).
a) 10111 b) 00111 c) 01010
11010 01100 10101
▼优质解答
答案和解析
先翻译一下
将下面的5比特二进制数字用二进制方法相加,哪一组会产生"溢出"的错误
并将您的答案用10进制表示出来
a) 10111
11010
---------
1 10001
显然溢出了
用10进制表示就是
23+26=49 超出了5比特二进制表达的最大10进制数31
b) 00111
01100
---------
10011
没有溢出
用10进制表示就是
7+12=19 没超出5比特二进制表达的最大10进制数31
c) 01010
10101
---------
11111
没有溢出
用10进制表示就是
10+21=31 没超过5比特二进制表达的最大10进制数31