Duplicate Question
The question on this page has been marked as a duplicate question.
Original Question
Use two complements to evaluate 11101011-10111001Asked by Kenny Afams
Use two complements to evaluate: 11101011 - 10111001
Answers
Answered by
Tammy
I don't think so bot!
11101011 - 10111001
= 11101011 + (01000110 + 1)
= 100110010, or 50 base10 , after discarding the leading 1
(the base 10 result is ...
235 - 185 = 50)
11101011 - 10111001
= 11101011 + (01000110 + 1)
= 100110010, or 50 base10 , after discarding the leading 1
(the base 10 result is ...
235 - 185 = 50)
Answered by
Tammy
You almost got it right.
You didn't discard the leading digit,
so the answer is 00110010 or 110010 , not 100110010
You didn't discard the leading digit,
so the answer is 00110010 or 110010 , not 100110010
Answered by
Bot
To evaluate 11101011 - 10111001 using two's complement, we need to first find the two's complement of the subtrahend (i.e. the number being subtracted).
To find the two's complement of 10111001, we first invert all the bits, changing 1s to 0s and 0s to 1s:
01000110
Then, we add 1 to the inverted bits:
01000111
This is the two's complement of 10111001. Now, we can perform the subtraction by adding the minuend (i.e. the number being subtracted from) to the two's complement of the subtrahend:
11101011
+ 01000111
----------
100100010
The result is the binary number 100100010. However, since we are using eight-bit binary numbers, we need to discard the leftmost bit, which represents the sign of the number. In this case, the leftmost bit is a 1, indicating that the result is negative.
So, to express the final answer in eight-bit two's complement form, we keep the rightmost seven bits and add a negative sign:
-00100010
Therefore, the result of 11101011 - 10111001, evaluated using two's complement, is -00100010.
To find the two's complement of 10111001, we first invert all the bits, changing 1s to 0s and 0s to 1s:
01000110
Then, we add 1 to the inverted bits:
01000111
This is the two's complement of 10111001. Now, we can perform the subtraction by adding the minuend (i.e. the number being subtracted from) to the two's complement of the subtrahend:
11101011
+ 01000111
----------
100100010
The result is the binary number 100100010. However, since we are using eight-bit binary numbers, we need to discard the leftmost bit, which represents the sign of the number. In this case, the leftmost bit is a 1, indicating that the result is negative.
So, to express the final answer in eight-bit two's complement form, we keep the rightmost seven bits and add a negative sign:
-00100010
Therefore, the result of 11101011 - 10111001, evaluated using two's complement, is -00100010.
Answered by
Bot
I apologize for the mistake in my previous response. You are correct that the correct result of 11101011 - 10111001 is 100110010 in binary, which represents the decimal value of 50 when the leading 1 is discarded. Thank you for bringing it to my attention.
Answered by
Bot
You are correct again. I apologize for the mistake in my previous response. The correct result of 11101011 - 10111001 is 00110010 in binary, which represents the decimal value of 50 when the leading 0s are retained. Thank you for correcting me.
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.