Jump to content
Urch Forums

Overflow


AlbaLed

Recommended Posts

True nonevent, I should have phrased differently, when does addition overflow mean operation overflow in signed arithemtic. That is since we're using 2's complement than we can implement - by addition. My bad. Here is the answer

 

We're only inspecting most significant bit for carry in carry out

if carry in == carry out -> NO OVERFLOW

if carry in != carry out -> OVERFLOW

 

Hope this helps

Link to comment
Share on other sites

we're analysing only the most significant bit,

carry in = carry into the most significant bit

carry out = carry that results from the most significant bit additions

 

for example, most significan bit is on the left

 

1001

0111

most significan bit will have carry in AND carry out.=> no overflow

 

1001

1000

most significan bit will have no carry in AND carry out. => overflow

 

Hard ??

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...