CMSC 100 Course Overview Adapted from slides provided
- Slides: 48
CMSC 100 Course Overview Adapted from slides provided by Dr. des. Jardins Robert Holder holder 1@umbc. edu Thursday, September 1, 2011
¨ ¨ Thu What is your name? What is your major? What was your first computer you ever used? What did you use it for? CMSC 100 -- Overview 2
Course Logistics ¨ Instructor: Robert Holder, holder 1@umbc. edu ¨ Office hours: Tuesday 11: 30 -12: 30 & By appointment ITE 201 F ¨ TA: Debdatta Mukherjee, dmu 1@umbc. edu ¨ Office hours: TBD ¨ Course website/syllabus: http: //www. csee. umbc. edu/courses/undergraduate/100/Fall 11/ ¨ Schedule: http: //www. csee. umbc. edu/courses/undergraduate/100/Fall 11/schedule. html Thu CMSC 100 -- Overview 3
Textbooks ¨ Brookshear, Introduction to Computer Science Thu CMSC 100 -- Overview 4
Overview ¨What is Computer Science? ¨Course Logistics ¨First Assignments ¨UPC Example (if time) Thu CMSC 100 -- Overview 5
What is Computer Science?
What is Computer Science? (2) ¨ “Computer science is no more about computers than astronomy is about telescopes. ” - Edsger Dijkstra Thu CMSC 100 -- Overview 7
What is Computer Science? (3) ¨ “Computer science is the study of how computers can make the world a better place. ” - Robert Holder Thu CMSC 100 -- Overview 8
Grand Challenges for CS Ubiquitous Computing and Situation Awareness Information Search Autonomous Vehicles NIST Human-Level Intelligence DARPA Claytronics http: ///www. cs. cmu. edu/~claytronics/software thebrain. mcgill. ca
The Computer Revolution ¨ How fast did this happen? · · · [ http: //www. blinkenlights. com/pc. shtml ] 1950: “Simon” (plans published in Radio Electronics) 1973: HP 65 (programmable calculator) 1975: Altair 8800 (first widely used programmable computer kit) 1977: Apple II (a huge breakthrough, the first mass-produced, inexpensive personal computer) · 1981: IBM 5150 PC (now we’re really taking off) · 1984: Apple Macintosh 128 K · 2008: Mac. Book Air Thu CMSC 100 -- Overview 10
What Was It Like Then? ¨ The PDP-11/70 s my advisor used in college had 64 K of RAM, with hard disks that held less than 1 M of external storage ¨ “. . . And I had to walk five miles, uphill, in the snow, every day! And we had to live in a cardboard box in the middle of the road!” Thu CMSC 100 -- Overview 11
What Is It Like Now? ¨ The PDP-11/70 s my advisor used in college had 64 K of RAM, with hard disks that held less than 1 M of memory ¨ The cheapest laptop at Best Buy has 1 G of RAM and a 250 G hard drive for $200 ¨. . . a factor of 1018 more RAM and 1013 more disk space ¨. . . and your i. Pod nano has 8 G (or 16 G!) of blindingly fast storage ¨ “. . . so don’t come whining to me about how slow your computer is!” Thu CMSC 100 -- Overview 12
Moore’s Law ¨ Computer memory (and processing speed, resolution, and just about everything else) increases exponentially · (roughly: doubles every 18 -24 months) Thu CMSC 100 -- Overview 13
Measuring Memory ¨ One 0/1 (“no/yes”) “bit” is the basic unit of memory · · · · Eight (23) bits = one byte 1, 024 (210) bytes = one kilobyte (1 K)* 1, 024 K (220 bytes) = one megabyte (1 M) 1, 024 K (230 bytes) = one gigabyte (1 G) 1, 024 (240 bytes) = one terabyte (1 T) 1, 024 (250 bytes) = one petabyte (1 P). . . 280 bytes = one yottabyte (1 Y? ) ¨ How many different patterns can you represent with one bit of storage? · Two! (It’s either 0 or 1; that’s it, no in between) ¨ How many different patterns can you represent with one byte of storage? * Thu Note that external storage is usually measured in decimal rather than binary (1000 bytes = 1 K, and so on) CMSC 100 -- Overview 14
It’s Not Just Speed, It’s Quantity ¨ So just how big a revolution are we talking about? ¨ How many computers do you think were in the room when my advisor took her first programming class? · Answer: ZERO(*). ¨ How many computers are in this room? ·(* First we need to decide what is a computer… not so easy!) ·Answer: I’m going to guess around 100. Thu CMSC 100 -- Overview 15
Speed AND Quantity Thu CMSC 100 -- Overview 16
How Does a Computer Work? ¨ “The work performed by the computer is specified by a program, which is written in a programming language. This language is converted to sequences of machine-language instructions by interpreters or compilers, via a predefined set of subroutines called the operating system. The instructions, which are stored in the memory of the computer, define the operations to be performed on data, which are also stored in the computer's memory. A finite-state machine fetches and executes these instructions. The instructions as well as the data are represented by patterns of bits. Both the finite-state machine and the memory are built of storage registers and Boolean logic blocks, and the latter are based on simple logical functions, such as And, Or, and Invert. These logical functions are implemented by switches, which are set up either in series or in parallel, and these switches control a physical substance, such as water or electricity, which is used to send one of two possible signals from one switch to another: 1 or 0. This is the hierarchy of abstraction that makes computers work. ” -- W. Daniel Hillis, The Pattern on the Stone Thu CMSC 100 -- Overview 17
How Does a Computer Work? ¨ “The work performed by the computer is specified by a program, which is written in a programming language. This language is converted to sequences of machine-language instructions by interpreters or compilers, via a predefined set of subroutines called the operating system. The instructions, which are stored in the memory of the computer, define the operations to be performed on data, which are also stored in the computer's memory. A finite-state machine fetches and executes these instructions. The instructions as well as the data are represented by patterns of bits. Both the finite-state machine and the memory are built of storage registers and Boolean logic blocks, and the latter are based on simple logical functions, such as And, Or, and Invert. These logical functions are implemented by switches, which are set up either in series or in parallel, and these switches control a physical substance, such as water or electricity, which is used to send one of two possible signals from one switch to another: 1 or 0. This is the hierarchy of abstraction that makes computers work. ” -- W. Daniel Hillis, The Pattern on the Stone Thu CMSC 100 -- Overview 18
Abstraction: The Key Idea! ¨ Computers are very complex ¨ Most interesting programs are very complex ¨ What makes it possible to design and maintain these complex systems? ? ¨ Which just means: · Once we’ve solved a “low-level detail, ” we can treat that solution as a “black box” with known inputs and outputs, and not worry about how it works. ¨ The way we get there is called problem reduction (or decomposition or divide-and-conquer) Thu CMSC 100 -- Overview 19
Hardware ¨ ¨ Thu Patterns of bits Memory / storage registers Machine-language instructions Switches and Boolean logic blocks CMSC 100 -- Overview 20
Systems ¨ Operating systems ¨ Compilers Thu CMSC 100 -- Overview 21
Software ¨ Programs ¨ Programming languages Thu CMSC 100 -- Overview 22
What this class is about ¨ How computers are built, programmed, and used to solve problems · · · Hardware: Digital logic and system architecture Systems: Operating systems and networks Software: Basic programming/algorithms, databases Theory: Algorithms, computation, complexity Applications: AI, graphics, … Social issues: Ethics, privacy, environmental impact ¨ Other skills emphasized: · Effective writing and presentation skills · Basic programming (in Scratch) · Foundational mathematics for computer science Thu CMSC 100 -- Overview 23
What this class is NOT about ¨ ¨ Thu How to install Windows or Linux How to use Excel and Power. Point What kind of computer you should buy Advanced programming techniques CMSC 100 -- Overview 24
Course Logistics ¨ Instructor: Robert Holder, holder 1@umbc. edu ¨ Office hours: By appointment ¨ TA: Debdatta Mukherjee, dmu 1@umbc. edu ¨ Office hours: TBD ¨ Course website/syllabus: http: //www. csee. umbc. edu/courses/undergraduate/100/Fall 11/ ¨ Schedule: http: //www. csee. umbc. edu/courses/undergraduate/100/Fall 11/schedule. html Thu CMSC 100 -- Overview 25
Textbooks ¨ Brookshear, Introduction to Computer Science Thu CMSC 100 -- Overview 26
My Expectations ¨ Students will… · Attend class regularly · Be prompt, and not engage in distracting or disruptive behaviors �NO LAPTOPS OR CELLPHONES DURING CLASS �(yeah, I know it seems weird in a CS class…) · Take responsibility for knowing what work is due, and turning the coursework in promptly · Follow the course’s academic honesty policy, and not present another’s work as your own · Be engaged in the learning process, respectful of the course staff, and supportive of your fellow students · Express concerns and ask questions · Understand that the course staff has other obligations outside of this class Thu CMSC 100 -- Overview 27
Your Expectations ¨ The instructor will… · Tell students what is expected in terms of coursework and behavior · Be fair in giving assignments, grading assignments, and returning coursework in a timely fashion · Answer questions and concerns promptly · Be open to feedback and suggestions · Be respectful of students · Try to make the course useful, interesting, and enjoyable · Understand that students have other obligations outside of this class Thu CMSC 100 -- Overview 28
Academic Honesty Policy ¨ See handout… Thu CMSC 100 -- Overview 29
Course Communications ¨ Email · Requests for extensions, questions about course policies Instructor · Grading inquiries, requests for help with assignments TA � Still having trouble? Talk to instructor ¨ Office hours · Posted on website ¨ Blackboard · Instructor postings · Discussion board · Assignment submission Thu CMSC 100 -- Overview 30
First Assignments ¨ First Assignments · Academic Honesty Policy and Survey: Due Thursday 9/8 · HW 1: Due Tuesday 9/13 ¨ Homework expectations: · In general, there will be an assignment (either a written homework or a programming assignment) due each week(at least for the first part of the semester). · These assignments will typically be based on the assigned reading. · The primary purpose of the written assignments is to keep you on track with the reading, and to provide me with feedback about problem areas, well in advance of the midterm and final exams. (The exams will be very similar to the written assignments. ) · Please plan your time (to do the reading and complete the assignments) accordingly! ¨ All assignments are to be submitted in class (i. e. , as hardcopy!) unless otherwise specified ¨ Late policy (see course syllabus) Thu CMSC 100 -- Overview 31
EXAMPLE: Universal Product Codes Slides for the UPC example courtesy of Prof. Michael Littman (Rutgers University) • • • Thu First scanned product: Wrigley’s gum (1974). Method of identifying products at point of sale by 11 -digit numbers. Method of encoding digit sequences so they can be read quickly and easily by machine. CMSC 100 -- Overview 32
Reduction Idea • Each level uses an encoding to translate to the next level (i. e. , the next higher abstraction) • • • Thu Patterns of ink. Sequence of 95 zeros and ones (“bits”). Sequence of 12 digits. Sequence of 11 digits. Name/type/manufacturer of product. CMSC 100 -- Overview 33
Product Name • Ponds Dry Skin Cream • • • Name Badge Labels (Size 2 3/16" x 3 3/8") • • Thu 3. 9 oz (110 g) Unilever Home and Personal Care USA 100 Labels Avery Dennison/Avery Division CMSC 100 -- Overview 34
11 -Digit Number • • • Thu Digit = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} Sequence of 11 digits QUESTION: How many different items can be encoded? CMSC 100 -- Overview 35
Encode Name By 11 Digits • First 6 digits: Manufacturer • • Thu First digit, product category: � 0, 1, 6, 7, 8, or 9: most products � 2: store’s use, for variable-weight items � 3: drugs by National Drug Code number Last 5 digits: Manufacturer-assigned ID CMSC 100 -- Overview 36
Examples • Labels: 0 -72782 -051440 • • Ponds: 3 -05210 -04300 • • • Thu 0=general product 72782= Avery 051440=Avery’s code for this product 3=drug code 05210= Unilever 04300=National Drug Code for this product CMSC 100 -- Overview 37
12 -Digit Number • The UPC folks decided to include another digit for error checking. Example: • • • Thu 01660000070 04660000070 05660000070 08660000070 Rose’s Lime Juice (12 oz) Eckrich Franks, Jumbo (16 oz) Reese PB/Choc Egg (34 g) Bumble Bee Salmon (14. 75 OZ) Misread digit #2 and you turn sweet to sour. CMSC 100 -- Overview 38
Check Digit 1. Add the digits in the odd-numbered positions (first, third, fifth, etc. ) together and multiply by three. 2. Add the digits in the even-numbered positions (second, fourth, sixth, etc. ) to the result. 3. Subtract the result from the next-higher multiple of ten. The result is the check digit. Thu CMSC 100 -- Overview 39
Code and Example 01660000070 set evensum to d 2+d 4+d 6+d 8+d 10 set oddsum to d 1+d 3+d 5+d 7+d 9+d 11 set checkdigit to 10 - (3*oddsum+oddsum) mod 10 01660000070 odd-digit sum: 0+6+0+0=6 even-digit sum: 1+6+0+0+7=14 odd*3+even = 6*3+14=32 subtract from mult of 10=40 -32=8 • • Thu Lime juice: 01660000070→ 016600000708 Franks: 04660000070→ 046600000705 Choc Egg: 05660000070→ 056600000704 Salmon: 08660000070→ 086600000701 CMSC 100 -- Overview all are two digits different now 40
Some (Mod) Math • • Thu 3 x Sodd + Seven = 0 mod 10 The sum of the odd-position digits (times 3) plus the sum of the even position digits (including the check digit) is 0 mod 10. Modulo math is just like regular math, except things wrap around (like an odometer). Mod 10 means we only pay attention to the last digit in the number. Divide by 10 and only keep the remainder. CMSC 100 -- Overview 41
More Modulo Math • • Thu What’s the check digit for the code 0 -000000? What happens to the check digit if you add one to an oddposition digit? What happens to the check digit if you add one to an even-position digit? Reminder: Check digit = 10 – (3*oddsum + evensum) mod 10 CMSC 100 -- Overview 42
Bits • We’ve gone from a product name to an 11 -digit number to a 12 -digit number. • A 0 will appear in the UPC as a white bar (space) and a 1 as a black bar. • So we need to turn each digit into a series of bits. • Also, we want to be sure we alternate 0 s and 1 s often enough (e. g. , don’t want 20 black bars (1 s) in a row). • Finally, we want to have a code that we can scan in either direction (i. e. , we need to be able to tell which direction we’re reading it in). Thu CMSC 100 -- Overview 43
Bits Digits are encoded as 7 -bit patterns that all: • start with 0, end with 1 • switch from 0 to 1 twice • include no reverse complements 0: 0001101 1: 0011001 2: 0010011 3: 0111101 4: 0100011 5: 0110001 6: 0101111 7: 0111011 8: 0110111 9: 0001011 • Encode d 1 d 2 d 3 d 4 d 5 d 6 d 7 d 8 d 9 d 10 d 11 d 12 as: 101 d 2 d 3 d 4 d 5 d 6 01010 d 7 d 8 d 9 d 10 d 11 d 12 101 Last 6 digits have 0 s and 1 s flipped. (No reverse complements can tell what direction we’re scanning in!) Thu CMSC 100 -- Overview 44
How Many Bits? • Thu How many bits (zeros and ones) long is the code for the original 12 -digit sequence? CMSC 100 -- Overview 45
Finally, Ink! • • Thu Given the long pattern of bits, we write a 1 as a bar and a zero as a space. Two 1 s in a row become a double-wide bar. Two 0 s in a row become a double-wide space. No UPC has more than four 0 s or 1 s in a row. All digits have equal width. All UPCs start and end with bars (actually with blackwhite-black pattern). UPCs can be read upside down. UPCs can be read at an angle or variable speed via ratios. CMSC 100 -- Overview 46
Example 0: 0001101 1: 0011001 2: 0010011 3: 0111101 4: 0100011 Thu . . . . 5: 0110001 6: 0101111 7: 0111011 8: 0110111 9: 0001011 • • Barcode for skin cream: 3 -05210 -04300 -8 (8 is the check digit) ¨ ¨ ¨ start: 101; 3: 0111101 05210: 0001101 -0110001 -0010011 -0011001 -0001101 middle: 01010 04300: 1110010 -1011100 -1000010 -1110010 (rev) 8: 1001000 (rev); end: 101 • The digits underneath are for our benefit. CMSC 100 -- Overview 47
Whew! ¨ The UPC example illustrates: · Abstraction · Binary numbers and modulo math · Encoding (error correction, readability constraints) Thu CMSC 100 -- Overview 48
- 100 100 100 100 100
- Cmsc100
- A small child slides down the four frictionless slides
- A small child slides down the four frictionless slides
- Machine learning slides
- This passage is adapted from jane austen
- How are red blood cells adapted
- Adapted with permission from
- In what ways have the highland maya adapted to modern life?
- Xerophytic adaptation
- Chaparral biomass
- Structural adaptation of camel
- Adapted animals in the rainforest
- The two brothers adapted
- Adapted from the internet
- Gallant
- How have plants adapted to the rainforest
- Spermopsida plants
- The outsiders adapted for struggling readers
- Really synoynm
- Behavioral adaptations of zebras
- Half brick wall vs one brick wall
- Course number and title
- Course interne course externe
- 120 nin 100 de 60 eksiği
- 200+200+100+100
- Box plots gcse
- Malloc lab 100/100
- 1453-1337
- 100+100=200
- 100 iops/gb and 100,000 iops per volume oci
- 200+100+300
- C/100=f-32/180=k-273/100
- What's 100 + 100
- 100 + 100 = 200
- Números romanos hasta el 1000
- 100 + 200 300
- Cmsc 104 umbc
- Cmsc 250
- Cmsc 417
- Cmsc 471 umbc
- Cmsc 461
- Cmsc 456
- Cmsc 426 umbc
- Cmsc426
- Cmsc 412
- Anwar mamat umd
- Cmsc 341
- Cmsc 341 umbc