Computer Science 174 Computer Organization & Assembly Language

Dr. Stephen Bloch office 112 Alumnæ Hall phone 877-4483

                    email sbloch@adelphi.edu
            Web page http://www.adelphi.edu/~sbloch/
     Class Web page http://www.adelphi.edu/~sbloch/class/174/

office hours: TBA

September 8, 1998

1 Subject Matter

According to the course bulletin, this course covers computer organization and architecture, including how computer operations are implemented in hardware. This course will cover essentially the same material that CSC 371 (“Systems I”) has covered in recent years, so if you’ve already passed Systems I, you don’t belong here.

This course should be useful for several types of students. Those with an interest in designing computer hardware can use this course as a basis for more advanced study; those primarily interested in writing high-level computer software can use the knowledge of how low-level software and hardware interact to make better-informed decisions about software design; and those who just want to understand how a computer works can gain this understanding.

I assume, in all three cases, that students have a year or two of programming experience in a high-level language. By the end of the semester, you should have an understanding of assembler language (at least that for the MIPS machine we’ll study) and be able to write small programs and subroutines in assembler language. You should also understand how both programs and the data on which they operate are represented inside a computer.

2 Prerequisites

I assume that students taking this course have passed CSC 171 and CSC 172. If you have not passed these courses but think you have enough other background to survive this course, talk to me. If you know little or nothing about computer programming, this is probably the wrong course for you to take.

3 Textbook

We’ll use the textbook A Programmer’s View of Computer Architecture, by Goodman and Miller, for reading and homework assignments. We’ll read at least ten chapters of the book by the end of the semester; this amounts to about 20 pages per week. You are responsible for everything in the reading assignments, whether or not I discuss it in a lecture.

4 Grading

As I write this (a week before classes start), I envision five homework assignments, each worth 10% of the semester grade, a midterm worth 20%, and a final exam worth 30%. I may change this somewhat as the semester unfolds.

Exams must be taken at the scheduled time, unless arranged in advance or prevented by a documented medical or family emergency. If you have three or more exams scheduled on the same date, or a religious holiday that conflicts with an exam or assignment due date, please notify me in writing within the first two weeks of the semester in order to receive due consideration. Exams not taken without one of the above excuses will be recorded with a grade of 0.

Homework and programming assignments will be accepted late, with a penalty of 1/3 per 24 hours or portion thereof after they’re due. An hour late is 33% off, 25 hours late is 67% off, and after 48 hours don’t bother turning it in. It’s still a good idea to do as much of it as you can, however, because I’ll assume on the exams that you’ve done the homework.

Some of the homework assignments will require that you write programs in assembly language. Programs are not abstract works of art, they are supposed to run and solve real problems. So if I get a program that doesn’t assemble, or a program that has little or nothing to do with the problem I assigned, I will give it a zero, no matter how much time you put into it. Don’t bother turning in a program you haven’t tested yourself.

5 Ethics

Most of the assignments in this class are to be done individually. You may discuss general approaches to a problem with classmates, but you may not copy large pieces of programs or homework solutions. If you do, all the students involved will be penalized (for example, if three students turn in essentially identical work, I’ll grade it once and divide the points among the three of them).

All work on an exam must be entirely the work of the one person whose name is at the top of the page. If I have evidence that one student copied from another on an exam, both students will be penalized; see above.

6 Schedule

This class meets every Tuesday and Thursday from 3:05 to 4:20 PM, except on University holidays or if I cancel class. All dates in the following schedule are tentative, except those fixed by the University; if some topic listed here as taking one lecture in fact takes two lectures to cover adequately, or vice versa, the schedule will shift.

I expect you to have read the specified chapters in the textbook before the lecture that deals with that topic; this way I can concentrate my time on answering questions and clarifying subtle or difficult points in the textbook, rather than on reading the textbook to you, which will bore both of us. Please read the textbook!

Date(s) Assignment  Reading  Lecture Subject

1 Sept Administrivia, accounts, introduction, SPIMSAL

3 Sept  chap. 1  Levels of abstraction, instruction execution
8 Sept HW1  2.1–2.3  Declarations and arithmetic
10 Sept  2.4  Control flow in assembly language

11 Sept Last day to add courses

15 Sept  2.4–2.5  Control flow and I/O
17 Sept  2.6–2.7  Program example, using SPIMSAL; procedures

22 Sept No class; Rosh Hashanah 24 Sept HW1 due; HW2 2.7–2.8 Procedures and another program example 25 Sept Last day to drop courses 29 Sept No class; Yom Kippur

1 Oct  chap. 3  Representing numbers in binary
6 Oct  4.1–4.2  Representing integers on a computer
8 Oct  4.3–4.4  Representing characters and reals on a computer
13 Oct HW2 due  5.1–5.3  Boolean operations, integer addition and subtraction
15 Oct HW3  5.4  Integer multiplication
20 Oct  5.5  Integer division

22 Oct Catch up and review

27 Oct  6.1–6.3  Floating-point addition, subtraction, multiplication
29 Oct  6.4–6.6  Floating-point division, rounding, overflow, etc.

30 Oct Last day to withdraw from classes

3 Nov HW3 due  7.1–7.2  Memory and arrays
5 Nov HW4  7.1–7.2  Memory and arrays, continued
10 Nov  7.3–7.4  Implementing data structures in assembly language
12 Nov  7.3–7.4  Data structures, continued
17 Nov  8.1–8.2  MAL, registers, and addressing
19 Nov  8.3–8.4  MAL, registers, and addressing

24 Nov HW4 due; HW5 9.1–9.3 Procedure calling in assembly language 26 Nov No class; Thanksgiving

1 Dec  9.4–9.5  Parameters and local variables
3 Dec  9.6  Register usage
8 Dec  9.7  Register usage examples
10 Dec  10  What an assembler does

15 Dec HW5 due Catch up and review for final 17 Dec 3:30–5:30 PM, Final Exam