Question: 2 s Complement Arithmetic Given the following decimal numbers: A = 5 6 B = 9 2 C = - 2 4 D = -

2s Complement Arithmetic
Given the following decimal numbers:
A =56
B =92
C =-24
D =-107
Using 8-bit twos complement arithmetic, perform the following six calculations as they
would be done on an 8-bit microprocessor. Recall that subtraction is performed by
negating the second operand and adding, i.e. all operations are performed with a binary
adder circuit.
1. A+B
2. A-B
3. A+C
4. A-C
5. C+D
For each calculation, show the 8-bit result (and check that it corresponds to the correct
decimal value. Note any overflow conditions i.e. the result is outside of the range of
values that can be represented by 8 bits in an 8-bit 2s complement number system.
For example: 5-10=0000010100001010
=00000101+(-00001010)
=00000101+11110110
00000101
+11110110
=11111011
=-00000101
=-5
This is the expected result, and is within the range of 8-bit 2s complement values

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!