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.
 
Thread 'Star maps using Blender'
Blender just recently dropped a new version, 4.5(with 5.0 on the horizon), and within it was a new feature for which I immediately thought of a use for. The new feature was a .csv importer for Geometry nodes. Geometry nodes are a method of modelling that uses a node tree to create 3D models which offers more flexibility than straight modeling does. The .csv importer node allows you to bring in a .csv file and use the data in it to control aspects of your model. So for example, if you...
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top