Computer Organization and Design

Spring, 2012
Tuesday at 11:45, Thursday at 2:50 Room 108 WVH
Final Exam: TBA


John Casey,
Office: 478 WVH
617 - 373 - 3550

Course Calendar

Click here for the current calendar.


Watch here for updates: assignments,etc.

Jan. 23
The MIPS green card

Jan. 16
Mnemonic sentences:
Khakied mannequins get the PEZ, yeah! - N.H.
Kids may get to play excitedly, ziplining yonder. - C.L.
Karl Marx gave the proletariat eleven zeppelins, yo. - A.U.
And an oldie:
Kind men get tired, (and) politely emit zero yawns. - S.L.

Jan. 15
Programs we compiled and ran in class:
demo01.c - command line arguments
demo02.c - Averages

Jan. 15
Examples using pointers:
Jan. 9
Brian Harvey's helpful notes on transition from (say)Scheme to C: Notes

What questions will you be able to answer after this course?


Prerequisites: Some programming experience, or a course like CS2500, plus some data structures. If you are currently taking CS2510, that will be OK.

Course Requirements

What do we study?

A one-phrase answer is: how the hardware runs the software. Another part of the answer is: the hierarchical nature of all computer systems.

We want to get experience working at the hardware-software interface, so we make choices: our hardware is the MIPS family of chips; our software is in MIPS assembly language, and in C.


The topics covered will include C and assembly language programming, how higher level programs are translated into machine language, how object-oriented languages are implemented, the general structure of computers, interrupts, caches, address translation, and related subjects.


By the end of the quarter, you should know:

what operations the chip can perform

what data structure represents each of those operations

how the hardware decodes each operation, and carries it out

what happens when the hardware detects an exception or interrupt

all operations are carried out by doing boolean algebra on single bits

how all this affects performance

how to write small programs in assembly language

Student responsibilities

1. Come to class.

2. Readings, exercises, quizzes, about four programming assignments, one midterm exam, and a final.


We encourage people to get together and discuss the assignments, prepare for tests, etc. But this is not the same as copying some one else's code or answers to assignments. If I find material that is substantially the same in two submissions, then the minimum penalty will be twice the full credit for that work. That is, if something were worth 100 points, it will be as if you scored -100.

This Week's Schedule

Reading Assignment: Patterson and Hennessy,
Chapter 1(easy reading), and Sections 3.1, 3.2.


Required Materials

1. David A. Patterson and John L. Hennessy.
Computer Organization and Design: The Hardware/Software Interface. Morgan Kaufmann, San Mateo, 2012.
Fourth edition, revised printing
Often referred to as P&H.
Much modern material has been added in this new edition. This is recent - copyright 2012! - and more exciting.

2. You'll need a reference for C. We require:
Brian Kernighan and Dennis Ritchie.
The C Programming Language: Second Edition. Prentice Hall, 1988.
Sometimes referred to as the New Testament; commonly called K&R.

Readings from this will be assigned, but you may be able to avoid buying the book. The readings will be short, perhaps 5 to 20 pages; you may be able to keep up by using someone else's copy.

Other Ways to Learn

Three wonderful books with very different approaches are in the collection at Snell library:

Randal E. Bryant and David O'Hallaron. Computer Systems: A Programmer's Perspective. Prentice-Hall, 2011.
Second edition.
A strong emphasis on optimizing performance, and a way of observing programs as they run on real machines.

Yale N. Patt and Sanjay J. Patel. Introduction to Computing Systems: From Bits and Gates to C and Beyond. McGraw-Hill, 2004.
Second edition.
The title says it: start from transistors and logic gates, and work through the design of a tiny, but real, machine, and arrive, bottom-up, at C programs.

Andrew S. Tanenbaum. Structured Computer Organization. Prentice-Hall,2006.
Fifth edition.
Also a bottom-up approach: start with digital logic and end with assembly language.

Software tools

Our chip

A MIPS simulator that will run on every keyboard-equipped computer you own - it's one Java archive file. It's called MARS (Google: MIPS MARS), and, unlike some programming environments you've used before, it can run programs both forward and backward(think about debugging).

MARS was written by Ken Vollmar(Missouri State), and Pete Sanderson(Otterbein College).