{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw1 - CS2214 COMPUTER ARCHITECTURE ORGANIZATION SPRING 2010...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
CS2214 COMPUTER ARCHITECTURE & ORGANIZATION SPRING 2010 B HOMEWORK I Polytechnic Institute of NYU Page 1 of 12 Handout No: 2 January 20, 2010 DUE : February 10, 2010 READ : Chapter 1 (Except 1.4) Related sections of Chapter 2 Related sections of Chapter 3 Related portions of Appendix B ASSIGNMENT : There are seven questions four of which are from chapters I and II of the text- book. Solve all homework and exam problems as shown in class and past exam solutions. I) Solve Problems 1.1.1, 1.1.3, 1.1.6, 1.1.8, 1.1.10, 1.1.11, 1.1.13, 1.1.14, 1.1.16, 1.1.17, 1.1.18, 1.1.19, 1.1.20, 1.1.21, 1.1.22, 1.1.23, 1.1.24 and 1.1.25. To answer each question, write down the word or phrase. Do not give the number (1, 2, 3,...) it corresponds to. II) Solve Problem 2.7.1 part ( b ), 2.7.2 part ( a ) and 2.7.3 part ( b ). Show the work during the conversions as shown in class. III) Solve Problem 2.8.1 for only part ( a ). First , convert the hex digits to bit patterns and then perform additions and subtractions. IV) Solve Problem 2.10.1 for only part ( b ). Show the instruction in the mnemonic notation. Assume that the instruction is in memory loca- tion 400000 . Show the work during the conversions as shown in class.
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Polytechnic Institute of NYU Page 2 of 12 CS2214 Handout No : 2 January 20, 2010 V) Show the minimal sequence of mnemonic machine language instructions for this C-like statement : a = b + 100 ; In this question, you are asked to convert a high-level language statement to a set of mnemonic machine language instructions. We know that a compiler converts a high-level language program to a machine language program. So what you will do is exactly the same as what a compiler does, with one exception : you will translate to a mnemonic machine language program, not to a machine language program. Note the following : The set of instructions you will write starts at 400000. Variables “a” and “b” are already loaded to registers R8 and R9, respectively. Number 100 in the question is a decimal number. But, the hexadecimal notation is the default case in our mnemonic machine language programs. VI) Consider the following C language statement : b = 25 | a Write the corresponding minimal sequence of mnemonic machine language program. Assume that the value of “a“ is in R8 and the value of “b” should be stored in R9 In order to show clearly that the new code is correct, show the table of execution of instructions with used register and memory location values until the code completes. Note the following : The piece of mnemonic machine language program you will write starts at 400000. Assume that R8 has (6) 10 . Number 25 in the C-like statement in the question is in decimal. But, the hexadecimal notation is the default case in our mnemonic machine language programs. VII) Implement the following two pseudoinstructions in mnemonic machine language : MOVE $t1, $t2 # $t1 = $t2. This is Problem 2.30.1 part ( a ) in the textbook CLEAR $t0 # $t0 = 0
Image of page 2
Polytechnic Institute of NYU Page 3 of 12 CS2214 Handout No : 2 January 20, 2010 You will implement the pseudoinstructions in terms of (by using) actual EMY instructions.
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern