COS 111, Fall 1999 - Problem Set 5

Due by 5pm, Tuesday Nov. 9, 1999

Problem 1
Brookshear, Chapter Two Review Problem 14, pg. 110.

Problem 2
Write a program in the machine language given in Appendix C of Brookshear to do the following:

If the values stored in memory locations FF (hex) and 00(hex) sum to 0, then write the value 0 to both these memory locations; otherwise, exchange the values in these memory locations.
Assume your program is placed in memory starting at location 10.

Problem 3
Brookshear, Chapter Two Review Problem 36 (pp 113). (Aside: 1 millionth of a second per instruction is 1 million instructions per second. This is slow by todays standard; processors can execute 200-400 million instructions per second.)

Problems 4 - 6
Brookshear, Chapter Three Review Problems (pp 162):
8
11
14

Extra Credit:
Brookshear, Chapter Two Review Problem 39 (pp 113)
Note: This problem requires you understand a number of concepts we have only touched on in class. In particular, you must understand the use of the logical AND operation of section 2.4 as well as memory-mapped I/O in section 2.5.


Back to Schedule and Assignments