Homework 1 Solutions

22C:122, Fall 1998

Douglas W. Jones

  1. What is your E-mail address?
    No answer provided.

  2. What ideas common to many modern computers are entirely missing from the machine described in this paper? All such architectural features can be correctly described as non-von-Newmann features!
    The list is a long one. Among others, it includes: Byte addressing (the Berks, Goldstein and Von Neumann proposal only allowed word addressing for data), multiple accumulators, indexed addressing, hardware support for floating point, a subroutine call instruction, direct memory access I/O, and support for multiprocessors.

  3. Give C expressions, of the form F = A (op) B (possibly with other terms) for each of the 8 possible operations this ALU performs.
    There was a mistake in the Cout colum in the final rows of the truth table. The following is probably the best that could be done with the table, as given:
    	   X  Y  Cin |  Expression
    	  -----------+------------
               0  0   0  |  F = A ^ B   (bitwise exclusive or)
               0  0   1  |  F = A ^ B   (bitwise exclusive or)
               0  1   0  |  F = A + B
               0  1   1  |  F = A + B + 1
               1  0   0  |  F = A ^ ~B  (bitwise equivalence)
               1  0   1  |  F = A ^ ~B  (bitwise equivalence)
               1  1   0  |    messed up
               1  1   1  |    messed up
    
    The final rows of the truth table should have been:
    	   X  Y   A    B   Cin |   F  Cout
    	  ---------------------+------------
    	   1  1   0    0    0  |   1   0
    	   1  1   0    0    1  |   0   1
    	   1  1   0    1    0  |   0   0
    	   1  1   0    1    1  |   1   0
    	   1  1   1    0    0  |   0   1
    	   1  1   1    0    1  |   1   1
    	   1  1   1    1    0  |   1   0
    	   1  1   1    1    1  |   0   1
    
    Had it been this, the final rows of the operation table would have been:
    	   X  Y  Cin |  Expression
    	  -----------+------------
               1  1   0  | F = (A - B) - 1
               1  1   1  | F =  A - B