CS 207
Midterm 1
Ondich
Due ON PAPER at 8:30 AM Friday, October 13, 2000

For this exam, you may use your textbook, the Internet, your notes and assignments, your brain, and divine guidance if available. You may not use other people. If you get stuck, talk to Jeff Ondich, but please don't talk to anyone else about the exam.

  1. (12 points) Complete the following PDP8/E subroutine. Try to minimize the amount of memory consumed by the subroutine.

    
    / Preconditions: The page-0 location (labeled ADDR) contains
    / 	the address of the first element of an array of 12-bit words.
    /	The AC contains the number of words in the array.
    /
    / Postconditions: The AC contains the sum of the elements
    /	in the array.  This subroutine does *not* correct for
    /	overflow.
    ADDARRAY,	0000
    			...
    			JMP I ADDARRAY
    

    Briefly describe what you would do differently if your goal was to minimize the number of instructions executed by the subroutine.

  2. (10 points) Give an example of each of the following situations. If your textbook contains such examples (in the main text or in the problems), you may refer to those examples. You may also just cook up examples of your own. (Note that the "performance" referred to in these situations is a technical term--it's the reciprocal of execution time.)

    Is it possible for machine M1 to have higher MIPS rating, higher clock rate, and lower CPI than M2, but still have worse performance?

  3. (12 points) The table below shows the execution times for all of the PDP8/E instructions (not including op-code 6).

    
    Execution times in micro-seconds for PDP8/E instructions
    --------------------------------------------------------
                             Addressing mode     
                  ------------------------------------------
    Instruction                            Indirect with
       Type       Direct      Indirect     auto-increment
    --------------------------------------------------------
    AND            2.6          3.8             4.0
    TAD            2.6          3.8             4.0
    ISZ            2.6          3.8             4.0
    DCA            2.6          3.8             4.0
    JMS            2.6          3.8             4.0
    JMP            1.2          2.4             2.6
    
    Opcode 7          1.2 (addressing mode irrelevant)
    --------------------------------------------------------
    

    Assume the following:

    Answer the following questions:



  4. (4 points) Who are Federico Faggin and Ted Hoff, and why are they important in the history of computer architecture?

  5. (2 points) My daughter Elena is going to turn 7 next week, and we'd like to give her a computer game for her birthday. Any suggestions?

  6. (12 points) Read sections A.1 through A.4 of your textbook.



  7. (7 points) Write an algebraic expression describing the following boolean function of three variables. Then simplify the expression as much as you can, and draw a digital logic circuit that implements the function based on your simplified formula.

    
    	  A     B     C   ||  f(A,B,C)
    	===============================
    	  0     0     0   ||     0 
    	  0     0     1   ||     1 
    	  0     1     0   ||     1 
    	  0     1     1   ||     1 
    	  1     0     0   ||     0 
    	  1     0     1   ||     1 
    	  1     1     0   ||     0 
    	  1     1     1   ||     0