\documentclass[12pt]{article}
\usepackage{fullpage}

\newcommand{\tm}{\mbox{\sc tm}}

\begin{document}

\title{Computer Science 371 \\
Systems I}

\author{Dr. Stephen Bloch \\
office 112 Alumn\ae\ Hall \\
phone 877-4483 \\
email \texttt{sbloch@boethius.adelphi.edu} \\
office hours whenever I'm not teaching \\
on Tuesday, Wednesday, or Thursday}

\maketitle

\section{Subject Matter}
According to the course bulletin, this course covers computer
organization and architecture, including how computer operations are
implemented in hardware.  Also according to the course bulletin, CSC 174
(Assembly Language) is a prerequisite for the course.  However, CSC 174
hasn't been offered in the past several years, so this course will actually
cover assembly language, computer representation of data, and the
low-level mechanisms of branching and procedure calling, and only touch
briefly on how all this is implemented in hardware.  Systems II, next
semester, will then concentrate on hardware implementations.

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.

\section{Textbook}
We'll use the textbook \emph{A Programmer's View of Computer
Architecture},
by Goodman and Miller,
for reading and homework assignments.  
We'll read through essentially the whole book by the end of the
semester; this amounts to about 25 pages per week.
\textbf{You are responsible for everything
in the reading assignments, whether or not I discuss it in a lecture.}

