Author | Message |
---|---|
venny
Posts: 61
|
Posted 15:56 Apr 15, 2015 |
In the new homework 2, I'm getting 3 overflows for the last 3 questions. Am I doing something wrong? for B) I'm adding 1100011 + 1010101 = 10111000. The CIN is 0 and the COUT is 1. If CIN and COUT the opposite, that's ok, right? Then I do check the range of the answer and it's between -64->63, but -29+-43 is -72. This falls out of the range, so even with the calculations I did before, it's an overflow. For C) I'm ending up doing 10110+11101 = 110011 <- has 6 bits. Now the CIN = 1 and COUT = 1, meaning this is an overflow, right? For D) I just added them in decimal form coming out to -92 and checked the range which is -64-> 63. This is out of range and thus, it's another overflow. Seeing 3 overflows out of 4 problems is making me worry if I did something wrong. |