edited by
2,818 views
1 votes
1 votes
If we take a n n-bit register to store the result of addition/subtraction of two n-bit unsigned binary numbers, then if the end-carry occurs, then the end-carry is the part of the result. Is it overflowing or not?
If we take a n n-bit register to store the result of addition/subtraction of two n-bit signed binary numbers, then if the end-carry occurs, then it is the sign bit of the result.

 Is it overflowing or not?
edited by

2 Answers

Best answer
5 votes
5 votes

"If we take a n bit register to store result of addition/subtraction of two n bit unsigned binary numbers , then if the end-carry occurs , then the end-carry is the part of the result . Is it overflow or not ?"

It is indeed overflow. But overflow means nothing for unsigned operations. It is meant only for signed operations. If the carry happens out of the most significant bit position, then result is wrong and this is denoted by CARRY flag for unsigned numbers. 

"If we take a n bit register to store result of addition/subtraction two n bit signed binary numbers , then if the end-carry occurs ,then it is the sign-bit of the result  .  Is it overflow or not ?"

Yes. It is overflow. And we get wrong answer here (since sign changes). And this is exactly why overflow flag is used for signed operations. 

 

Overflow is useful for signed operations while carry flag is useful for unsigned operations.

http://teaching.idallen.com/dat2343/10f/notes/040_overflow.txt

selected by
0 votes
0 votes
IF YOU GET A CARRY IN UNSIGNED ARITHMETIC THEN IT IS A MUST OVERFLOW CONDITION

BUT FOR A SIGNED IT MAY OR MAY BE NOT . IN A SIGNED YOU GET OVERFLOW CONDITION ONLY WHEN ADDITION OF 2 NEGATIVE NUMBER GIVE POSTIVE AND ADDITION OF 2 POSITIVE NUMBER GIVE NEGATIVE RESULT :)

Related questions

0 votes
0 votes
1 answer
1
val_pro20 asked May 16, 2019
1,059 views
$Exclusive-OR$ gate has a propagation delay of $10$ ns and that the $AND$ or $OR$ gates have a propagation delay of $5$ ns.What is the total propagation delay time in the...
2 votes
2 votes
0 answers
2
Tuhin Dutta asked Nov 3, 2017
501 views
The condition for overflow in the addition of two 2's complement numbers in terms of the carry propagated by the two most significant bits is ___________.
4 votes
4 votes
3 answers
3
Anil Khatri asked Nov 14, 2015
3,143 views