The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+6 votes
Consider addition in two's complement arithmetic. A carry from the most significant bit does not always correspond to an overflow. Explain what is the condition for overflow in two's complement arithmetic.
asked in Digital Logic by Veteran (69k points)
edited by | 383 views
if the sign bit of both the signed numbers is not same as the sign bit of the product, then there is an overflow.

2 Answers

+10 votes
Best answer
XOR of $C_{in}$ with $C_{out}$ of the msb position.
answered by Veteran (31.1k points)
selected by
+6 votes

(a) In 2's complement addition Overflow happens only when :

  • Sign bit of two input numbers is 0, and the result has sign bit 1.
  • Sign bit of two input numbers is 1, and the result has sign bit 0.
answered by Veteran (36.4k points)

Related questions

+5 votes
2 answers
asked Dec 19, 2015 in Digital Logic by Arjun Veteran (348k points) | 823 views
+1 vote
1 answer
asked Apr 24, 2016 in Digital Logic by jothee Veteran (112k points) | 192 views
+10 votes
3 answers
asked Sep 13, 2014 in Digital Logic by Kathleen Veteran (69k points) | 749 views

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

34,256 questions
40,959 answers
39,868 users