MHB Addition involving eight-bit 2's complement numbers and indicating overflow.

  • Thread starter Thread starter shamieh
  • Start date Start date
  • Tags Tags
    Addition Numbers
AI Thread Summary
The discussion centers on performing arithmetic operations with eight-bit 2's complement numbers, specifically the addition of two binary numbers: 00110110 and 01000101. The result of the addition is 01111011, which is confirmed to be correct. However, the explanation regarding overflow is clarified; while the sum does not result in overflow, the reasoning provided is inaccurate. Overflow occurs when the result exceeds the maximum representable value in 2's complement, which can happen when adding two positive numbers that exceed the limit. The key takeaway is that while the sum is correct and there is no overflow in this case, the rationale for determining overflow needs to be accurately understood.
shamieh
Messages
538
Reaction score
0
Perform the following operations involving eight bit 2's complement numbers and indicate whether arithmetic overflow occurs.

1.
00110110 + 01000101 = 01111011 Overflow: there is none because we are adding to positive numbers.

Did I do this correctly?
 
Technology news on Phys.org
The sum is correct, and there is indeed no overflow, but not because you are adding two positive numbers. When you add 1 to 01111111, there is an 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...

Similar threads

Back
Top