\section{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.

% These numeric grades will be converted to letter grades as follows:
% I'll draw a curve showing the distribution of numeric grades, and look
% for naturally-occurring ``clumps''.  For each clump, especially the
% top and bottom ones, I'll examine some exam and
% homework papers to decide what letter grade seems appropriate.  This
% method corrects for excessively hard or excessively easy assignments
% while not penalizing anybody for having genius classmates.

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.
% (and I'd
% prefer it if you let me know earlier --- you should know within the
% first week of class when all your exams are).
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.

\section{Ethics}
Most of the assignments in this class are to be done individually.  You
may \emph{discuss general approaches} to a problem with classmates, but
you \emph{may not copy} large pieces of programs or homework solutions.
If you do, \emph{all} the students involved will be penalized.

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, \emph{both} students will be
penalized; see above.

\section{Schedule}
This class meets every Tuesday and Thursday from 3:05 to
4:20 PM, except on University holidays or if I cancel class.
%
% \subsection{Floating Events}
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 {\em vice versa},
the schedule will shift.

% In no case will an assignment be due earlier than indicated in the
% following schedule, but some may be due later; this will be announced
% in class a reasonable time in advance.  I'll try to keep an updated
% version of this schedule available online.  

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.  \textbf{Please read the textbook!}

% \pagebreak

\begin{tabbing}
{\bf Date(s) \hskip20pt} \=
{\bf Assignment} \=
{\bf Reading \hskip10pt} \=
{\bf Subject} \kill
{\bf Date(s)} \>
{\hskip-20pt \bf Assignment} \>
{\bf Reading} \>
{\hskip40pt \bf Lecture Subject} \\
5 Sept \> \> \> Administrivia, introduction, SPIMSAL \\
10 Sept \> \> chap. 1 \> Levels of abstraction, instruction execution \\
12 Sept \> HW1 \> 2.1--2.3 \> Declarations and arithmetic \\
17 Sept \> \> 2.4 \> Control flow in assembly language \\
19 Sept \> \> 2.5--2.6 \> I/O and program example, using SPIMSAL \\
20 Sept \> \> \> Last day to add courses \\
24 Sept \> \> 2.7--2.8 \> Procedures and another program example \\
26 Sept \> HW1 due \> chap. 3 \> Representing numbers in binary \\
1 Oct \> HW2 \> 4.1--4.2 \> Representing integers on a computer \\
3 Oct \> \> 4.3--4.4 \> Representing characters and reals on a computer \\
4 Oct \> \> \> Last day to drop courses \\
8 Oct \> \> 5.1--5.3 \> Boolean operations, integer addition and
subtraction \\
10 Oct \> HW2 due \> 5.4--5.5 \> Integer multiplication and division \\
15 Oct \> \> 6.1--6.3 \> Floating-point addition, subtraction, multiplication \\
17 Oct \> HW3 \> 6.4--6.6 \> Floating-point division, rounding, overflow,
\emph{etc.} \\
22 Oct \> \> 7.1--7.2 \> Memory and arrays \\
24 Oct \> \> 7.3--7.4 \> Implementing data structures in assembly language \\
29 Oct \> \> \> Catch up and review for midterm \\
31 Oct \> \> \> Midterm exam \\
5 Nov \> \> 8.1--8.2 \> Discuss midterm \\
7 Nov \> HW3 due \> 8.3--8.4 \> MAL, registers, and addressing \\
8 Nov \> \> \> Last day to withdraw from classes \\
12 Nov \> HW4 \> 9.1--9.3 \> Procedure calling in assembly language \\
14 Nov \> \> 9.4--9.5 \> Parameters and local variables \\
19 Nov \> \> 9.6--9.7 \> Register usage and example \\
21 Nov \> \> 10 \> What an assembler does \\
26 Nov \> HW4 due \> 11 \> I/O in assembly language \\
28 Nov \> \> \> Thanksgiving --- no classes \\
3 Dec \> HW5 \> 12 \> Interrupts, exceptions, and I/O \\
5 Dec \> \> 13 \> Measuring and improving computer speed \\
10 Dec \> \> 14.1--14.3 \> Different approaches to computer architecture \\
12 Dec \> HW5 due \> 14.4--14.6 \> Catch up and review for final \\
19 Dec \> \> \> 3:30--5:30 PM, Final Exam % \\

% 6 Sept \> HW1 \> 2.1--2.3 \> Declarations and arithmetic \\
% 8 Sept \> \> 2.4 \> Control flow in assembly language \\
% 11 Sept \> \> 2.5--2.6 \> I/O and program example \\
% 13 Sept \> \> 2.7--2.8 \> Procedures and program example \\*
% \> \> \> Last day to add courses \\
% 15 Sept \> \> \> Centennial fair --- no classes after 1:00 PM \\
% 18 Sept \> HW1 due \> 3.1--3.3 \> Representing natural numbers \\
% 20 Sept \> \> 3.4--3.5 \> Representing real numbers \\
% 22 Sept \> HW2 \> 4.1--4.2 \> Representing integers on a computer \\
% 25 Sept \> \> \> Rosh Hashanah --- no classes \\
% 27 Sept \> \> 4.3--4.4 \> Representing characters \& reals on a computer \\
% 29 Sept \> \> 5.1--5.2 \> Boolean operations and truth tables \\*
% \> \> \> Last day to drop courses \\
% 2 Oct \> HW2 due \> 5.3 \> Integer addition and subtraction \\
% 4 Oct \> \> \> Yom Kippur --- no classes \\
% 6 Oct \> \> 5.4--5.5 \> Integer multiplication and division \\
% 9 Oct \> \> 6.1--6.2 \> Floating-point addition and subtraction \\
% 11 Oct \> \> 6.3--6.4 \> Floating-point multiplication and division \\
% 13 Oct \> HW3 \> 6.5--6.7 \> Floating-point rounding, overflow, \& underflow \\
% 16 Oct \> \> 7.1--7.2 \> Memory and arrays \\
% 18 Oct \> \> 7.3--7.4 \> Implementing stacks and queues \\
% 20 Oct \> \> \> Midterm exam \\
% 23 Oct \> \> 8.1--8.2 \> MIPS assembly language, registers, \& addressing \\
% 25 Oct \> \> 8.3--8.4 \> MAL instructions and example \\
% 27 Oct \> HW3 due \> \> Discuss midterm \\*
% \> \> \> Last day to apply for May degree \\
% 30 Oct \> \> 9.1--9.3 \> Procedure calling \& stacks \\
% 1 Nov \> HW4 \> 9.4--9.6 \> Parameter passing, saving registers \\
% 3 Nov \> \> 9.7--9.8 \> Procedure example \\*
% \> \> \> Last day to withdraw from courses \\
% 6 Nov \> \> 10.1--10.2 \> TAL, the ``true'' MIPS assembly language \\
% 8 Nov \> \> 10.3--10.4 \> Instruction formats, directives, computing offsets \\
% 10 Nov \> HW4 due \> 11.1--11.2 \> I/O devices and programming \\
% 13 Nov \> \> 12.1--12.3 \> Interrupts and exceptions \\
% 15 Nov \> \> 12.4--12.5 \> Exceptions and the operating system \\
% 17 Nov \> HW5 \> 13.1--13.2 \> Measuring and improving computer speed \\
% 20 Nov \> \> 13.3--13.4 \> Branching and memory hierarchies \\
% 22 Nov \> \> 14 \> Alternative architectures \\
% 24 Nov \> \> \> Thanksgiving break --- no classes \\
% 27 Nov \> HW5 due \> Handout 1 \> Representing Boolean functions \\
% 29 Nov \> \> Handout 2 \> Karnaugh maps and conversions \\
% 1 Dec \> \> Handout 3 \> Boolean gates and circuit diagrams \\
% 4 Dec \> \> Handout 4 \> Multiplexers and decoders \\
% 6 Dec \> \> Handout 5 \> Implementing integer addition \\
% 8 Dec \> \> Handout 6 \> Implementing a simple ALU \\
% 11 Dec \> \> \> Review for final exam \\
% 18 Dec \> \> \> 3:30--5:30 PM, Final Exam
\end{tabbing}

\end{document}

			Homework assignments

HW1: problems from chaps. 1,2: 1.8,1.11,1.12,1.14,2.3,2.10,2.12
HW2: problems from chaps. 3,4: 3.8,3.10,3.12,4.5,4.7,4.9
HW3: problems from chaps. 5,6: 5.2,5.3,5.4,5.6,5.13,sign of division?,
HW4: problems from chaps. 7,8,9
HW5: problems from chaps. 10,11,12,13
