Transcription
This is CS50
This is CS50
2/3of CS50 students have never taken CS before
what ultimately matters in this course is not so much whereyou end up relative to your classmates but whereyou end up relative to yourself when you began
input output
representation
decimal
base-10
0 1 2 3 4 5 6 7 8 9
0 1
base-2
binary
0 1
bits
0
1
0 1
0 1 2 3 4 5 6 7 8 9
123
1123
101123
100101123
100101123100 1
100101123100 1 10 2
100101123100 1 10 2 1 3
100101123100 20 3
123
100101###
102101100###
222120###
421###
421000
421001
421010
421011
421100
421101
421110
421111
This is CS50
A
65
01000001
ASCII
.ABCDEFGHI.656667686970717273.
727333
HI727333
HI!727333
HI!010010000100100100100001
bytes
Unicode
128514
000000011111011000000010
RGB
72 73 33
72 73 33
input output
algorithms
This is CS50
1-949-468-2750
n
nn/2
nn/2
nn/2
nn/2
nn/2
nn/2log2 n
pseudocode
12345678910111213Pick up phone bookOpen to middle of phone bookLook at pageIf person is on pageCall personElse if person is earlier in bookOpen to middle of left half of bookGo back to line 3Else if person is later in bookOpen to middle of right half of bookGo back to line 3ElseQuit
12345678910111213Pick up phone bookOpen to middle of phone bookLook at pageIf person is on pageCall personElse if person is earlier in bookOpen to middle of left half of bookGo back to line 3Else if person is later in bookOpen to middle of right half of bookGo back to line 3ElseQuit
12345678910111213Pick up phone bookOpen to middle of phone bookLook at pageIf person is on pageCall personElse if person is earlier in bookOpen to middle of left half of bookGo back to line 3Else if person is later in bookOpen to middle of right half of bookGo back to line 3ElseQuit
12345678910111213Pick up phone bookOpen to middle of phone bookLook at pageIf person is on pageCall personElse if person is earlier in bookOpen to middle of left half of bookGo back to line 3Else if person is later in bookOpen to middle of right half of bookGo back to line 3ElseQuit
12345678910111213Pick up phone bookOpen to middle of phone bookLook at pageIf person is on pageCall personElse if person is earlier in bookOpen to middle of left half of bookGo back to line 3Else if person is later in bookOpen to middle of right half of bookGo back to line 3ElseQuit
functionsconditionsBoolean expressionsloops
functionsconditionsBoolean expressionsloopsvariablesthreadsevents.
#include stdio.h int main(void){printf("hello, world\n");}
input algorithms output
algorithms output
output
input algorithms output
algorithms output
output
input algorithms output
algorithms output
output
abstraction
This is CS50
1 Pick up phone book 2 Open to middle of phone book 3 Look at page 4 If person is on page 5 Call person 6 Else if person is earlier in book 7 Open to middle of left half of book 8 Go back to line 3 9 Else if person is later in book 10 Open to middle of right half of book 11 Go back to line 3 .