Binary number arithmetic question... quiz question I got wrong but can't figure out the right answers to.?
Use seven bits to accommodate each number together with its sign. In each case, determine if there's an overflow.
A. (+35) + (+40)
B. (-35) + (-40)
C. (-35) - (+40)
- gitter1226Lv 51 decade agoFavorite Answer
Convert 35 and 40 to binary using 7 digits. First, I have to assume that these numbers are using two's complement, since B & C use negative numbers.
1101011 converts to a negative number in two's complement which is not valid. the easier way to remember is that signed two's bit complement numbers can only represent numbers -64 <= x <= 63
Since 35 + 40 = 70 which is greater than 63, you know there will be overflow.
B & C follow directly.Source(s): Software Architect.