217k views
3 votes
Assuming 2 complement 8 bit representation, consider the following addition:

+70 = 01000110
+80 = 01010000
-----------------
10010110
Is this correct? Why or why not?

User Zeachco
by
7.7k points

1 Answer

2 votes

Final answer:

The sum of +70 and +80 in 2's complement 8-bit representation incorrectly shows a negative number due to an overflow error, as the correct result (+150) exceeds the 8-bit range.

Step-by-step explanation:

The question is regarding the addition of two numbers using 2's complement 8-bit representation. When adding +70 (01000110) to +80 (01010000), the sum should be calculated using binary addition rules.

If we add these two numbers:

01000110 (70 in decimal)
+ 01010000 (80 in decimal)
-----------
10010110

The result 10010110 in 2's complement represents a negative number because the most significant bit (leftmost bit) is 1, indicating a negative number in 2's complement. However, we're expecting a positive result because both numbers being added are positive. The result should be +150 in decimal, but the binary result is beyond the range of 8-bit representation, i.e., -128 to +127, hence it is an overflow error.

User Astockwell
by
8.9k points