Presentation is loading. Please wait.

Presentation is loading. Please wait.

Some Computer Science Conceptual Background Material Doug Hogan This version for UIC Spring 2016 CS 107.

Similar presentations


Presentation on theme: "Some Computer Science Conceptual Background Material Doug Hogan This version for UIC Spring 2016 CS 107."— Presentation transcript:

1 Some Computer Science Conceptual Background Material Doug Hogan This version for UIC Spring 2016 CS 107

2 Software Overview: Two Kinds of Software System software Controls basic operations of computer The operating system manages memory, files, application software File management tasks – deleting, etc.

3 Software Overview: Two Kinds of Software Application software Not essential to system running Enables you to perform specific tasks Ex: Office software Web browsers Media players Games

4 Algorithms and Languages An algorithm is a set of instructions to solve a problem. Think recipes. Many algorithms may solve the same problem. How do we choose? We use a programming language to explain our algorithms to computer and write programs.

5 Programming Paradigms/Models Imperative Programming: specify steps to solve problem, use methods, methods could get long Object-Oriented Programming (OOP): create objects to model real-world phenomena, send messages to objects, typically shorter methods Event-Driven Programming: create methods that respond to events like mouse clicks, key presses, etc. Others: Functional, logic, etc.

6 Compiled vs. Interpreted Languages Interpreted Language Requires software called an interpreter to run the code Code is checked for errors as it runs (erroneous code: do the best we can…) Examples: HTML, JavaScript, PHP Compiled Language Requires software called a compiler to run the code Code must be compiled into an executable before running (and thus error- free) Examples: C, C++, Pascal, Fortran, BASIC

7 Compiling Process Source Code (C++, Fortran, …) Object Code Executable Program Object Code from Libraries compilerlinker

8 Errors Syntax Errors Misuse of the language, much like using incorrect punctuation in English Compiler reports; program won’t run until they’re resolved Logic Errors Program doesn’t solve the problem at hand correctly Runtime Errors Errors that occur while the program is running, e.g. problems accessing memory and files, divide by zero

9 Abstraction Poll: Who can use a cell phone? Who can explain how a cell phone works? Who can drive a car? Who is an auto mechanic? Abstraction Principle of ignoring details that allows us to use complex devices Focus on the WHAT, not the HOW Fundamental to CS Other examples?

10 Levels of Abstraction 0. Digital Logic 1. Microprocessor 2. Machine Language 3. Operating System 4. Assembly Language 5. High-Level Language 6. Application Software

11 Binary Numbers Use two symbols: 0 and 1 Base 2 Compare with decimal number system Uses symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Base 10 At the lowest level of abstraction, everything in a computer is expressed in binary.

12 Binary Numbers, ctd. 0 1 10 11 100 101 110 111 Places: Decimal: 1s, 10s, 100s, etc. Binary, 1s, 2s, 4s, 8s, etc. Conversion between decimal and binary is done by multiplying or adding by powers of 2. 1000 1001 1010 1011 1100 1101 1110 1111 10000

13 Other Number Systems Any positive integer could be the base of a number system. (Big topic in number theory.) Others used in computer science: Octal: Base 8 Hexadecimal: Base 16 New symbols A, B, C, D, E, F

14 ASCII Every character on a computer -- letters, digits, symbols, etc. -- is represented by a numeric code behind the scenes. This system of codes is called ASCII, short for American Standard Code for Information Interchange. We’ll learn more in lab…


Download ppt "Some Computer Science Conceptual Background Material Doug Hogan This version for UIC Spring 2016 CS 107."

Similar presentations


Ads by Google