Computer Sciences Dept.

CS/ECE 252 Introduction to Computer Engineering

Spring 2007 Sections 1 and 2
Instructor Mark D. Hill and TAs Marc de Kruijf & Sanghamitra Roy
URL: http://www.cs.wisc.edu/~markhill/cs252/Spring2007/

Homework 5 // Due at Lecture Wed Mar 21

You may do this homework in a group of two students from the same 252 section and turn in one solution at lecture with BOTH students names at the top.

First contact for questions is TA Sanghamitra Roy at: roy1@wisc.edu

  1. Problem 5.2 on page 145 of ItCS using an addressability of 32 bits.
  2. Problem 5.4 on page 145 of ItCS using memory consisting of 512 locations.
  3. Problem 5.8 on page 146 of ItCS.
  4. Problem 5.9 on page 146 of ItCS using the following three instructions:

    1. 0000 000 000000010
    2. 0101 001 001 0 00 001
    3. 0000 111 000000010
  5. Problem 5.11 on page 146 of ItCS.
  6. Problem 5.13 on page 147 of ItCS.
  7. Suppose the following LC-3 program is loaded into memory starting at location x30FF:
  8. x30FF: 1110 0010 0000 0001

    x3100: 0110 0110 0100 0010

    x3101: 1111 0000 0010 0101

    x3102: 0110 1101 0000 0000

    x3103: 0010 0100 0010 0000

    If the program is executed, what is the value in R3 at the end of execution?

  9. The purpose of this problem is to get you setup with the LC-3 simulator, which will be important for subsequent homeworks. You can get the LC-3 simulator in one of the following ways:

    1. Supported CS Account:If you are officially enrolled in CS 252, a CS account has been created for you, and you can log on to any CS Instructional Windows machine in rooms 1351 and 1368 in Computer Science and Statistics (CSS). Please check Computer Science Lab (CSL) Getting Started for information about activating your CS account. If you don't have an account please go to CSL on the 2nd floor. After logging in you can open the LC-3 Simulator from 'START'->'All Programs'->'LC3'->'Simulate'.
    2. Unsupported PC Use:You can download and extract the LC-3 Simulator on your own personal computer. However, we cannot support any problems encountered and you are on your own. Nevertheless, many students in previous semesters preferred this option.
    3. Unsupported CAE Account:You can access the LC-3 simulator in CAE machines if you have a CAE account. To add the LC-3 simulator to your CAE applications, go to START->'CAE Applications'->'Add Applications to Start Menu'-> 'Available Applications'->'By Alphabetical'->G-L and select LC-3 Editor and LC-3 Simulator. Then you can open LC-3 simulator from 'START'->'CAE Applications'->'Engineering'->'LC-3 Simulator'. Also remember that we cannot support any problems encountered, and you are on your own.

    After opening the LC-3 simulator, please report the following:

    1. The names of the LC-3 registers that can be seen in the simulator window.
    2. The starting memory address, as shown by the blue arrow.

 

 

 

 
Computer Sciences | UW Home