LIVE Course for free

Rated by 1 million+ students
Get app now
0 votes
in Computer by (24.2k points)
closed by
With 4-bit 2's complement arithmetic, which of the following addition will result in overflow?
1. 1111+1101
2. 0110+0110
3. 1101+0101
4. 0101+1011

1 Answer

0 votes
by (24.2k points)
selected by
Best answer
Correct Answer - Option 1 : 1111+1101

The correct answer is 1111+1101

  • If the result of an arithmetic operation is too large (positive or negative) to fit into the resultant bit-group, then arithmetic overflow occurs.
  •  Overflow occurs if
  1. (+A) + (+B) = −C
  2. (−A) + (−B) = +C
  • In the first option, we have 1111 + 1101 which results 1 1100 (As per 2's Complement addition rule). Here, 1 at the LSB of Result is overflow bit.

  • The rules for detecting overflow in a two's complement sum are simple:
  1. If the sum of two positive numbers yields a negative result, the sum has overflowed.
  2. If the sum of two negative numbers yields a positive result, the sum has overflowed.
  3. Otherwise, the sum has not overflowed.
  • It is important to note the overflow and carry out ,both of them  can occur without the each other. In unsigned numbers, carry out is equivalent to overflow. In two's complement, carry out tells you nothing about overflow.
  • The reason for the rules is that overflow in two's complement occurs, not when a bit is carried out out of the left column, but when one is carried into it. That is when there is a carry into the sign. The rules detect this error by examining the sign of the result. A negative and positive added together cannot overflow, because the sum is between the addends. Since both of the addends fit within the allowable range of numbers, and their sum is between them, it must fit as well. 

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.