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.
-
Convert the following numbers to IEEE single-precision format. Give the
results as 8 hexadecimal digits:
-
9
-
5/32
-
-5/32
-
6.125
-
Convert the following IEEE single-precision floating point numbers from
hex to decimal:
-
42e48000H
-
c7f00000H
-
Perform the following calculations on 2 8-bit two's complement numbers:
-
00101101+01101111
-
11111111+11111111
-
00000000-11111111
-
11110111-11110111
-
Perform the following 3-bit additions in two's complement. For each sum,
indicate whether :
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
-
000+011
-
000+111
-
111+110
-
100+111
-
100+100
Chapter 12
-
Problem 12-1
-
Problem 12-2
-
Problem 12-5
Chapter 13
-
Problem 13-6
Chapter 14
-
Problem 14-1
-
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:
-
7 instructions with two 15-bit addresses and one 3-bit register number.
-
500 instructions with one 15-bit address and three 3-bit registers.
-
50 instructions with no addresses or registers.
Chapter 5
-
Problem 5-2
-
Problem 5-9
Chapter 6
-
Problem 6-11
Chapter 17
None
Chapter 18
-
Problem 18-2
-
Problem 18-3
Chapter 19
None
Chapter 8
None
Chapter 9
-
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.
This page is maintained by Barbara Bracken
Last modified 8/10/2024