Top Banner
COS 111 Computers and Computing
41

COS 111 Computers and Computing

Feb 24, 2016

Download

Documents

Jason

COS 111 Computers and Computing. COS 111 Computers and Computing. Course Staff. Prof.: Jaswinder Pal (J.P.) Singh Room 423, Tel: 8-5329, [email protected] Office hours: Wednesday 3 – 4 pm TA: Nitin Garg (5 th year graduate student) Room 217, Tel: 8-0451, [email protected] - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: COS 111  Computers and Computing

COS 111 Computers and Computing

Page 2: COS 111  Computers and Computing

COS 111 Computers and Computing

Page 3: COS 111  Computers and Computing

Course Staff

• Prof.: Jaswinder Pal (J.P.) Singh• Room 423, Tel: 8-5329, [email protected]• Office hours: Wednesday 3 – 4 pm

• TA: Nitin Garg (5th year graduate student)• Room 217, Tel: 8-0451, [email protected]• Office hours: Tuesday 4:30 pm

• Head Lab TA: Yesim Koman• [email protected]• Lab TA schedule to be posted at www.princeton.edu/~ykoman/TA.htm

• Undergraduate Coordinator: Tina McCoy• Room 410, 8-1746, [email protected]

Page 4: COS 111  Computers and Computing

Me and My Computer

• What is your year, (intended) major?

• Why are you in this class?

• What are you hoping to get out of it?

• When did you first start to use a computer, and what for?

• What do you use a computer for today?– Do you browse and use the Web regularly?– Do you have any background in programming or tinkering?

• What are two of the most important uses of computers, other than your own?

Page 5: COS 111  Computers and Computing

What abilities do you need in a computer?

Page 6: COS 111  Computers and Computing

What are the major changes you’ve observed in the use of computers?

Page 7: COS 111  Computers and Computing

What are the major changes you’ve observed in computers themselves?

Page 8: COS 111  Computers and Computing

What are the major changes you expect to see over the next few years?

Page 9: COS 111  Computers and Computing

What are the major changes you would most like to see over the next few years?

Page 10: COS 111  Computers and Computing

When Was the Computer Invented?

Page 11: COS 111  Computers and Computing

When Was the Transistor Invented?

Page 12: COS 111  Computers and Computing

When was the Microprocessor Invented?

Page 13: COS 111  Computers and Computing

When Was the Internet Invented?

Page 14: COS 111  Computers and Computing

When Was the World Wide Web Invented?

Page 15: COS 111  Computers and Computing

What is the Difference between the Internet and the WWW?

Page 16: COS 111  Computers and Computing

A Brief History of Computer Time

• Harvard MK-I and Colossus: 1943– Colossus designed to crack German coding system– Vacuum valves as “transistors” and punched cards for storage

• ENIAC: completed 1946 (first generation)– Weighed 30 tonnes; contained 18,000 electronic valves; consumed 25KW of power; could do

100,000 calcs/sec

• Transistor: 1947 (second generation)• Integrated circuit (third generation: minicomputers)

– 1958; first commercial implementation 1963

• Microprocessor (CPU on a chip)– First commercial in 1971 (Intel 4004)– 60,000 instructions/sec (supercomputers like Cray 1 were 150M)

• Personal Computer: MITS Altair 8800 in 1974– Followed by Apple 1 and II, Commodore, and IBM PC (1981)

Page 17: COS 111  Computers and Computing

A Brief History of Internet Time

• ARPANET: DARPA research project started 1969– First RFC: April 7th, 1969

• Opened to non-military use in 1970s– Big universities

• Opened to international connections 1972– Still no email, web etc; just networking and research

• Domain names etc in mid 80s; standardized email• World Wide Web 1989

– For physicists to share information; usage begins 1991

• Web takes off: Mosaic (1993); Netscape (1994)

Page 18: COS 111  Computers and Computing

Who Invented the Internet?

• Al Gore• Kleinrock (packet switching theory: 1961)• Roberts (plan for ARPANET: 1969)• TCP Team: 1974• First virus team: 1980

Page 19: COS 111  Computers and Computing

What is the Role of Computers in Cosmology and Astrophysics?

Page 20: COS 111  Computers and Computing

What is the Role of Computers in the Human Genome Project?

Page 21: COS 111  Computers and Computing

Why are You in this Class, and What do You Hope to Get out of it?

Page 22: COS 111  Computers and Computing

The Following is Not a Test …

Page 23: COS 111  Computers and Computing

Some Questions

• What happens between the time I send an email and you receive it?

• What happens between the time you submit a URL to a browser and you see the page returned?

• What happens between the time you submit a query to a search engine and you get results back?

• Where do the data that a search engine returns come from?

Page 24: COS 111  Computers and Computing

Some Questions

• How long does it take for a request to go from NY to San Francisco and back on the Internet?

• How long does it take for light to go from NY to SF and back?

• What is “market cap?”

Page 25: COS 111  Computers and Computing

Some Questions

• What is TCP/IP?• What is IP?• What is TCP?• What is HTTP?• What is HTML?• What is SMTP?• What is MP3?• What is JPEG?• What is the size of a 3 minute audio file?• What is the size of a 3 minute video file?

Page 26: COS 111  Computers and Computing

Some Questions

• What is Java?• What is C?• What is a compiler?• What is Windows?• What is an operating system?• What is Linux?• What is Unix? • What is the difference between RAM and a hard drive?• What is a cache?

