in CO and Architecture
916 views
5 votes
5 votes
  1.  1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1
  2.  0 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 
  3.  0 1 0 0 0 0 0 0 + 0 1 1 0 0 0 0 0 

    Please justify your answer. I'm not getting a clue whether the given number is in 2's complement . Should I have to find 2's complenet of the given number or not
in CO and Architecture
by
916 views

1 Answer

5 votes
5 votes
Best answer
Overflow = (Carry out of MSB) Ex-OR (Carry on MSB)

3rd will give Overflow.

Ref.http://sandbox.mc.edu/~bennet/cs110/tc/add.html
selected by

4 Comments

Since in any number system Most Significant Bit represents the sign bit, hence signs of both the operands should be different in option 2.

So without delving into much arithmetic, I daresay addition operator will not end up with an overflow.

Right?

0
0
@Anurag overflow and carry are different.
1
1

Yes Arjun sir, but the resulting number will always be between 01111111 & 11111111 in option 2.So how overflow is possible?

1
1
Yes, 2 option is adding a positive and negative number (if we take numbers as signed)- can not produce overflow but can produce carry.
3
3

Related questions