CS 61C Great Ideas in Computer Architecture (Machine Structures). Summer 2012, UC Berkeley
CS 61C Summer 2012
MTuWTh 9:30-11am 390 Hearst Mining


Lecture, Reading, and Assignment Calendar

READ THE COURSE SYLLABUS. It is linked below in the "Reading" column. It has a lot of the details about the course logistics and policies you will want to know. But for emphasis, the cheating policy is reiterated below:

Policy on Assignments and Independent Work. Unless explicitly stated otherwise, all homeworks and projects are to be YOUR work and your work ALONE. You are encouraged to discuss your assignments with other students, but we expect that what you hand in is yours. It is NOT acceptable to copy solutions from other students or to copy (or start your) solutions from the Web. We have tools and methods, developed over many years, for detecting this. You WILL be caught, and the penalties WILL be severe. These include, at minimum:

  • NEGATIVE 100% for the cheater and a ZERO for the enabler on the assignment.
  • A letter to your university record documenting the incidence of cheating.
  • Consideration for an automatic F in the course at the discretion of the course staff.

Wk Date Lecture Topic Reading Notes Lab Assignment Due
1 06/18 M Course Introduction, Number Representation
(pdf) (pptx)
Course Syllabus
P&H: 1.1-1.3, 1.6, 1.8, 2.4
Disc 1 (Solns)

J: Number Rep
J: Basic C
LAB 1: C Intro
and Number Rep
06/19 Tu
Introduction to C, Pointers
(pdf) (pptx)
K&R: Ch 1-4
Brian Harvey Notes on C (pdf)
HW0: Introduce Yourself
Due 6/19 @ 23:59:59
06/20 W
C Arrays, Strings, More Pointers
(pdf) (pptx)
K&R: Ch 5-6
Binky Pointer Fun Video
Disc 2 (Solns)

J: Arrays, Pointers
J: Memory
LAB 2: Pointers
and Debugging

06/21 Th
C Memory Management and Usage
(pdf) (pptx)
K&R: 7.8.5, 8.7
HW1: C Programming (Rubric)
Due 6/24 @ 23:59:59
06/25 M
Intro to Machine Language
(pdf) (pptx)
P&H: 2.1-2.3, 2.6, 2.9, 3.2 Disc 3 (Solns)

J: Basic MIPS
Lab 3: Malloc and

06/26 Tu
More MIPS, MIPS Functions
(pdf) (pptx)
P&H: 2.7-2.8, B.6
06/27 W
MIPS Instruction Formats
(pdf) (pptx)
P&H: 2.5, 2.10 Disc 4 (Solns) Lab 4: Pointers
in Assembly
06/28 Th
Running a Program
(pdf) (pptx)
P&H: 2.12, B.1-B.4 HW2: C and MIPS (Rubric)
Due 07/01 @ 23:59:59
07/02 M
Floating Point, Performance
(pdf) (pptx)
P&H: 1.3-1.4 Disc 5 (Solns)

J: Floating Point
Lab 5: Linking and
Floating Point
07/03 Tu
Review Lecture; Old Midterm Problems
(pdf) (pptx) (problems)
07/04 W
Holiday Disc 6 (Solns) Discussion 6;
Make-up Labs;
Work on Project 1
07/05 Th
Direct-Mapped Caches
(pdf) (pptx)
P&H: 5.1, 5.2 (just to p.470) Project 1: MIPS Instruction Set Emulator
Due 07/08 @ 23:59:59
07/09 M
Cache Performance, Set Associative Caches
(pdf) (pptx)
P&H: 5.3, 5.5 Disc 7 (Solns)

