Assume you're working on a 4-bit computer that uses a signed 2's complement representation, just as in the text. Answer the following. Add 0011 and 0010. Work out the problem "long hand", showing your...

1 answer below »


  1. Assume you're working on a 4-bit computer that uses a signed 2's complement representation, just as in the text. Answer the following.


    1. Add 0011 and 0010. Work out the problem "long hand", showing your work and the carries.

    2. Subtract 0011 from 0010. Work out the problem "long hand", showing your work and the borrows.

    3. Multiple 0011 by 0010. Work out the problem "long hand", much as you would have in 3rd grade long multiplication. Line up the values, etc.

    4. Divide 0011 by 0010. Again, work out the problem "long hand" and show your work.


  2. Assuming the same 4-bit computer with signed representation, give a C expression that computes the requested:


    1. Given a number 'n', compute a word with the lower 'n' bits set to '1'. You don't know 'n' in advance.

    2. Given a number 'n', compute a word with the higher 'n' bits set to '1'. You don't know 'n' in advance.




Answered Same DayDec 20, 2021

Answer To: Assume you're working on a 4-bit computer that uses a signed 2's complement representation, just as...

David answered on Dec 20 2021
124 Votes
1. Assume you're working on a 4-bit computer that uses a signed 2's complement representation, just as in the text. Answer the following.
1. Add 0011 and 0010. Work out the problem "long hand", showing your work and the carries.
Carry 1
0011
+0010
Sum 0101
2. Subtract 0011 from 0010. Work out the problem "long hand", showing your work and the borrows.
We will use 2’s complement method for subtraction
To subtract 0011, convert 0011 to its 2’s complement
2’s comp of 0011 = (oo11)’+1 =1100 + 1 = 1101
Add this to the number. If result is 5 bits, remove the overflow bit to get answer....
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here