Assignment

Contents:

  • Overview
  • Internet Requirements
  • Practice Problems
  • Problems to be Submitted
  • Extra Credit

  • Overview

    Topic: Computer Architecture, Low-Level Programming
    Related Reading: Ch. 5, Ch. 7
    Due:

    Internet Requirements

    You will not need an Internet connection for completing the assignment, other than for submission.

    Practice Problems

  • Exercise 5 of Ch. 5 (p. 138)

  • Exercise 40 of Ch. 5 (p. 138); answer in back of text

  • Exercise 8 of Ch. 7 (p. 220); answer in back of text

  • Exercise 10 of Ch. 7 (p. 220)

  • Exercise 11 of Ch. 7 (p. 220); answer in back of text

  • Exercise 13 of Ch. 7 (p. 221); answer in back of text

  • Exercise 16 of Ch. 7 (p. 221); wrong answer in back of text

  • Exercise 19 of Ch. 7 (p. 221); answer in back of text

  • Exercise 31 of Ch. 7 (p. 222); answer in back of text

  • Exercise 34 of Ch. 7 (p. 223); answer in back of text

  • Problems to be Submitted (20 points)

    1. (4 points)
      If a computer has 128MB of main memory, how many bits would be needed for each memory address so that every byte of memory has a unique such address? Explain your answer.

    2. (4 points)
      Find a current ad for a desktop computer on the Internet.
      1. What is the URL where that ad can be viewed?
      2. Give a brief comparison of the terms and quantities used in that ad to the terminology introduced in Ch. 5.

    3. (4 points)
      Answer each of the following questions, based on the following state of memory (in hexadecimal):
      AddressContents
      0001B5
      000223
      00038D
      000454

      1. What are the contents of the X register after the execution of this instruction?
        00001101 00000000 00000011

      2. [Oct 3: I made a mistake in typing up the problem originally so I am changing it now. What you see below is the UPDATED problem. (for anyone who already completed the assignment based on the original version, I'll grade accordingly)]
        What are the contents of the A register after the execution of the following two instructions?
        00001000 01100110 00010010
        00011001 00000000 00000001

    4. (4 points)
      What binary machine code corresponds to each of the following assembly language instructions:
      1. ADDA h#0057,d
      2. LOADX h#7A5D,i
      3. STOREA h#00FF,d
      4. CHARI h#01A4,d

    5. (4 points)
      At the end of Ch. 7 there are a series of "Thought Questions" (p. 223). Choose one of question #3, #4 or #5 to answer. The length of your answer should be appropriate for the question, however I envision answers in the range of 1/2-page to 1-page.
    Overall, please type your answers to all of the problems in a single document to be submitted electronically. Please see details about the submission process.

    Extra Credit (2 points)

    1. (1 points)
      Write an assembly-language program which inputs three values (J, K, and L respectively), and outputs the value (J-K)-L.
      (See program on pages 213-214 of text as a similar example)

    2. (1 point)
      Write the assembly-language program which inputs three values (J, K, and L respectively), and outputs the value J-(K-L).
      For this problem, you are not allowed to use the ADD instruction.


    Last modified: 5 November 2002