Homework 2 Information, ECS50 Spring 2007

  • Homework due by 4:45 PM on Wednesday, April 18th
  • Programming assignment due by 11:59 PM on Wednesday, April 18th
  • Do all problems.
  • You will begin working in groups of 2 on this assignment.

    Assignment:

    
    1.   Suppose that a computer system uses a 40-bit wordsize and a 28-bit address 
         space.  
         a.  How many bytes of memory are there?
         b.  What is the hexadecimal value of the highest address?
    
    2.   Why do the address registers use unsigned arithmetic while the accumulator
         uses signed two's complement arithmetic?
     
    3.   Why is the Instruction register a different size than the PC in CUSP?
    
    4.   Explain in detail the Fetch Decode Execute cycle, and the roles of the 
         IR and the PC in this.
    
    5.   How does the CPU tell whether a given memory location contains an
         instruction or a data word?
    
    6.   The instruction $042045 causes the contents of the ACC to be stored in
         memory location $045.
         a.  Describe this using the register transfer language shorthand.
         b.  If location $045 contains the value $FF0AB0 and the ACC contains
    	 $71A7EF, what are the contents of the ACC and location $045 after the
    	 execution of the instruction?
    
    7.   Outline briefly what is meant by the following terms:
         a.  Self-modifying code
         b.  Instruction decoding
         c.  Opcode
         d.  Addressing mode
         e.  Set a flag
    
    8.   How do the following concepts differ?
         a.  direct and immediate addressing
         b.  arithmetic and logical instructions
    
    9.   Problem 3.4 (b,d)
    10.  Problem 3.7 (program)
    11.  Problem 3.8 (program)