Post on 17-Jun-2020
This is CS50
2/3of CS50 students have never taken CS before
what ultimately matters in this course is not so much where you end up relative to your classmates but where you end up relative to yourself when you began
input → → output
representation
0 1 2 3 4 5 6 7 8 9
0 1
123
1231
12310 1
123100 10 1
123100 10 1
100 × 1
123100 10 1
100 × 1 +
123100 10 1
100 × 1 10 × 2+
123100 10 1
100 × 1 10 × 2+ +
123100 10 1
100 × 1 10 × 2 1 × 3+ +
123100 10 1
100 20 3+ +
123
000100 10 1
001100 10 1
002100 10 1
003100 10 1
004100 10 1
005100 10 1
006100 10 1
007100 10 1
008100 10 1
009100 10 1
010100 10 1
000100 10 1
000102 101 100
00022 21 20
0004 2 1
0014 2 1
0104 2 1
0114 2 1
1004 2 1
1014 2 1
1104 2 1
1114 2 1
bit
💡
bit bit bit bit bit bit bit bit
💡💡💡💡💡💡💡💡
byte
💡💡💡💡💡💡💡💡
A
65
01000001
65
ASCII
... A B C D E F G H I ...
... 65 66 67 68 69 70 71 72 73 ...
72 73 33
H I
72 73 33
H I !
72 73 33
Unicode
128514
11111011000000010
RGB
72 73 33
72 73 33
input → → output
algorithms
10245122561286432168421
pseudocode
1 Pick up phone book2 Open to middle of phone book3 Look at page4 If Smith is on page5 Call Mike6 Else if Smith is earlier in book7 Open to middle of left half of book8 Go back to line 39 Else if Smith is later in book10 Open to middle of right half of book11 Go back to line 312 Else13 Quit
1 Pick up phone book2 Open to middle of phone book3 Look at page4 If Smith is on page5 Call Mike6 Else if Smith is earlier in book7 Open to middle of left half of book8 Go back to line 39 Else if Smith is later in book10 Open to middle of right half of book11 Go back to line 312 Else13 Quit
1 Pick up phone book2 Open to middle of phone book3 Look at page4 If Smith is on page5 Call Mike6 Else if Smith is earlier in book7 Open to middle of left half of book8 Go back to line 39 Else if Smith is later in book10 Open to middle of right half of book11 Go back to line 312 Else13 Quit
1 Pick up phone book2 Open to middle of phone book3 Look at page4 If Smith is on page5 Call Mike6 Else if Smith is earlier in book7 Open to middle of left half of book8 Go back to line 39 Else if Smith is later in book10 Open to middle of right half of book11 Go back to line 312 Else13 Quit
1 Pick up phone book2 Open to middle of phone book3 Look at page4 If Smith is on page5 Call Mike6 Else if Smith is earlier in book7 Open to middle of left half of book8 Go back to line 39 Else if Smith is later in book10 Open to middle of right half of book11 Go back to line 312 Else13 Quit
● functions● conditions● Boolean expressions● loops
● functions● conditions● Boolean expressions● loops● variables● threads● events● ...
#include <stdio.h>
int main(void){ printf("hello, world\n");}
input → → outputalgorithms
→ → algorithms → output
→ → → output
→ →
input → → outputalgorithms
→ → → outputalgorithms
→ → → output
→ →
input → → outputalgorithms
→ → → outputalgorithms
→ → → output
→ →
→
→
→ →
→ → →
This is CS50