Gettysburg College

CS 221
Computer Organization
and
Assembly Language Programming

Spring 2023

Instructor: Ivaylo Ilinkin
Email: ilinkin @ gettysburg . edu    
Office: Glatfelter 208
Hours: MTuW 3:30-5pm
Th 3-4,5-6pm

Textbook

Nisan and Shocken, From Nand to Tetris: Building a Modern Computer from First Principles (chapters 1--6 free online)

Kann, Introduction To MIPS Assembly Language Programming (free online)

On-line Information

All relevant information for the course is available at

http://www.cs.gettysburg.edu/~ilinkin/courses/Spring-2023/cs221/

Check this page at least twice a day, since this will be the only source of last-minute pertinent information.

General Description

CS221 studies the hardware architecture of a computer and how programs and data are represented and processed on a physical device. Topics include machine and assembly and machine language programming, basic computer operations, data representation, digital circuits and hardware organization.

Prerequisites

The course assumes successful completion of CS 112 (a grade of C- or better). Consequently, abstract reasoning and ability to decompose large problems into small manageable pieces, along with significant programming experience are expected in CS 221.

Course Goals

Upon completing this course you should be able to
  1. carry out conversions and arithmetic in various number systems

  2. represent and minimize boolean functions/circuits

  3. design digital circuits in Hardware Description Language (HDL) and Digital Circuit Simulator

  4. integrate digital circuits to build a simple computer architecture

  5. identify the format of and write machine level instructions

  6. write programs in Assembly language

  7. write programs in C/C++; use pointers and bitwise operators

Curricular Goals

CS 221 fulfills the Quantitative, Inductive, and Deductive Reasoning aspect of the Multiple Inquires curricular goal.

Course Outline

The course will cover the following topics (not necessarily in this order):
  1. Number systems representations and conversions

  2. Machine representation of numbers and arithmetic

  3. Boolean operators and functions; minimization

  4. Digital circuits (basic gates, multiplexors, flip-flops)

  5. Digital circuit design (registers, memory, ALU, CPU)

  6. Instruction representation and machine level programming for the Hack platform

  7. Assembly programming for the Hack and the ARM platforms

  8. Low-level C programming including pointers and bitwise operators

These topics correspond to Chapters 1-6 in N2T and 1-9 in IMAL (if time permits, we may cover sections from other chapters). Visit daily the "Readings List" section of the class webpage as this will be updated frequently with the suggested readings.

Workload

The general guideline is to be prepared to spend at least 2-3 hours outside of the classroom for each lecture hour. You should expect to spend significant amount of preparation for this course working on a computer to design digital circuits in HDL and Simulator and to develop the programming assignments; some assignments may have foundation/theory-type problems.

You are encouraged to form study groups with colleagues from the class. The goal of these groups is to clarify and solidify your understanding of the material, and to provide for richer and more engaging learning experience. However, you are expected to turn in your own code that represents the results of your own effort. See the policy outlined in the "Scholastic Conduct" and "Assignments" sections of the syllabus, or talk to the instructor, if you are unsure about the expected level of collaboration.

Attendance

Attendance is expected for each class period. Two late arrivals will count as one absence. If you are late, make sure you notify the instructor after class. Attendance, participation, and an apparent overall trend of improvement may be considered in assigning the final grade.

Note that excessive absence may lead to withdrawal from the course. For more information see

Gettysburg College’s Policy on Class Attendance and Absence

Assignments and Exams

There will be several assignments during the semester of various types -- theory (CS201-type), circuit design (CS221), and programming (CS111-type). Each assignment will be evaluated based on a number of criteria including design, correctness, clarity of explanation, documentation, and testing (as applicable).

In general, you are free to discuss the assignments with others and brainstorm high-level ideas but you must work out the details of the solution on your own and write your own code. You may consult on-line resources, as long as they contain only expository material; resources that contain solutions to the assigned (or very similar) problems, pseudocode, or code written in a programming language may not be consulted. If group work is allowed, this will be mentioned explicitly in the guidelines of the particular assignment.

Here is a set of guidelines of practices that are not allowed while working on the assignments and exams. This is not an exhaustive list -- talk to the instructor if you are unsure about the allowed level of collaboration:

Here are the relevant dates and how much each portion of your work will contribute to your final grade:

Programming
Assignments
Jan 26, Feb 2, Feb Feb 9, Feb 16, Feb 23, Mar 1
Mar 23, Mar 30, Apr 6, Apr 13, Apr 27, May 4
61%
Fourth Hour weekly Sunday quizzes 2%
Exam 1 evening of Wed, Mar 15, at 7:00-8:30pm 18%
Exam 2 evening of Wed, Apr 19, at 7:00-8:30pm 18%
Final Project
(Assignments 11&12)
Thu, May 4, at 11:30am
(Assignment 12 due date)
Department Colloquia must attend at least 2
arrive on time, stay for entire talk, no phone/laptop use
1%

The exams will be closed-book, closed-notes, closed-neighbor, closed-electronic devices, etc. The work you turn in on the exams must represent solely the results of your own individual effort.

Note the dates of the exams carefully --- make-up exams will be given only under extreme circumstances provided that arrangements are made at least a week in advance.

Late Assignments

Late assignments will incur a 1% penalty for each late hour (or fraction thereof) for a maximum of 10%. Assignments that are more than 1 day late will not be accepted, but incomplete assignments will receive partial credit.

This is intended to give some flexibility and is meant to be used when much of the assignment has been completed. Note that there is no course staff on duty on Friday and it will not be possible to get help: ideally most of the major difficulties will have been discussed by Thursday.

Note that each assignment is approximately 5% of the final grade and incomplete work will likely receive some partial credit, so an individual assignment does not have significant negative impact.

Fourth Hour

This course meets the Fourth Hour requirement through weekly online quizzes due on Sundays by 11:59pm.

Grading

Grading for this course is based on the scale below. For borderline cases attendance, participation, and apparent trend of improvement during the semester may be taken into consideration.
93--100A
90~93A-
87~90B+
83~87B
80~83B-
77~80C+
73~77C
70~73C-
67~70D+
63~67D
60~63D-
0~60F
Your final grade will be at most 10% higher than the lower of your overall exam and overall homework score. For example, if your overall exam score is 61.5%, your final grade level will be at most 71.5%.

You are expected to receive the equivalent of at least a C- on the final exam in order to pass the class.

Incompletes

Incompletes (or make-up exams) will be considered only when a serious family or personal emergency arises and all but a small portion of the work has been completed. (Incompletes will not be given for reasons such as a heavy course load.) Arrangements for the incomplete, including obtaining all required documentation, should be made as soon as possible.

Special Accommodation

Students needing special accommodation are encouraged to contact the Academic Advising Office as soon as possible so that all required documentation can be processed and all necessary arrangements can be made on time.

For more information on the support available at Gettysburg College see

https://www.gettysburg.edu/offices/academic-advising/student-disability-accommodations/

Scholastic Conduct

Students at Gettysburg College are governed by the Honor Code. Failure to abide by the scholastic conduct expected on assignments or exams is a violation of the Honor Code tradition at Gettysburg College. It is your responsibility to read carefully the "Assignments" section of the syllabus which outlines the policy on assignments and exams. If you need help and are unsure about the expected level of collaboration, see the instructor for clarification and help with the assigned material.

For further general information on the Honor Code tradition at Gettysburg College see

https://www.gettysburg.edu/offices/academic-advising/honor-code/