Carry and Overflow question. Really simple.

  • Thread starter Thread starter DorumonSg
  • Start date Start date
AI Thread Summary
A carry occurs when the sum of two binary numbers exceeds the bit limit, resulting in an extra bit, while overflow happens when the result of an addition of two positive numbers yields a negative result, indicating a sign error. When both carry and overflow occur, determining the overflow bit can be complex. In the example given, where the result is 1011 with a carry bit of 1 and a valid 3-bit result of 011, the overflow bit is not simply the carry but must be detected through specific conditions. The discussion emphasizes that identifying the overflow condition requires careful analysis rather than just examining the result. Understanding these concepts is crucial for accurate binary arithmetic operations.
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
Thread 'Have I solved this structural engineering equation correctly?'
Hi all, I have a structural engineering book from 1979. I am trying to follow it as best as I can. I have come to a formula that calculates the rotations in radians at the rigid joint that requires an iterative procedure. This equation comes in the form of: $$ x_i = \frac {Q_ih_i + Q_{i+1}h_{i+1}}{4K} + \frac {C}{K}x_{i-1} + \frac {C}{K}x_{i+1} $$ Where: ## Q ## is the horizontal storey shear ## h ## is the storey height ## K = (6G_i + C_i + C_{i+1}) ## ## G = \frac {I_g}{h} ## ## C...
Back
Top