Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Computer Systems

Similar presentations


Presentation on theme: "Introduction to Computer Systems"— Presentation transcript:

1 Introduction to Computer Systems
15-213 “The Class That Gives CMU Its Zip!” And gives Ithaca?? Introduction to Computer Systems Topics: Theme Four great realities of computer systems Chap 1 in “Computer Systems” book

2 Course Theme Courses to date emphasize abstraction
Abstraction is good, but don’t forget reality! Courses to date emphasize abstraction Abstract data types (e.g., Comp 220) Asymptotic analysis (e.g., Comp 311) These abstractions have limits Especially in the presence of bugs Need to understand underlying implementations Don’t believe what Ali says

3 Course Theme Useful outcomes Become more effective programmers
Able to find and eliminate bugs efficiently Able to tune program performance Prepare for later “systems” classes Programing Languages, Operating Systems, Computer Networks, Complex Systems

4 The Changes in Computing

5 Great Reality #1 Information is Bits + Context Examples
Source Program: #include <stdio.h> int main() { printf(“hello world\n”); } ASCII representation of the source program (text file): # i n c l u d e <sp> < s t d i o . h > Etc…. Actual representation on the disk:

6 Great Reality #1 Information is Bits + Context Examples
Source Program: #include <stdio.h> int main() { printf(“hello world\n”); } ASCII representation of the source program (text file): # i n c l u d e <sp> < s t d i o . h > Etc…. Actual representation on the disk:

7 All information is represented as bits
Including disk files, programs in memory, user data in memory, data transferred across the internet, … The only thing that distinguishes data objects is context Same bits may represent an integer, floating-point number, character string, or machine instruction.

8 Great Reality #1 cont. Int’s are not Integers, Float’s are not Reals
Examples Is x2 ≥ 0? Float’s: Yes! Int’s: 40000 * > 50000 * > ?? Is (x + y) + z = x + (y + z)? Unsigned & Signed Int’s: Yes! Float’s: (1e e20) > 3.1 1e20 + (-1e ) --> ?? see Student/comp210/examples/testInt.c see Student/comp210/examples/testFloat.c

9 Great Reality #1 cont. Int’s are not Integers, Float’s are not Reals
Examples Is x2 ≥ 0? Float’s: Yes! Int’s: 40000 * > 50000 * > ?? Is (x + y) + z = x + (y + z)? Unsigned & Signed Int’s: Yes! Float’s: (1e e20) > 3.1 1e20 + (-1e ) --> ?? see Student/comp210/examples/testInt.c 0.0 see Student/comp210/examples/testFloat.c

10 Computer Arithmetic Does not generate random values
Arithmetic operations have important mathematical properties Cannot assume “usual” properties Due to finiteness of representations Integer operations satisfy “ring” properties Commutativity, associativity, distributivity Floating point operations satisfy “ordering” properties Monotonicity, values of signs

11 Computer Arithmetic Observation
Need to understand which abstractions apply in which contexts Important issues for compiler writers and serious application programmers


Download ppt "Introduction to Computer Systems"

Similar presentations


Ads by Google