Carry and Overflow question. Really simple.

  • Thread starter Thread starter DorumonSg
  • Start date Start date
Click For Summary
SUMMARY

A carry occurs when the sum of two 8-bit binary numbers exceeds 8 bits, resulting in an additional bit, while overflow occurs when the result of adding two positive binary numbers yields a negative result, indicating a sign error. In cases where both a carry and overflow occur, the carry bit is not necessarily the overflow bit. To determine the overflow bit, one must analyze the most significant bit (MSB) of the result that is within range, rather than simply identifying the carry bit. The discussion emphasizes the importance of detecting overflow conditions rather than relying solely on the result.

PREREQUISITES
  • Understanding of binary arithmetic
  • Familiarity with 8-bit binary representation
  • Knowledge of signed and unsigned integers
  • Ability to interpret binary overflow conditions
NEXT STEPS
  • Study binary addition and carry generation in depth
  • Learn about detecting overflow in signed binary numbers
  • Explore the implications of carry and overflow in computer architecture
  • Review resources on binary number systems and their applications
USEFUL FOR

Computer science students, software developers, and anyone interested in understanding binary arithmetic and its implications in programming and computer architecture.

DorumonSg
Messages
61
Reaction score
0
Okay.

Let me get this right. A carry occurs when for example I add 2 8bits binary together and get 9 bits. The extra 1 bit is the carry right? (Means I get 1 extra bit from the original 2.)

So overflow means for example when I add 2 positive binary together, and I get a negative right? (Means the result is in the wrong sign.)

So what if a carry and overflow occurs together? Which is the overflow bit?

For example If I get the result 1011 when 1 is the carry bit and 011 is the result within range. Which is the overflow bit? 1 or 0? Is the overflow bit the carry bit? or must I take the MSB of the digit that is within ranger as the overflow bit?

Hope u understand my question?
 
Physics news on Phys.org

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
Replies
3
Views
2K
Replies
7
Views
14K
  • · Replies 3 ·
Replies
3
Views
8K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 4 ·
Replies
4
Views
16K
  • · Replies 1 ·
Replies
1
Views
3K