CS/ECE 354: Machine Organization and Programming

sections 1 and 2, Spring 2015

Last updated by Karen on May 6, 2015

Class Announcements

Please send Karen e-mail and stay home if you have fever and other flu symptoms.

This section lists class announcements. Items will not remain on this page for the entire semester, but will instead attempt to represent the current week's announcements.

Week of May 4

Links within this web page


Teaching Assistants for Spring 2015:

Textbook information

Acquire a copy of

And, you will need access to information about programming in the C language. Online sources may be enough, but no guarantees. Most any textbook that introduces the C language (not C++) is acceptable, so if you already have a book, use it. If you do not already have a book, please consider purchasing your own copy of

You will find this book relevant and useful in both further coursework and in industry.



There are both written homeworks and programs in this course. All assignments focus on course topics. Grading is based on both correctness and programming style. You write C programs. You will be expected to design algorithms and organize code for these programs. Algorithm details will not often be covered in class. You are expected to write grammatically correct, clear documentation for the code. A description of expectations for programs is given in this Guidelines for Programs document. You will generally not be given test cases for your programs. So, you will need to identify reasonable test cases, and test your own program with them.

You will use computers that are running RedHat Linux, a Unix operating system. For the Spring 2015 semester, these are the galapagos machines in room 1366 CS. If you had an account in CS last semester, it will still be available to you. Otherwise, you have been assigned a new account.

Assignments are due as stated on each assignment: given by both a due date and a time. Assignments will be turned in online. Any assignment turned in after the due date/time and up to 24 hours late will receive a deduction of 25% of the total available points. Any assignment turned in more than 24 hours after the due date/time will not be graded, and it will receive a zero score. Exceptions to this late policy will be considered only if discussed with your instructor well before the assignment is due.

Grading is quite strict. Pay attention to the requirements given with each assignment; missing requirements will result in deductions.

You may work in pairs on most assignments. Both students working together must be currently enrolled in the course. Each student must (individually) turn in each assignment. On collaborated assignments, there will be 2 copies of the assignment turned in: one by each of the pair working together. This is required to simplify the grading and to insure that both partners have copies of code that might be utilized in subsequent assignments. Include the names and sections of both students involved, as stated in the assignment specification. The TA will choose to grade just one of these turned in assignments, giving the same score to both students. Pairings may be different on different assignments.

Exam questions will require your understanding of both homeworks and programs. Expect exam questions to determine whether you both did and understood the assignments.

Do not post your assignment solutions (or drafts) on any publicly accessible web sites. This specifically includes GitHub. It is academic misconduct to post your solution.


There will be 3 exams. The first 2 will be during the standard evening exam time, starting at the beginning of the 5:30pm midterm time period; the last exam is given during the summary activity period. The dates of the exams are given in the schedule below.

Exam Policies

Bring a current photo ID to all exams. Your UW student ID is preferred. No ID, no exam!

Each student may use one 8.5 by 11 inch sheet of paper with hand-written notes when taking the exams. Both sides of the paper may be used. These notes may not be shared when taking the exam. The goal of these notes is to reduce anxiety and help students prepare for exams by deciding what should be on the page of notes.

Copies of appropriate tables for ASCII/x86 will be provided as needed with the exam.

No electronic devices (such as calculators and laptop computers) may be used during exams. Cell phones will be turned off during exams. A phone that rings during an exam may result in a penalty, determined by the instructor.

If you have a conflict with any listed exam time, you must notify Karen before Monday Feb 2. Conflicts include other exams, as well as other class activities that meet during the exam time and have a graded component.

University policies will be followed strictly in this course. Please, pay particular attention to policies on academic misconduct and incompletes.

Exam Preparation

To help prepare for exam 1, here are sample questions:

To help prepare for exam 2, here are sample questions:

To help prepare for exam 3, here are sample questions:


Grades will be based on the exams and assignments. More difficult, and more time consuming assignments may be given more weight than easier ones.
assignments  30% 
exam 1  20% 
exam 2  25% 
exam 3  25% 

Requests for re-grades must be made within one week after graded work is returned. For programs and homeworks, contact the TA listed as the grader on your grade sheet. For exams, talk to Karen.

Helpful Links

Here are some (possibly) helpful web pages.

C Programming

addressing mode links

Course Schedule

All students are responsible for the material under the headings of Topics and Lecture Slides, Reading, and On Your Own. Material under the heading of On Your Own will not be covered in class.

Only assume that lecture slides are ready the week they are used in lecture. The slides posted far ahead may be referenced, but they are old, and have not yet been updated for this semester.

Dates Topics and Lecture Slides Reading On Your Own Beyond 354 Due Dates
prerequisite material
Number Systems

on Important Terms you must know

integer representations:
questions, questions with answers

character representation:
questions, questions with answers
1/21-23 class policies: pdf slides

C Programming:
Part 1: pdf

introduction to C,
I/O in C
1/26-30 C programming:
Part 2: pdf,
stacks pdf
lots of K&R, on pointers,
on functions and memory allocation
on argv and argc:
questions, questions with answers
finish the optional Assignment 0 by Friday
2/2-6 C: structures and linked lists:
structs pdf,
linkedlists pdf

integer arithmetic and logical operations:
pdf slides
lots more of K&R,

integer arithmetic, logical, and shift operations, 2
stack from a linked list pdf

addressibility: questions, questions with answers
floating point representation
2/9-13 Intel x86 assembly language pdf slides 3.1-3.6 two's complement multiplication
Assignment 1 due Wednesday: C program
2/16 - 20 arrays
pdf slides

the stack and function implementation
pdf slides 1,
pdf slides 2
2/23-27 finish function implementation,
example slide 1
example slide 2

stack smashing
pdf slides

Exam 1 Tuesday 5:30-7pm
Location: 272 Bascom
Covers C programming, linked lists, stacks, arithmetic and logical operations
3/2-6 dynamic memory allocation
pdf slides
Assignment 2 due Wednesday: binary bombs
3/9-13 I/O introduction and Disks
pdf slides, pdf slides,
input and output

more on I/O and DMA
3/16-20 exception handling
pdf slides

just for fun, read The Story of Mel.
3/23-27 memory hierarchies and caching
pdf slides,
1 slide: in class example
Assignment 3 due Wed: interrupts
3/30 - 4/3 Spring Break Office hours by appt only.
4/6-10 virtual memory
pdf slides
9.1-9.8 Exam 2 Thursday 5:30pm
Section 1: 1361 Chemisty
Section 2: 1351 Chemisty
Covers x86 coding, function implementation, I/O, exception handling
4/13-17 finish virtual memory

linking and loading
pdf slides
7 Assignment 4 due Wed: caches
4/20-24 pointer arithmetic hints, pdf slides

the Internet, pdf slides
4/27-5/1 Network programming
pdf slides
5/4-8 review slides introduction to pipelining Assignment 5 due Monday
Friday May 15, 7:45am-9:45am Exam 3
Location: B10 Ingraham