1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.

Slides:



Advertisements
Similar presentations
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Advertisements

Lecture 1: Overview of Computers & Programming
Overview of Programming and Problem Solving ROBERT REAVES.
Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
CSCE 145: Algorithmic Design I Chapter 1 Intro to Computers and Java Muhammad Nazmus Sakib.
ENGR2216 FORTRAN PROGRAMMING FOR ENGINEERS. Chapter 1 The computer CPU MEMORY INPUT/OUTPUT DEVICES DATA REPRESENTATION BINARY SYSTEM OCTAL & HEXADECIMAL.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
SOFTWARE SYSTEMS SOFTWARE APPLICATIONS SOFTWARE PROGRAMMING LANGUAGES.
CS 115 Chapter 1 Overview of Programming and Problem Solving.
CS102 Introduction to Computer Programming
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
CS 161 INTRO TO PROGRAMMING I Dr. Blaise W. Liffick Fall
Chapter Introduction to Computers and Programming 1.
Introduction to Programming Dr Masitah Ghazali Programming Techniques I SCJ1013.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Introduction to Programming. Our Book in CS Why Program? Lets watch a video
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
1 CSC 1401 S1 Computer Programming I Hamid Harroud School of Science and Engineering, Akhawayn University
Lecture 1 Introduction to computers & VB.Net. What is a Computer? Examples? A device capable of  Performing computation  Making logical decisions 
What is a Computer ? Computers are Electronic Machines that process (performs calculation and manipulation) Data under the control of Set of Instructions.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
CISC105 General Computer Science Class 1 – 6/5/2006.
An Introduction to Computers August 12, 2008 Mrs. C. Furman.
Introduction to Computer Programming in c
Chapter 1 – Computing Fundamentals. History of Electronic Computers u First computer –ABC (Atanasoff Berry Computer) at Iowa State U. –1930’s –Solved.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
Mrs. Ulshafer August, 2013 Java Programming Chapter 1.
School of Computer Science & Information Technology G6DICP Introduction to Computer Programming Milena Radenkovic.
Tolo-e-aftab higher education 1 th semester Bcs 1/2/1392 MINISTRY OF HIGHER EDUCATION.
Development of Computers. Hardware 1. Original concept: Charles Babbage 1840’s 2. 4 basic components of a computer system: input store mill output (Now:
CS 127 Introduction to Computer Science. What is a computer?  “A machine that stores and manipulates information under the control of a changeable program”
Beginning Snapshots Chapter 0. C++ An Introduction to Computing, 3rd ed. 2 Objectives Give an overview of computer science Show its breadth Provide context.
Programming in C++ Dale/Weems/Headington Chapter 1 Overview of Programming and Problem Solving.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Chapter 1 : Overview of Computer and Programming By Suraya Alias
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Computer Systems. Bits Computers represent information as patterns of bits A bit (binary digit) is either 0 or 1 –binary  “two states” true and false,
CS 125 Lecture 2 Martin van Bommel. Hardware vs Software Hardware - physical components you can see and touch –e.g. processor, keyboard, disk drive Software.
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
Chapter 1 An Overview of Computers and Programming Languages.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Chapter 3 Getting Started. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Objectives To give an overview of the structure of a contemporary.
Chapter 1: Introduction to Computers and Programming
Java Programming: From the Ground Up
BASIC PROGRAMMING C SCP1103 (02)
ECE 103 Engineering Programming Chapter 5 Programming Languages
Chapter 1: An Overview of Computers and Programming Languages
CSCI-235 Micro-Computer Applications
Chapter 1: An Overview of Computers and Programming Languages
Lecture 1: Introduction to JAVA
BASIC PROGRAMMING C SCP1103 (02)
Computer System and Programming
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
Programming COMP104: Fundamentals and Methodology Introduction.
Chapter 1: Introduction to Computers and Programming
Computer Science I CSC 135.
Introduction to Computer Programming
Principles of Programming Languages
ICS103 Programming in C 1: Overview of Computers And Programming
Presentation transcript:

1 Lecture 2 : Computer System and Programming

Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output in a useful format

3 Computer System  Hardware + Software Computer Hardware Hard Disk Drive (HDD)DVD/CD Keyboard Monitor Main Memory CPU

4 Computer Hardware CPU (Central Processing Unit)  Processing program instructions (one by one)  Basic program instructions : add/subtract/multiply/div, read/write, jump, test  Cache : duplicating original data stored in slow storage into faster storage Main Memory (e.g. RAM)  Volatile : when power turned off, data in the memory will be erased  Storing progam and data  Fast, small, and expensive Secondary Memory (e.g. HDD, CD/DVD, …)  Non volatile  Relatively slow, large, and cheap I/O(Input/Output) Device  Help interaction between computer and human beings.  Keyboard, mouse, monitor, etc

5 Memory and Data Bigger data values are Stored in consecutive memory cells Each memory cell stores 1 byte data

Memory Units 1 bit 1 Byte = 8 bits 1 KB = 2^10 Byte = 1,024 1 MB = 2^20 Byte = 1,048,576 1 GB = 2^30 Byte = 1,073,741,824 1 TB = 2^40 Byte = 1,099,511,627,776

7 Program Execution von Neumann architecture Instruction, data fetch Instruction result CPU Main Memory Program (Instruction + Data) Program PC loading

8 Software system software  Efficient management of computer system and resources  Operating System, compiler, debugger application software  All kinds of software other than system software  Wordprocessor, spreadsheet(excel), graphics SW, artificial intelligence SW, Game SW, Statistics SW, medical SW

9 Software Layers OS System S/W Application S/W Compiler Debugger Utilities Wordprocessor Web Browser Powerpoint Database

10 Data Representation Binary number  Computer uses binary number  1bit can represent 0 or 1  N bit number can represent up to 2 N 1 bit2 bit3 bit4 bit

11 Binary number, decimal number Decimal number  Use  182 = 1 x x x 10 0 = 1 x x x 1 Binary number  Use 0 and 1  = 1 x x x x 2 0 = 1 x x x x 1 = 13 Octal number Hexadecimal number

12 Programming Language Language for programming computer processing  Machine readable language designed to express computations that can be performed by a computer  Specify behavior of machine, express algorithms  Human-Computer Communications Machine language  Binary code store value at address 0001 into accumulator add value at address 0010 into accumulator Assembly Language  Symbolization of machine language binary code LOAD Y ADD Z

13 Programming Language High level language  Easy to use (read and write), human friendly  Programmer does not need to know details of machine control.  More portable (machine independent) X = Y + Z example  FORTRAN, COBOL, BASIC, C, C++, Java

14 High Level Programming Language FORTRAN(FORmula TRANslation)  Created in 1957 by John Backus (IBM)  General purpose PL especially suited For scientific computation COBOL(COmmon Business Oriented Language)  Created in early 1960s  Primarily used for business, finance in companies and govenment BASIC(Beginner's All-purpose Symbolic Instruction Code)  Easy to learn and use for beginners

15 High Level Programming Language C  Made by Dennis Ritchie (AT&T Bell Lab)  made for developing UNIX OS (1970s)  High level language with low level language properties (pointers,…) C++  Made by B. Stroustrup (AT&T Bell Lab)  OOPL(Object Oriented Programming Language) extending C Java  Made by James Gosling (Sun Microsystems, 1990s)  Platform independent OOPL

Software Development Process Requirement analysis Design Implementation Testing Maintenance

17 Programming and Execution Programming Tool  Editor, Compiler, Interpreter, Debugger, and etc  Integrated Development Environment (IDE) Error Program Edit Compile Execution

18 Error compile-time error  Error occurring during compilation  Grammar check  Cannot execute if there is compile error logical error  Grammar is OK but logical error run-time error  Abnormal termination owing to unexpected reasons during program execution  Ex) divided by zero, illegal memory access

19 Debugging debugging  Bug : program error  Debugging : bug correction

20 Compiler / Interpreter Compiler  Convert high level language to low level language (occur at compile-time) Interpreter  Compile and execute the program line by line (occur at run-time) Comparison?

Practice Conversion Binary number -> decimal number (1) 0101 → (2) 1001 → (3) → Decimal number -> binary number (1) 17 → (2) 85 → (3) 120 →