Syllabus

COSC 221: Computer Organization 1

Winter 2020
23310

2:00-3:50pm MW - 203 PH

Instructor: Dr. William Sverdlik
Office: 512E Pray-Harrold
Office Hours: (tentative)
            Walk-In MW 9:00-9:50
            Walk-In MW 12:00-2:00
            Walk-In W 4:30-5:30
            Other times by appointment. You can try to see me after class, but I have limited time then . I respond promptly to e-mail during the week.
Phone: 734-487-7081
e-mail: wsverdlik@emich.edu


What I hope you get out of this course (some might call this "Objectives") :
This is a fun class! We will be learning how a computer works at a very primitive level. That is, we will be learning low level programming (at the bit level as well as assembler) and also looking at the design of various computer circuits (adders, memory, etc.). Why do this ? Because it helps us understand that weird stuff we see in other courses. For example, what REALLY is a java reference ? What is the difference between declaring a variable a int versus an unsigned int ? What really happens when we declare any variable ? What is the difference between a 16 bit processor and a 32 bit processor ? We will look at these questions (and others!!) in this course. When we are done, you should have a much better understanding of the internals of a computer system. This will help you in future courses (such as operating systems).

Summarizing the topics:
- binary, octal, hex numbering systems. Signed and unsigned integers, floating point numbers.
- introduction to boolean circuits with an emphasis on combinatorial circuits (decoders, multiplexors, adders,etc)
- introduction to sequential circuits with an emphasis on the structure of registers, RAM, ROM
- the basic structure of a von Neumann computer as demonstrated through the LC-3 computer simulator
- assembler programming on the LC-3 computer with a particular emphasis on addressing modes
- introduction to a "real world" CPU and its asembler (most likely an Intel 8086 family chip)

Lecture and Lab : Lab:  MW 2:00-3:50   203PH .
                        
Textbook: Patt and Patel, Introduction to Computing Systems, McGraw Hill (any edition is fine). YES, you will need to get the book!

Exams and final: There will be 3 quizzes (about 30 minutes) . See below for dates . NO MAKE UPS WILL BE GIVEN unless you provide a physicians note or other official documentation that verifies extenuating circumstances. There will be two exams (see below for dates), and a final exam.. Each quiz is worth 50 points, the exams are worth 100 points and the final is worth 150 points.

Important Dates This Semester
Jan. 6 - classes begin
Jan 20 - MLK Day (no classes)
Feb 24 - March 1 Winter Recess (no class)
March 11 - March 19 Bill is not here ( But Fear NOT! You will have class, including lectures and an exam)
April 20 - Last Day of Classes
April 27 - Your Final Exam (1:30pm - 3:00pm)

Quiz and Test Dates:
    Quiz 1 - Wednesday Jan 22
    Quiz 2 - Wednesday Feb. 5
    Quiz 3 - Wednesday Feb. 19
    Test 1 -  Monday March 16
    Test 2 -  Monday April 13

Programming exercises:
There will be 4 programming assignments; all are required. Each counts for 50 points.

    Tentative Due Dates (this may change)

    Program 1 -  Wednesday Feb 19 March 4 (changed)
    Program 2 -  Monday March 9  Wednesday March 25 (changed)
    Program 3 -  Monday March 30 Wednesday April 8 (changed)
    Program 4 -  Wednesday April 8 Wednesday April 15 (changed)

    Programming exercises will count for 200 points.

Final Exam:

    Monday April 27 from 1:30pm-3:00pm

Homework Exercises: Homework exercises are optional and do not carry any points. But it is suggested you do them to reinforce what you have learned. You are expected to do all homework. These will NOT be collected, but will be gone over during the first 15 minutes of class. You may assume that quizzes will be similar to the homework questions. 

Grades: There will be a total of 700 points awarded. 

Approximate Grading Scale:
       630-700      A   (90% - 100%)
       560-630      B   (80% - 90%)
       455-560      C   (65% - 80%)
       350-455      D   (50% - 65%)

Please note that this scale is approximate. Pluses and minuses will be awarded in situations "on the edge" (e.g. 625 may be an A-).
IMPORTANT: you can't pass this class without handing in all programs. Hand in 3 programs and ace all exams ? You will flunk the course.

Topic sequence: We will cover chapters 1 through 10.

Attendance: is not required, but you miss class at your own risk. It is your responsibility to find out the missed work; I suggest you get the phone number of a classmate. Make-up exams and quizzes will not be given.


Is this a hybrid class ?

No it isn't. But I have prepared videos for most of the lectures.

    Floating Point Number Representation


PLEASE DO NOT EMAIL IF YOU MISS OR PLAN TO MISS A CLASS .

A Note about email: I will have 75 students this semester spread out over three classes. I will make attempts to learn your names, but I am often unsuccessful. If I receive an email like:

From: ksmith27@emich.edu
To: wsverdlik@emich.edu
Subject: I don't understand

problem 7


I have no idea whom this student is, nor what class the student is referring to. Please begin all emails to me by saying "I am in your COSC 221 class". Also make sure to sign your email with your full name and student number. I tend to work in full, complete sentences and ask that you do so as well. Emails that don't meet this standard will not be answered.


Late Hand-Ins: Programming assignments and homework are due at 2:00pm on the given date. Late submissions are penalized 50% per class meeting late; i.e. if the assignment was due on a Wednesday, you may hand it in up to 2:00pm on the following Monday and receive a 50% penalty. Also note that handing in an assignment at 2:05pm on Monday is considered two days late and worth no points (again, assuming it was due Wednesday)! Late submissions still must be demoed to me. PLEASE NOTE: I enforce this rule strictly. Please be aware that parking can be a problem at Eastern; I would allow extra time for parking on days assignments are due. Also, be aware that broken printers, damaged diskettes, or long lines waiting for printouts are not legitimate excuses for tardy submissions. In other words, don't leave your homework until the last minute!

