CS120: Lecture 1 - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

CS120: Lecture 1

Description:

CS120: Lecture 1 MP Johnson Hunter College mpjohnson_at_gmail.com – PowerPoint PPT presentation

Number of Views:98
Avg rating:3.0/5.0
Slides: 18
Provided by: mjo107
Category:
Tags: cs120 | lecture

less

Transcript and Presenter's Notes

Title: CS120: Lecture 1


1
CS120 Lecture 1
  • MP Johnson
  • Hunter College
  • mpjohnson_at_gmail.com

2
agenda
  • Admin
  • Syllabus
  • Survey
  • Data, storage, representation

3
admin
  • Sessions 948-1126am / 1136-114pm HW 224
  • Class page
  • Email
  • Text
  • OHs tba
  • Grading
  • Hw (written, prog., labs) O(6) 45
  • Exams 20 25
  • Class partic/quizzes 10
  • Start or end of class
  • Attendance is required 80

4
Core Class topics
  • 1 Breadth-first tour of CS
  • 2 Data
  • storage
  • Representation of knowledge)
  • Compression (JPG, MP3)
  • 3 How computers work
  • Machines
  • networks, Internet, OS
  • HTML
  • FTP, SSH
  • Algorithms good ones?
  • Programming / SE / data structures

5
Advanced/optional
  • AI
  • Hardware
  • Crypto
  • Unsolvable problems
  • Search Engines
  • Social/political issues?
  • Other topics?
  • Some parts of class will be challenging
  • Many will be applied/topical read Slashdot/Digg

6
Survey
  1. Name
  2. Email (clearly!!)
  3. Grade-level
  4. Major
  5. Why taking class
  6. Topics youre most interested in

7
Q What are comps?
  • A machines that compute
  • Q compute what?
  • A the output of some algorithm
  • Alg list of instructions / recipe
  • Abstract but unambiguous (how?)
  • Much more later
  • Egs long division algorithm, gcd, sorting

8
Long (pre)history
  • Abacus (3000BC) just storage
  • Pascal (1600s) addition
  • Leibniz (1600s/1700s) math
  • Babbage Diff. gin (1800s) math
  • Babbage An. Gin punched cards
  • All these were mechanical (gears, etc.)
  • Difficult to make reliable fast cheap

9
20th C electronics
  • Circuits, transistors, etc.
  • Mach 1, ENIAC, UNIVAC (1940s) - room-sized
  • Since then just miniaturization
  • Mainframes ? supercomps, minis ? PCs (micros)
    early 80s on
  • All essentially same
  • Run many programs (v. arcade machine)
  • These programs impl. Algs (tho in diff. langs)
  • They store, rep, use data

10
Today data
  • CS abstraction reduction
  • thats so reductive
  • In CS, all data is numbers,
  • All numbers are bits (0/1) / bools (F/T)
  • Bit binary digit
  • boolean George Boole (1800s)

11
Bool logic/algebra
  • Vals F, T
  • Ops and, or, xor, not
  • Draw truth tables
  • Xor intuit soup or sald
  • Can write exprs
  • Exprs can nest

12
Bool expr eg
  • Suppose A empl A is working, B, C
  • Suppose want should always be exactly one empl
    working
  • Q If we only know bool logic, how to test?
  • Q how to write a program for this in bool
    logic?
  • (A B C)
  • (A xor B)
  • (A B C)

13
Q How to compute/eval this?
  • We now understand bool ops, so we could perform
    each op ourselves
  • A gp of female workers in WWII were called
    computers
  • Bad too slow, error-prone
  • Funda strength of comps can do some (v. simple)
    things v. fast

14
strategy
  • Dont create a special machine to comp whole
    expr/function/program
  • Do create a little machine for each component,
    then combine
  • Forget about software for now!
  • How? First, bool ops ? gates

15
gates
16
Gates ? elec circuit
  • No one of these is v. interesting
  • But two big insights
  • Can create an implement gate electronically
  • 0/1 ? low/high current
  • Gates can be combined to produce powerful
    computations / representations
  • ? electronic circuits / chips
  • Draw circuits for each expr
  • Of course, want software (non-kickable)
  • For that we need a compiler

17
Circuits as memory
Reading for next week wiki entries on boolean
logic and twos complete (through section 2 only)
  • Flipflop special circuit that can store data
  • 1 bit per FF

To store, send pulse in top or bottom (0 is
ddf) Go through
Write a Comment
User Comments (0)
About PowerShow.com