223k views
3 votes
Perform binary subtraction of A−B under signed representation (by doing A+(−B) ). What is the result? Does overflow occur?

i) A=11011 B=01101
ii) A=111 B=010
iii) A=0011 B=1000

1 Answer

4 votes

Final answer:

Performing binary subtraction under signed representation, A + (-B), results in -18, -6, and 7 for the given cases. Overflow does not occur for any of the cases.

Step-by-step explanation:

In binary subtraction under signed representation, we perform A + (-B). Here are the results for each given pair of numbers:

  1. A = 11011 and B = 01101.

    A + (-B) = 11011 + (-01101) = 11011 + 10011 (2's complement representation of -01101) = 101110 (in binary).

    The result is 101110 (in binary) or -18 (in decimal). Overflow does not occur because the result can be represented within the given number of bits.

  2. A = 111 and B = 010.

    A + (-B) = 111 + (-010) = 111 + 101 (2's complement representation of -010) = 1010 (in binary).

    The result is 1010 (in binary) or -6 (in decimal). Overflow does not occur because the result can be represented within the given number of bits.

  3. A = 0011 and B = 1000.

    A + (-B) = 0011 + (-1000) = 0011 + 1000 (2's complement representation of -1000) = 00111 (in binary).

    The result is 00111 (in binary) or 7 (in decimal). Overflow does not occur because the result can be represented within the given number of bits.

User Karim Abdell Salam
by
9.0k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.

9.4m questions

12.2m answers

Categories