|
|
Subject:
2's Complement Form
Category: Computers > Algorithms Asked by: jameskent-ga List Price: $5.00 |
Posted:
01 Apr 2006 07:47 PST
Expires: 01 May 2006 08:47 PDT Question ID: 714334 |
Hi I am trying to learn how to complete 2's complementation form. I currently have this task to complete and have given it my best to figure it out but really need to see if I am correct. Can someone please show the workings for the below question: Perform the following binary arithmetic, showing all carry/borrow bits and stating validity for both unsigned and 2?s complement data: 1. % 1011 0011 + % 0110 1100 2. % 1001 0110 ? % 1010 0011 3. % 0011 1011 ? % 0001 1010 |
|
There is no answer at this time. |
|
Subject:
Re: 2's Complement Form
From: nmjohn-ga on 02 Apr 2006 20:30 PDT |
Perform the following binary arithmetic, showing all carry/borrow bits and stating validity for both unsigned and 2?s complement data: 1. % 1011 0011 + % 0110 1100 2. % 1001 0110 ? % 1010 0011 3. % 0011 1011 ? % 0001 1010 To check validity of 2's complement numbers, if Number A is positive and Number B is negative, you can't get overflow/underflow, so it's valid. if Number A is negative and Number B is negative, check the sign bit of the answer. If it's not 1 (ie negative) then you've had underflow. If Number A is postive and Number B is postive, and the sign bit of the answer is 1, then you've had overflow. As far as calculating 2's complement numbers. It's easier to just make subtraction addition. To negate a 2's complement numbers, invert all bits and add 1. So for 2. 1001 0110 - 1010 0011 = 1001 0110 + 0101 1100 + 0000 0001. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |