MHB Addition with eight bit 2's complement numbers. [Check my Work]

AI Thread Summary
The discussion focuses on performing arithmetic operations with eight-bit 2's complement numbers, specifically adding the binary numbers 01110101 and 11011110. The calculation results in 01010011, which corresponds to the decimal value of 83. The operation involves adding a positive number (117) and a negative number (-34), effectively calculating 117 - 34. The participant confirms the correctness of the result and inquires about the possibility of a simpler method for the calculation. It is clarified that while the operation results in a carry, there is no arithmetic overflow, affirming the accuracy of the result.
shamieh
Messages
538
Reaction score
0
Perform the following operations involving eight-bit 2's complement numbers and indicate whether arithmetic overflow occurs.

1) 01110101 + 11011110.

So I have a +Positive + a -Negative number. So I just added normally, and got the result of 01010011.

I realized before I started the problem I essentially had 117 +(-34) which is really 117 - 34 = 83.

So my result 01010011 = 83. Was there an easier way I could have done this? And, is this correct? It seems logically correct, but I've been known to screw these up. Also, there would be no overflow right?
 
Technology news on Phys.org
Your calculation is correct. The operation results in a carry, but no overflow.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top