Problem Set: Two's Complement

 

  1. Convert the following decimal numbers to 12 bit 2's complement:
    1. 101
    2. -97
    3. 620
    4. -187
    5. -332
  2. Convert the following 12 bit 2's complement numbers to base 10:
    1. 0000 1011 1011
    2. 1111 1100 0111
    3. 0100 0000 0001
    4. 1100 0001 1101
    5. 0111 1111 1111
    6. 1111 1111 1111
    7. 1000 0000 0000
  3. Perform the following additions and subtractions. Assume that all numbers are in 8 bit 2's complement. State the sign of each number and whether an overflow occurs.
    1. 10110101 + 11101011
    2. 01100001 + 01010101
    3. 00010110 + 11010110
    4. 00011101 + 01011010
    5. 10001111 - 11101101
    6. 00101101 - 00011011
    7. 00011001 - 11011000
    8. 10001110 - 01101010
  4. Perform the following additions and subtractions. Assume that all numbers are in 32 bit 2's complement. State the sign of each number, the sign of the answer, and whether an overflow occurs.
    1. 00 00 04 C8 + 48 49 B7 6F
    2. 00 12 5F 89 + 8F DE 27 83
    3. 39 B4 08 75 + 93 19 76 26
    4. 6A 01 B9 33 + 55 62 09 42
    5. FF FE 59 00 - 23 45 67 89
    6. 49 7B 05 CC - 92 93 8A 6D
    7. 86 21 4F BC - 6B A4 59 72

Email Me | Office Hours | My Home Page | Department Home | MCC Home Page

© Copyright Emmi Schatz 2011