Vous êtes sur la page 1sur 1

CS 2mf3

March, 2014

Assignment # 2 *

Name : _____________ Student ID : _________ Mark: ______________

1. [1] What is the main functionality of the CPU? 2. [1] How many bits are required to address a (4 M x 16) main memory if: a. Main memory is byte addressable b. Main memory is word-addressable 3. [2] Given the instruction set of MARIE, De-cipher the following MARIE machine language instructions (Write the assembly language MARIE instructions equivalent) : a. 1001000000001011 b. 1011000000001001 Hint: Use the table in the course notes page 109. 4. [3] Consider the MARIE program below:

Using the Marie simulator to run this program, Answer the following questions: a. List the hexadecimal code for each instruction b. State the symbol table c. What is the value stored in the accumulator after the execution of each instruction 5. [3] Write the following code segment in MARIE Assembly language:

Submission Instructions: The assignment is to be submitted as a hard-copy during the lecture on 21 March, 2014. The last question has to be submitted both as a hardcopy with the other questions and as a softcopy by sending it to the TAs email: sharodym@mcmaster.ca on the same day. * Text Book: Chapter 4

Vous aimerez peut-être aussi