Page 27: COS 111  Computers and Computing

Some Questions

• What is SETI@Home?• What is Napster?• What is Gnutella?• How are Napster and Gnutella similar and different?• What is the legal implication of the difference

between Napster and Gnutella?

Page 28: COS 111  Computers and Computing

Some Questions

• What does “security” mean in the context of computers?

• What are some key aspects of computer security?• What is DRM?

Page 29: COS 111  Computers and Computing

Should You be Here?

• COS 111 is intended for students from the humanities and social sciences who want a one-course introduction to computers and computer science. Emphasis is on understanding how computers really work, starting with a single switch, and showing step by step how to use just that one kind of part to build the most interesting human-made machine. Also addressed are algorithms or methods for solving problems on a computer, programming a computer, and essential limitations of the computer, such as undecidability, as well as future prospects for artificial intelligence and on-line access to the world's knowledge. The laboratory is complementary to the classroom work and explores a broad spectrum of modern applications.

Page 30: COS 111  Computers and Computing

So is he only going to ask questions, or is he going to teach?

?

Page 31: COS 111  Computers and Computing

What Does a Computer Do?

Whatever I tell it to do• I say: Add 2 and 3 and show me the result

– Computer says: 5

• I say: Multiply that result by 7 and show me the result– Computer says: 35

• I say: Show me the home page of the Princeton CS department– Computer says:

Page 32: COS 111  Computers and Computing

What’s Going On?

Page 33: COS 111  Computers and Computing

The Ghost in the Machine• Read an input and memorize it• Read another input and memorize it• Add the inputs, display and memorize result• Read input and memorize it• Multiply input with previous result and display the result

• Hardware does the work• Programmer writes a program for the machine• Program tells hardware what to do at each step

Page 34: COS 111  Computers and Computing

What A Program Looks Like

read (a) read (b)c = a + b

read (d)e = d * c

print (e)

; Read first input and store it in variable a; Read second input and store it in variable b; Add the values of a and b and store the result in

variable c

; Read third input and store it in variable d

; Multiply the values of c and d and store the result in variable e

; Display the value of variable e

• The computer takes each of these instructions and executes it

Page 35: COS 111  Computers and Computing

Steps and Layers in Solving a Problem by Computer

• Problem to solve or service you want to provide• Methods to solve the problem: Algorithms• Description of the methods to the computer: Programming

and Languages• Translating your description into instructions the computer

understands: Compilers• Performing the instructions: Architecture and Hardware

– Execute instructions– Represent and store data– Sequence instructions– Communicate– Take data as input and produce as output– Handle sound, graphics, video, …

Page 36: COS 111  Computers and Computing

Other Aspects We Will Cover

• Manage resources so multiple applications can run on the computer: Operating Systems

• Special application areas like Graphics, Sound and Distributed File Sharing

• Hard problems: impossible or very difficult for a computer to solve in reasonable time

• Security: Taking advantage of hard problems• Artificial Intelligence

Page 37: COS 111  Computers and Computing

Our Approach

• Take some very simple problems and algorithms, and see how computer actually runs them

• Then, see how the simple algorithms are written as programs in programming languages, and compiled so the computer can understand them

• Then, examine more sophisticated and interesting algorithms, and how to compare and analyze different algorithms for solving a problem

Throughout, illustrate some key concepts like abstraction, hierarchy and recursion

• Then, talk about some of the other areas

Page 38: COS 111  Computers and Computing

Rest of the Course

• Introduction to Computing (2 classes, including this one)

• Hardware: Building a computer (6 classes)

• Programming and Languages (2 classes)

• Midterm review and Midterm (2 classes)

• SPRING BREAK

• Operating Systems and Networking (2 classes)

• Algorithms (2 classes)

• Sound and Graphics (2 classes)

• Distributed Applications (1 class)

• Limitations of Computing; hard problems and security (2 classes)

• Artificial Intelligence (1 class)

• Review (1 class)

Page 39: COS 111  Computers and Computing

Practical Details

• Lectures Monday and Wednesday 1:30-2:50 p.m.– Lecture slides will be online– Class participation expected AND GRADED

• Labs– Start week of 2/7, due by Friday at 5PM– Tues, Wed, Thurs: 7:30 to 10:30 pm; room TBD– Can do in lab sessions or elsewhere– Lab TA schedule and contact info to be posted at www.princeton.edu/~ykoman/TA.

htm by end of week

• Problem Sets– Handed out Mondays, due Wednesdays at 5 pm (9 days later)

YOU ARE RESPONSIBLE FOR MONITORING THE WEB SITE AND THE MAILING LIST FOR ANNOUNCEMENTS. WE WILL NOT PROACTIVELY NOTIFY YOU OF ANYTHING.

Page 40: COS 111  Computers and Computing

Practical Details

• Paperless course– All assignments, lecture notes on web

• Go to http://www.cs.princeton.edu • Click on fall courses• Click on COS 111

• Mailing list for communication with students (and TA)– Sign up at https://lists.cs.princeton.edu/mailman/listinfo/cos111 a.s.a.p.

• Problem sets– Lowest score dropped– Must do 7 of 9 to pass the course

• Labs– Must complete all labs to pass the course

• Midterm and Final

Page 41: COS 111  Computers and Computing

Grading Basis

• Problem sets 20%

• Lab reports 10%

• Midterm exam 25%

• Final exam 25%

• Class Participation 20%