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

  • Context: MHB 
  • Thread starter Thread starter shamieh
  • Start date Start date
  • Tags Tags
    Addition Numbers
Click For Summary
SUMMARY

The discussion focuses on the addition of eight-bit 2's complement numbers, specifically the operation 00110110 + 01000101, which results in 01111011. The conclusion is that there is no overflow in this case, contrary to the misconception that overflow occurs only when adding two positive numbers. The correct understanding is that overflow occurs when the result exceeds the maximum representable value in the 2's complement format, which is 01111111 for positive numbers.

PREREQUISITES
  • Understanding of eight-bit 2's complement representation
  • Knowledge of binary addition
  • Familiarity with overflow conditions in binary arithmetic
  • Basic concepts of signed and unsigned integers
NEXT STEPS
  • Study the rules of binary addition in 2's complement format
  • Learn how to detect overflow in binary arithmetic operations
  • Explore the implications of signed versus unsigned integers in programming
  • Examine examples of overflow scenarios in eight-bit arithmetic
USEFUL FOR

Students and professionals in computer science, software engineers working with low-level programming, and anyone interested in understanding binary arithmetic and overflow conditions in digital systems.

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.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 17 ·
Replies
17
Views
2K
Replies
1
Views
2K
Replies
3
Views
12K
  • · Replies 2 ·
Replies
2
Views
9K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K