Computer Sciences Dept.

CS/ECE 252 Introduction to Computer Engineering

Fall 2011 Section 1
Instructor Guri Sohi
TAs Newsha Ardalani and Rebecca Lam

URL: http://www.cs.wisc.edu/~sohi/cs252/Fall2011/

Homework 1 // Due at lecture Fri, Sep 9

Primary contact for this homework: Newsha Ardalani [newsha at cs dot wisc dot edu]

You must do this homework alone. Please staple multiple pages together.

Problem 1

  1. What is the web address of the course home page? (i.e. http://...)
    http://pages.cs.wisc.edu/~sohi/cs252/Fall2011/
  2. What is the email address of your section's mailing list?
    ece252-1-f11@lists.wisc.edu

Problem 2

(This question has no wrong answers.)

  1. What is your expected major(s)?
  2. Have you taken any other Computer Science courses? If yes, please list them.
  3. Why are you taking this course?
  4. What do you hope to get out of it?

Problem 3

When the professor tells you to "Come to class," is it an abstraction? If so, break it down into a few of its component parts, and briefly explain why the abstraction is useful for him.
Yes, this is an abstraction. The command abstracts away a number of steps including:
1) Get Up
2) Brush your teeth
3) Grab your notebook
...

It is useful because it allows him to only convey what he cares about (that you get here--he doesn't care how you do it). Also, it allows the statement to be general--otherwise he'd have to give different specifics for each of you.

Problem 4

U.S. government supercomputers are used to break high-bit encrypted messages. I think this whole business is pretty cool, so I'd like to try it on my cell phone. Assuming I had the software, could it perform the computations? If so, should I try to do this? Why or why not?
Yes, all universal computing devices are capable of computing exactly the same set of things (i.e. all things computable). However, given the amount of time it would take for my phone to do it, it is impractical and would never complete in my lifetime.

Problem 5

Is the sentence "The police shot the rioters with guns" acceptable as a statement in an algorithm? Specify two different interpretations of this statement. Does this prove that computers are too smart for our natural language? Why or why not?
No, this statement is not acceptable. The statement contains an ambiguity: It could be interpreted to mean "The plice shot the rioters who had gun," or "The police used the gun to shoot the rioters"

On the contrary, this actually shows that computers do not interpret our language as well as we do--they can only perform specific instructions as allowed by their instruction set.

Problem 6

Say we had a "black box," which takes two numbers as input and outputs their sum. See Figure 1(a). Say we had another box capable of multiplying two numbers together. See Figure 1(b). We can connect these boxes together to calculate p × (m + n). See Figure 1(c). Assume we have an unlimited number of these boxes. Show how to connect them together to calculate:

  1. a+b
  2. 2x+2y
  3. x^2
  4. x^4
XC: What is the minimum number of boxes required to compute x^8?

Note: Some of these have multiple solutions. Just becuase your answer isn't here doesn't necessarily mean it was wrong.

Problem 7

In your own words, how does a microarchitecture differ from an ISA? Why might we want to design a different microarchitecture for an existing ISA?
The microarchitecture specifies how circuits are put together to create the computer. The Instruction Set Architecture (ISA) provides an interface which specifies to a user of the computer what sort of instructions it can perform. Put another way, the ISA specifies the user manual, and the microarchitecture implements it.

We would do this for a number of reasons. Primarily, we are playing around with cost/performance trade-offs or implementing new, faster, better hardware. The key to note here is that (other than hopefully an improvement in performance or cost) the actual user sees no difference when programming or running the computer.

 
Computer Sciences | UW Home