hw1 - CS2214 COMPUTER ARCHITECTURE & ORGANIZATION SPRING...

Info iconThis preview shows pages 1–3. 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.
Background image of page 1

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

View Full DocumentRight 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)
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/02/2011 for the course CS 2214 taught by Professor Hadimioglu during the Spring '10 term at NYU Poly.

Page1 / 12

hw1 - CS2214 COMPUTER ARCHITECTURE & ORGANIZATION SPRING...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online