J: Perf and Caches
Lab 6: Cache
07/10 Tu
Performance Programming, Technology Trends
(pdf) (pptx)
P&H: 1.5, 1.6
07/11 W
The Flynn Taxonomy, Data Level Parallelism
(pdf) (pptx)
P&H: 7.1, 7.6 Disc 8 (Solns) Lab 7: Data Level
HW3: FP and Caches (Rubric)
Due 07/11 @ 23:59:59
07/12 Th
Old Midterm Problems MIDTERM - Friday 07/13, 9am-12pm
(midterm) (rubric)
07/16 M
Amdahl's Law, Thread Level Parallelism
(pdf) (pptx)
P&H: 7.2, 7.3, 5.8, 2.11 Disc 9 (Solns)
Lab 8: Thread Level
07/17 Tu
OpenMP, Transistors
(pdf) (pptx)
OpenMP Summary Card (pdf)
07/18 W
Synchronous Digital Systems, Boolean Algebra
(pdf) (pptx)
More details on lecture material:
SDS Handout, Logic Handout
Disc 10 (Solns) Lab 9: Logisim
07/19 Th
Functional Units, Finite State Machines
(pdf) (pptx)
More details on lecture material:
State Handout, Blocks Handout
Project 2: Matrix Multiply Part 1
Due 07/22 @ 23:59:59
07/23 M
MIPS CPU Datapath, Control Intro
(pdf) (pptx)
P&H: 4.1-4.3 Disc 11 (Solns) Lab 10: Logisim
and Pipelining
07/24 Tu
MIPS CPU Control, Pipelining Intro
(pdf) (pptx)
P&H: 4.4, 4.5 (p.330-335), 4.6
07/25 W
Pipelining Hazards
(pdf) (pptx)
P&H: 4.5 (p.335-343), 4.7, 4.8 (p.375-379) Disc 12 (Solns) Make-up Labs;
Work on Project 2
HW4: Digital Logic (Rubric)
Due 07/25 @ 23:59:59
07/26 Th
Multiple Instruction Issue, VM Intro
(pdf) (pptx)
P&H: 4.8 (p.380-383), 4.10, 4.11 Project 2: Matrix Multiply Part 2
Due 07/29 @ 23:59:59
07/30 M
Virtual Memory
(pdf) (pptx)
P&H: 5.4, 5.11 Disc 13 (Solns) Lab 11: Virtual Memory
07/31 Tu
I/O: Disks, Polling, Exceptions & Interrupts
(pdf) (pptx)
P&H: 6.1, 6.3, 6.4, 6.6, 4.9
08/01 W
Warehouse-Scale Computers, MapReduce
(pdf) (pptx)
Warehouse-Scale Computers: Ch 1, 2.4, 5.1-5.3
(Optional) MapReduce paper (pdf)
Disc 14 (Solns) Lab 12: MapReduce Final Review: Fri 08/03 3-6pm, 306 Soda
(Problems, Solution)
08/02 Th
Dependability: Parity, ECC, RAID
(pdf) (pptx)
P&H (4th): 6.2, 6.9
(Optional) Berkeley RAID Paper (pdf)
Project 3: CPU Design (notes)
Due 08/05 @ 23:59:59
08/06 M
Course Summary and Review
(pdf) (pptx)
Disc 15 (Solns) Free Lab Time
08/07 Tu
Old Final Problems
08/08 W
Special Topics: Biological Computing
(pdf) (pptx)
08/09 Th
FINAL - Thu 08/09, 9am - 12pm
(final) (rubric)

Weekly Schedule

Monday Tuesday Wednesday Thursday Friday
9:30-11:00 LECTURE
390 Hearst Mining
390 Hearst Mining
390 Hearst Mining
390 Hearst Mining
11:00-12:00 101 DIS -- Raphael
320 Soda
101 LAB -- Raphael
200 Sutardja Dai
101 DIS -- Raphael
320 Soda
101 LAB -- Raphael
200 Sutardja Dai
1:00-2:00   102 LAB -- Paul
200 Sutardja Dai
  102 LAB -- Paul
