CS330 Homework Assignments

Unless otherwise stated, all homework is due Monday of the week following the completion of the chapter.

Chapter 11

Show all of your work.If you do not show your work, you will not receive credit.

  1. Convert the following numbers to IEEE single-precision format. Give the results as 8 hexadecimal digits:
    1. 9
    2. 5/32
    3. -5/32
    4. 6.125
  2. Convert the following IEEE single-precision floating point numbers from hex to decimal:
    1. 42e48000H
    2. c7f00000H
  3. Perform the following calculations on 2 8-bit two's complement numbers:
    1. 00101101+01101111
    2. 11111111+11111111
    3. 00000000-11111111
    4. 11110111-11110111
  4. Perform the following 3-bit additions in two's complement. For each sum, indicate whether :

  5.  

     
     
     

    a.The sign bit of the result is set

    b.The result would set the zero flag

    c.The carry flag is set

    d.The overflow flag is set

    1. 000+011
    2. 000+111
    3. 111+110
    4. 100+111
    5. 100+100

Chapter 12

  1. Problem 12-1
  2. Problem 12-2
  3. Problem 12-5

Chapter 13

  1. Problem 13-6

Chapter 14

  1. Problem 14-1
  2. An expanding opcode is a scheme whereby the opcode has a variable length. Suppose you have a 16-bit instruction with the most significant bits are for the opcode and the least significant bits are for addresses/data. For example opcode values 0-14 imply the low order 12 bits have a certain format. The opcode in the most significant bits with a value of 15 implies that the first 8 bits of the instruction are opcode and the remaining 8 bits are data/addresses. Design an expanding opcode to allow all the following to be encoded in the 36-bit instruction:
Chapter 5
 
  1. Problem 5-2
  2. Problem 5-9

Chapter 6

  1. Problem 6-11

Chapter 17

None

Chapter 18

  1. Problem 18-2
  2. Problem 18-3

  3.  

Chapter 19


None

Chapter 8

None

Chapter 9

  1. Question 9.3 The question: A program computes the row sums:
    ci= summation j=1 to n of aij
    of an array A that is 100 by 100. Assume that the computer uses demand paging with a page size of 1000 words and that the amount of main memory allotted for data is 5 page frames. Is there any difference in the page fault rate if A were stored in virtual memory by rows or columns? Explain.

  2.  

    This page is maintained by Barbara Bracken
    Last modified 8/10/2024