- #1
leo255
- 57
- 2
I'm trying to understand carry & overflow bits. Carry seems pretty easy - If I'm not mistaken, if you carry on your last bit into a bit that you don't have, the carry flag is set to 1.
For overflow, I referred to another previous thread on here, of which one of the posters recommended the thread-starter look at the following link:
http://teaching.idallen.com/dat2343/00s/overflow.txt
This was very helpful to me, by clarifying that the overflow bit is the exclusive or (XOR), and is set to 1 when either (but not both) of the last bit or carry bit has a 1 carried into it. When they both have a 1 carried into them, it is set to 0.
I feel like I understand how to determine the overflow bit, but I don't understand what it means. The carry bit is easy: you are adding two numbers, and just don't have enough room (enough bits), so you don't get an accurate representation of the number. Just trying to get the same understanding for the overflow bit.
Thanks in advance for the help.
For overflow, I referred to another previous thread on here, of which one of the posters recommended the thread-starter look at the following link:
http://teaching.idallen.com/dat2343/00s/overflow.txt
This was very helpful to me, by clarifying that the overflow bit is the exclusive or (XOR), and is set to 1 when either (but not both) of the last bit or carry bit has a 1 carried into it. When they both have a 1 carried into them, it is set to 0.
I feel like I understand how to determine the overflow bit, but I don't understand what it means. The carry bit is easy: you are adding two numbers, and just don't have enough room (enough bits), so you don't get an accurate representation of the number. Just trying to get the same understanding for the overflow bit.
Thanks in advance for the help.