1 / 11

Introduction to Computer Systems

Introduction to Computer Systems. 15-213 “ The Class That Gives CMU Its Zip! ”. Topics: Theme Four great realities of computer systems Chap 1 in “Computer Systems” book. And gives Ithaca??. Course Theme. Abstraction is good, but don’t forget reality!

bettyclark
Download Presentation

Introduction to Computer Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Course Theme • 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> 105 110 99 108 117 100 101 32 < s t d i o . h > 115 116 100 105 111 46 104 62 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> 105 110 99 108 117 100 101 32 < s t d i o . h > 115 116 100 105 111 46 104 62 Etc…. Actual representation on the disk: 00100011 01101001 01100011 01101100 01110101 01100100 …

  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 * 40000 --> 1600000000 • 50000 * 50000 --> ?? • Is (x + y) + z = x + (y + z)? • Unsigned & Signed Int’s: Yes! • Float’s: • (1e20 + -1e20) + 3.14 --> 3.1 • 1e20 + (-1e20 + 3.14) --> ?? 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 * 40000 --> 1600000000 • 50000 * 50000 --> ?? • Is (x + y) + z = x + (y + z)? • Unsigned & Signed Int’s: Yes! • Float’s: • (1e20 + -1e20) + 3.14 --> 3.1 • 1e20 + (-1e20 + 3.14) --> ?? see Student/comp210/examples/testInt.c -1794967296 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

More Related