Written Assignment 1

50 points

Write out your answers to these problems neatly in a text file and submit your work by the due date.

Be sure to put your name on your paper.

Show your work!

Note: Only problem 6 involves two's-complement notation.


  1. (8 points) Convert the following binary numbers to their decimal representations:

    1. B'1001'

    2. B'10110'

    3. B'101110'

    4. B'101011'

  2. (8 points) Convert the following hexadecimal numbers to their decimal representations:

    1. X'3C'

    2. X'A9'

    3. X'4E8'

    4. X'507'

  3. (8 points) Convert the following decimal numbers to their hexadecimal and binary representations:

    1. 37

    2. 1194

    3. 359

    4. 2047

  4. (8 points) Do the binary arithmetic:

    1. B'01110' + B'11011'

    2. B'10110' + B'01111'

    3. B'10101' - B'01100'

    4. B'11101' - B'01110'

  5. (8 points) Do the hexadecimal arithmetic:

    1. X'2581' + X'94BD'

    2. X'F28' + X'31C'

    3. X'5BE7' - X'36C1'

    4. X'EAB' - X'B84'

  6. (6 points) The integers in the following computations are indicated in hexadecimal, but represent 32-bit two's complement binary numbers. Perform the operations and indicate if overflow occurs and why. (If overflow occurs the result is invalid, but show it anyway.)
             
             a. X'D4C3B2A1'            b. X'754C4612'
              + X'3456ABCD'             + X'1003A642'
              -------------             -------------
    
    
    
    
    
             c. X'E044032F'            d. X'645C2041'   
              - X'A18492A2'             - X'781D30B1'
              -------------             -------------
    
    
    
    
    
             e. X'7FFFFFFF'            f. X'E8866541'
              + X'70000001'             - X'920B011F'
              -------------             -------------
    
    
    
    
    
    
  7. (4 points) Assume that:

    Here are some expressions which may be D(X,B) addresses. If they are valid, calculate the values (in hexadecimal), and if they are not valid, explain why not:

    1. 38(0,1)

    2. 0(0,7,1)

    3. 117(0,7)

    4. 49(7,1)