200 Sutardja Dai
2:00-3:00 102 DIS -- Paul
320 Soda
102 DIS -- Paul
320 Soda
3:00-4:00 103 DIS -- Brandon
320 Soda
103 LAB -- Brandon
200 Sutardja Dai
103 DIS -- Brandon
320 Soda
103 LAB -- Brandon
200 Sutardja Dai
5:00-6:00 104 DIS -- Sung Roa
310 Soda
104 LAB -- Sung Roa
200 Sutardja Dai
104 DIS -- Sung Roa
310 Soda
104 LAB -- Sung Roa
200 Sutardja Dai


Justin Hsia

Instructor: Justin Hsia
OH:  F 12-2, 200 Sutardja Dai


TA: Raphael Townshend
Sections: 101 LAB, 101 DIS
OH: TuTh 5-6, 411 Soda
TA: Paul Ruan
Sections: 102 LAB, 102 DIS
OH: MW 1-2, 411 Soda
TA: Brandon Lee
Sections: 103 LAB, 103 DIS
OH: TuTh 2-3, 411 Soda
TA: Sung Roa Yoon
Sections: 104 LAB, 104 DIS
OH: MW 4-5, 411 Soda

If you have a question, here are the ways to get an answer, rated from best to worst:

  1. Search for the answer yourself.  Far too often students ask a question whose answer is available on this very page or on the top of assignment handouts.
  2. Ask a fellow classmate.
  3. Look for your question on Piazza, then ask a new one if necessary.
  4. Ask your TA during discussion section, lab, or office hours.
  5. Ask Justin in office hours.
  6. Ask Justin in lecture.
  7. Send your TA email.
  8. Send Justin e-mail. Note that this is by far the worst way to ask a question. E-mail as a communications medium simply does not scale to 100+ students.


Name Grading Accounts E-mail
Allen Xiao cs61c-ab -> cs61c-bc cs61c-rb@imail.eecs
Jamie Li cs61c-bd -> cs61c-cg cs61c-rc@imail.eecs
Linda Cai cs61c-ch -> cs61c-di cs61c-rd@imail.eecs
Roger Gong cs61c-dj -> cs61c-eu cs61c-re@imail.eecs

Resources and Handouts

Reference card for GDB version 5:  (pdf | ps | dvi)
Harvey notes on C:  (pdf)
Hilfinger notes on Memory Management:  (pdf)
MIPS Green Sheet:  (pdf)
Floating Point Java Demos:  (html)

P&H We will be using the revised fourth edition of Patterson and Hennessy's Computer Organization and Design book ("P&H"), ISBN 0123747503.
Beware buying from a site that imports books from Asia, since the content of that book is different (i.e. ARM instruction set instead of MIPS). These companies often lie about what version they are selling, sometimes taking the image of the US edition and claiming that it is the same.
K&R We are also requiring The C Programming Language, Second Edition by Kernighan and Ritchie ("K&R"), and will reference its sections in the reading assignments. Other books are also suitable if you are already comfortable with them, but our lectures will be based on K&R.
WSC Finally, we will be using The Datacenter as a Computer: An Introduction to the Design of Warehouse-Scale Machines ("WSC"), which is freely available online here.

The subjects covered in this course include: C and assembly language programming, how higher level programs are translated into machine language, computer organization, caches, performance measurement, parallelism, CPU design, warehouse-scale computing, and related topics. The only prerequisite is that you have taken CS61B, or at least have solid experience with a C-based programming language.

PiazzaThe course discussion forum is hosted by Piazza. We will use this for asking and answering questions and making announcements. Only available to enrolled students.

CS Illustrated

Illustrations by Ketrina Yim (csillustrated.berkeley.edu)
Integer Representations Comparing Integer Representations Comparing Integer Representations 2 Comparing Integer Representations 3
Floating Point
Floating Point Floating Point Interpretations Floating Point Number Line
Caches: Caching Overview Cache Misses Cache Associativity
Pointers and
Pointers and Arrays

CS61C, http://inst.eecs.berkeley.edu/~cs61c/ (Last Updated: 2012-08-08 @ 19:57)