CS 10051-003/004 Introduction to Computer Science - Spring 2008

Homework 4 - Chapter 5

Due Monday, March 10, 2008 at the start of the class period
A paper copy of the assignment is due by the beginning of class. Submissions may be neatly handwritten or typed. Electronic submission only (no hard copy) is a reduction in the homework score equivalent to 1%. 

# Question Description Answer Notes
1 #4 on Page 207

Defragmenting a disk means to reorganize files on the disk so that as many pieces of the file as possible are in sectors on the same track, regardless of the surface it is on.  Explain why defragmentation can be beneficial.

  "Regardless of the surface it is on" refers to the fact that it can be on different sides of a single platter or on different platters along the same track.
2 #2 on Page 233 At a minimum, how many bits are needed in the MAR with each of the following memory sizes?
a. 1 million bytes
b. 10 million bytes
c. 100 million bytes
d. 1 billion bytes
   
3 #9 on Page 233

Assume that we have an arithmetic/logic unit that can carry out 20 distinct operations.  Describe exactly what kind of multiplexor circuit would be needed to select exactly one of those operations.

  You do NOT need to draw the circuit at the low level (i.e. I do not expect a description at the AND, OR, and NOT gate level).
4 #15 on Page 233 Consider the following structure of the instruction register.

op code address-1 address-2
6 bits 18 bits 18 bits


a.  What is the maximum number of distinct operation codes that can be recognized and executed by the processor on this machine?
b. What is the maximum memory size on this machine?
c. How many bytes are required for each operation?
 
5 #18 on Page 234

Describe the sequence of operations that goes on inside the computer during the execution phase of the following machine language instructions.  Use the notation shown in Section 5.3.

a. MOVE X, Y Move the contents of memory cell X to memory cell Y.
b. ADD X, Y Move the contents of memory cells X and Y. Put the result back into memory cell Y.
The notation uses the register name or hardware involved.  If moving the contents of the MDR into the ALU, the notation is: MDR --> ALU.  Each and every step that is necessary and all hardware involved is shown on its own line in this notation.

Last Updated: Wednesday, March 5, 2008