Download presentation
Presentation is loading. Please wait.
1
Introduction to Computer Science I
2
WHY? Before the bicycle the cheetah was the most efficient animal on the planet. A computer is a bicycle for your mind.
3
This class teaches you to ride that bicycle
4
In order to utilize a computer we need to be able to express our ideas within it’s limits
5
First challenge. Learn a programming language that lets us do that.
6
Let’s build up some intuition
What does a programing language really represent
7
Phone Book Search (Mike Smith)
0 pick up phone book 1 open to middle of phone book 2 look at names 3 if Smith is among names call Mike 5 else if Smith is earlier in book 6 open to middle of left half of book 7 go back to step 2 8 else if "Smith" is later in book open to middle of right half of book go back to step 2 else quit
8
Shampoo Algorithm
9
Class Count 0 Stand up and think of the number 1 1 Pair off with someone standing. Add your numbers together. 2 One of you should sit down. If you're still standing, go back to step 1.
10
But HOW
11
Assembly/ Machine Language
1 1 0 0
12
Input 1 1 Output 1 A = 1 B = 1 A and B
Compiler A = 1 Input 1 1 B = 1 A and B Output 1 High-level programming languages
13
Still no bicycle
14
What if we could build a machine that could add large numbers?
Binary and XOR Gate
15
We need a way to represent numbers/info
Binary We need a way to represent numbers/info
20
XOR GATE
21
Could we build a simple two bit adding machine
22
Compiler A = 0 B = 1 1 A + B Output 1 High-level programming languages
25
Memory and State Save multiple numbers so that we can compute
26
Memory Input 0 0 0 1 1 1 Memory Output 0 0 0 1 1 0
27
1 Output 1 A = 0 B = 1 C = A + B High-level programming languages
Memory Input 0 0 0 1 1 1 Memory Output 0 0 0 1 1 0 Compiler A = 0 B = 1 1 C = A + B Output 1 High-level programming languages
28
MIT Video Programming Cells.
29
Code to DNA Quick Section of MIT Video MIT Video
30
What language should we choose?
31
No perfect language “ There are only two kinds of programming languages: those people always [gripe] about and those nobody uses.” - Bjarne Stroustrup (Creator of C++)
32
/******************************************* *
Prints "Hello, World" * Everyone's first Java program. *******************************************/ public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World"); } We will talk about what the text in red means in later classes.
33
public class HelloWorld {
public static void main(String[] args) { int a, b, c; a = 1; b = 0; c = a + b; System.out.println(c); }
34
Like learning to ride learning to program takes practice
36
Test Quizzes Labs Logistics
37
Coursework and grading
Labs. 20% Due on Fridays. Programming assignments. 25% Due on Tuesdays at 11pm via electronic submission. Late assignments will get docked 10% a day Exercises. 10% Due on Mondays at 11pm. Exams. 15% + 30% Midterm (in class on Wednesday, October 4). Final (to be scheduled by Registrar)
38
Textbook Introduction to Programming in Java [Amazon · Pearson · InformIT ] Robert Sedgewick and Kevin Wayne
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.