Welcome to Comp 411!

  1. Course Mechanics
  2. Course Objectives

Whos and Whats...

Lectures:Leonard McMillan (SN-311)
Office Hours Mon 2-4
TA:
TBD
Office Hours TBD
Book:None this semester.We'll use only my notes.

Course Mechanics

Grading:

Best 5 of 6 problem sets25%
Best 9 of 10 problem sets20%
2 in-class exams30%
Final exam25%

You will have at least two weeks to complete each problem set. Problem sets will be online. Late problem sets will not be accepted, but the lowest problem-set score will be dropped.

Friday Labs are mandatory, and will meet on most Fridays, grade is based on completing a "lab check list."

I will attempt to make Lecture Notes, Problem Sets, and other course materials available on the web before class on the day they are given.

Course Website

URL: http://csbio.unc.edu/mcmillan/index.py?run=Courses.Comp411F15

Goals of Comp411

To answer fundamental questions

  • What does the computer do with my program?
  • How is data represented in a computer?
    1. Numbers
    2. Strings
    3. Photographs
    4. Music
  • How is my program represented in a computer?
  • Are there any limits to what a computer can do?

Goal 1: To Demystify Computers

Strangely, most people (even some computer scientists I know) are afraid of computers.

We only fear what we do not understand!

I do not fear computers. I fear the lack of them.
- Isaac Asimov (1920-1992)
Fear is the main source of superstition, and one of the main sources of cruelty. To conquer fear is the beginning of wisdom.
- Bertrand Russell (1872-1970)

Goal 2: The Power of Abstraction

Define a function, develop a robust implementation, and then put a box around it.

Abstraction enables us to create unfathomable systems (including computer hardware and software).


Why do we need ABSTRACTION?


Imagine a billion --- 1,000,000,000

Goal 3: Managing a Billion Parts

What does a program do?

By now you should be able to look at a program specification and figure out what it does.

What does this one do?

How would you approach this problem?

Try f(36), f(64), f(100)


int f(x) {
    int r;
    int odd = 1;
    for (r = 0; x >= odd; r++) {
        x -= odd;
        odd += 2;
    }
    return r;
}
    

How does a computer do?

What does a computer do with this program specification?

It translates it into a series of simple instructions.

int f(x) {
    int r;
    int odd = 1;
    for (r = 0; x >= odd; r++) {
        x -= odd;
        odd += 2;
    }
    return r;
}
    
Memory

Are there limits of computation?


A simple computer model


    int memory[16384];    // for instuctions and data
    int register[32];     // for variables
    int pc;               // next instruction to execute
    int flags;

    void main(void) {
        pc = 0;
        while (1) {
            instruction = memory[pc];
            pc = pc + 1;
            flags = execute(instruction);
        }
    }
    

A computer is an interpreter that executes a simple program loop.

Where are we going?

Summary

411 answers the following questions:

  • How is information represented, stored, and manipulated by a computer?
  • What does a computer really doing with my program?
  • How to design, build, and manage large systems?

411 Logistics:

  • T-Th lectures and discussions
  • F ~2-hour Lab (starting 8/28)