Cheating: It violates University policy, you know....so don't do it. Cheating is defined as representing all or part of someones elses work as your own. While you are certainly encouraged to seek the advice of others in this class on assignments, the work you hand in should represent your own efforts. Violation of this rule will be dealt with according to University policy. COPYING programs from the web or any other source and presenting it as your own work is a SERIOUS offense and will be dealt with accordingly. If you are really stuck on a problem, come see the instructor!


Some useful links for this class:

LC-3 Simulator
LC-3 Manual
IEEE floating point standard from wikipedia
The von Neumann Model
The Harvard Model (a non von Neumann model)
 

Lab Assignments

Submitting assignments:

In general, unless a particular lab assignment gives different instructions, whenever a lab asks you to write or modify a program, you should hand in a hardcopy of that code.

When you hand in your hardcopy, make sure the individual elements appear in the same order as in the assignment. 

PLEASE NOTE:

All code MUST begin with a heading (comment) that includes your first name, last name, student ID, and assignment number, class) as in

 /*      First Name : Bill
          Last Name: Jones
          ID: 76111
          Assignment #1
          COSC 221

  */

Handwritten assignments will not be accepted.
Failure to  make this the first thing I see when grading your homework will result in a 10% penalty. Programs should employ descriptive variable names, all methods should be commented; specifically every program must include a program description after the heading specified above. Failure to include a description will result in a 10% penalty.

The homework exercises(not to be handed in). Do these as you can!:

  1. HW 1 
  2. HW 2   and Problems 2.1 through 2.11 at end of chapter 2
  3. HW 3 
  4. HW 4 
  5. HW 5  and Problems 3.13, 3.14, 3.15, 3.16, 3.22 , 3.23 at the end of chapter 3
  6. HW 6
  7. HW 7 
  8. HW 8
  9. HW 9 
  10. HW 10 
  11. HW 11
The programming assignments (due dates are given above):
  1. Program 1 Wednesday Feb 19
  2. Program 2 Monday March 9
  3. Program 3 Monday March 30
  4. Program 4 Wednesday April 8

FINAL EXAM Monday April 27 from 1:30PM-3:00PM  

 LC-3 online Simulator



NEWS (check this frequently, as I will post updates here):
Chapter 2
    Video Chapter 2 - 1
    Video Chapter 2 - 2
    Video Chapter 2 - 3
Chapter 3
    Video Chapter 3-1 (Demorgan's Law and Universal Gates)
    Video Chapter 3-2 (Decoders, MUXes, Adders)
    Video Chapter 3-3 (Sum of Product and Product of Sums)
    Video Chapter 3-4 (SR and D Latches)
    Video Chapter 3 - Registers and the Structure of Memory
Chapter 4
    Video - The von Neumann model of computation
Chapter 5
    Video - Introduction to Programming on the LC-3
    Video - PC Relative Addressing ( Mem[PC+Offset9] )
    Video - Indirect Addressing ( Mem[Mem[PC+Offset9] ] )
    Video - Base-Offset( Register) Addressing and Immediate (LEA) plus some array processing
    Video - JMP TrapVectors and using the simulatorY
Chapter 6
  
You should read this chapter. We have written some of the programs, and used some of the tools.
This chapter is about program development. Note that many of the programs we have written in class
ran correctly the first time!! Programming is about planning BEFORE you get near a computer.
Chapter 7
    The Assembler
    Homework 7.4 , 7.5 , 7.6 , 7.8 , 7.13 , 7.16 , 7.18 , 7.19, 7.20, 7.21
Chapter 8
    Video 8-1 Introduction I/O
    Video 8-2 I/O on the LC-3
    Video 8-3 Interrupts
    Homework 8.1, 8.5, 8.6, 8.11, 8.13, 8.15, 8.16
Chapter 9
    The TRAP Mechanism
    Subroutines
    Homework  9.2, 9.4, 9.5, 9.7 , 9.10
Chapter 10
    Stacks
    Interrupts
    ASCII->integer and integer->ASCII
    Homework 10.3, 10.6, 10.8. In the video on Interrupts, we stated that we need to save the state of the machine before executing the interrupt service routine, and
                                                   that we needed to restore the state of the machine after executing the service routine. Suppose we save the state by PUSHing the PSR
                                                   followed by PUSHing the PC. We restore the state of the machine by POPping the PC, followed by POPping the PSR. Do you see a
                                                   problem with this?

Some help with addressing (we'll show Loads)
          PC Relative Addressing:   SRC <--- Mem[PC+Offset9]
          Indirect Addressing:         SRC <--- Mem[ Mem [ PC +Offset9 ] ]
          Base-Offset Addressing:   SRC <---Mem[ Reg+Offset6]
          Immediate Addressing:     SRC <--- PC+Offset9      (Note: doesn't access memory)

A contract:

I will:

-treat you with respect. This includes honoring your time.
-arrive to class on time
-not use a cell phone during class
-not engage in any social networking while in class
-will return exams, quizzes and assignments in a timely manner. Typically, this will be within one week.

I expect the following from each of you:

- that you treat me with the same respect you would like me to show you
- you will arrive to class on time
- you will put your cell phones on "Silence" and not engage in any texting at all during class. In fact, you should not even look at your cell phone during class.
- you will use your computer for class purposes only. You will not Facebook, Twitter, or engage in any other non-class related activities
- you will approach me with any questions concerning the class at the earliest possible time. Coming to my office 3 months into the semester and telling me "I don't understand" is unacceptable.