Problem Solving and Program Design in C Chap. 1 Overview of Computers and Programming Chow-Sing Lin.

Slides:



Advertisements
Similar presentations
Computer Science Department Introduction To Computers and Programming Knowledge: Understand the concepts of computer, hardware, software and programming.
Advertisements

ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
Topics What are computers? A little bit of history Computer basics Bilgisayar Kullanımı I.
© 2012Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Chapter 1: Overview of Computers and Programming Problem Solving & Program.
Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
© 2010 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Chapter 1: Overview of Computers and Programming Problem Solving &
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
Introduction Extended and Concise Prelude to Programming Concepts and Design Copyright © 2003 Scott/Jones, Inc.. All rights reserved. 1 Introduction.
CS 201 Overview of Computers & Programming Debzani Deb.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter 1: An Overview of Computers and Programming Languages
1 8/28/06CS150 Introduction to Computer Science 1 Professor: Chadd Williams
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
Topic 1: Introduction to Computers and Programming
1 The development of modern computer systems Early electronic computers Mainframes Time sharing Microcomputers Networked computing.
CIS 260 Computer Programming I in C Prof. Timothy Arndt.
Chapter 1 Overview of Computers and Programming. 1-1 Outline 1.1 ELECTRONIC COMPUTERS THEN AND NOW 1.2 COMPUTERS HARDWARE 1.3 COMPUTERS SOFTWARE 1.4 THE.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
CS 161 INTRO TO PROGRAMMING I Dr. Blaise W. Liffick Fall
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers, Problem Solving, and Programming Problem.
Chapter Introduction to Computers and Programming 1.
Chapter 1 An Overview of Computers and Programming Languages.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
CS 1410 Intro to Computer Tecnology Computers and History1.
CISC105 General Computer Science Class 1 – 6/5/2006.
Chapter 1 Overview of Computers and Programming J. H. Wang ( 王正豪 ), Ph. D. Assistant Professor Dept. Computer Science and Information Engineering National.
Computer Parts. Two Basic Parts Hardware & Software.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
1 8/29/05CS150 Introduction to Computer Science 1 Professor: Shereen Khoja
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.
Lesson 3 — How a Computer Processes Data Unit 1 — Computer Basics.
Computer Architecture
Computer Basic Vocabulary
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Development of Computers. Hardware 1. Original concept: Charles Babbage 1840’s 2. 4 basic components of a computer system: input store mill output (Now:
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
Chapter 1 : Overview of Computer and Programming By Suraya Alias
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Chapter 1 Introduction. Components of a Computer CPU (central processing unit) Executing instructions –Carrying out arithmetic and logical operations.
 A computer is an electronic device that receives data (input), processes data, stores data, and produces a result (output).  It performs only three.
Chapter 1 An Overview of Computers and Programming Languages.
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages.
CHAPTER 1 OVERVIEW OF COMPUTER AND PROGRAMMING 1.1 Electronic Computer Then and Now 1.2 Computer Hardware 1.3 Computer Software 1.4 The Software Development.
DIGITAL TECHNOLOGY. 20 Questions  Pair off with another student within your table.  Both of you are to think of your favorite in a specific category.
Chapter 1: Introduction to Computers, Problem Solving, and Programming
CHAPTER 1: OVERVIEW OF COMPUTERS AND PROGRAMMING
Java Programming: From the Ground Up
Chapter 1: An Overview of Computers and Programming Languages
The abacus has roots dating back over 5,000 years
Chapter 1: An Overview of Computers and Programming Languages
Overview of Computers and Programming Chapter 1
Chapter 1: Introduction to Computers and Programming
Introduction to Programming
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
About the Presentations
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
People use computers at…
UNIV 103 CS Majors Seminar Dr. Blaise W. Liffick Fall 2017.
Chapter 1: Introduction to Computers and Programming
Machine Architecture and Number Systems
National Diploma in Computer Studies
Machine Architecture and Number Systems
Professor: Shereen Khoja
ICS103 Programming in C 1: Overview of Computers And Programming
Presentation transcript:

Problem Solving and Program Design in C Chap. 1 Overview of Computers and Programming Chow-Sing Lin

Computers Computer Technology is everywhere!! – Virtually every aspect of your life depends on computers. The computer program’s role in this technology is essential – Without a list of instructions to follow, the computer is virtually useless. One of the most versatile programming languages available today  the C language Dr. Chow-Sing LinProgram Design I - CH12

Electronic Computers Then and Now The First Computer built in 1930s by Dr. John Atanasoff and Dr. Clifford Berry at Iowa State University. (ABC) – Atanasoff-Berry-Computer (ABC) – Used in nuclear physics with mathematical computations Dr. Chow-Sing LinProgram Design I - CH13

ABC Dr. Chow-Sing LinProgram Design I - CH14

ENIAC The first large-scale, general-purpose electronic digital computer – ENIAC – Electronic Numerical Integrator and Computer – Built in 1946 at the Univ. of Pennsylvania with funding from the U.S. army. – Used to compute ballistics tables, predict the weather, make atomic energy calculations – Weight :30 tons; Space: 30 x 50 ft 2 Used vacuum tubes as their basic electronic component. Dr. Chow-Sing LinProgram Design I - CH15

ENIAC Dr. Chow-Sing LinProgram Design I - CH16

Electronic Technology advance Technological advances in the design and manufacture of electronic components led to new generations of computers – Smaller, faster, and less expensive Nowadays, the entire circuitry of a computer processor can be packaged in a single electronic component, microprocessor chip Dr. Chow-Sing LinProgram Design I - CH17

Dr. Chow-Sing LinProgram Design I - CH18 Figure 1.1 The Intel Atom processor chip contains the full circuitry of a central processing unit in an integrated circuit whose small size and low power requirements make it suitable for use in mobile internet devices. (Intel Corporation Pressroom Photo Archives)

Computer Category Modern computers are categorized according to their size and performance – Personal computers Used by a single person at a time – Mainframes Large real-time transaction processing systems – Supercomputers The largest capacity and fastest mainframes Intensive computation applications Dr. Chow-Sing LinProgram Design I - CH19

Dr. Chow-Sing LinProgram Design I - CH Figure 1.2 (a) Notebook Computer (HP Pavilion dv5©, Courtesy of Hewlett-Packard). (b) Palmtop Computer (iPhone 3G©, Courtesy of Apple, Inc.) (c) Desktop Computer (iMac©, Courtesy of Apple, Inc.)

Elements of Computer System Hardware – Perform the necessary computations Central processing unit, monitor, keyboard, mouse, printer, speakers Processing data represented only by 0 and 1 (binary numbers) Software – Programs to solve problems with a computer by providing it with lists of instructions to perform Dr. Chow-Sing LinProgram Design I - CH111

Computer Hardware Main Memory Secondary Memory – Hard disks, floppy disk, DVDs, …. Central Processing Unit Input Devices – Keyboards, mouses, touch pads, …. Output Devices – Monitors, printers, and speakers Dr. Chow-Sing LinProgram Design I - CH112

Component of a Computer Dr. Chow-Sing LinProgram Design I - CH113

Memory Imagine the memory of a computer as an ordered sequence of storage locations  memory cells To store and access information, the computer use an unique address to identify the individual cell. Data and programs are stored in the memory cells – Stored program concept: a program’s instruction must be stored in main memory before they can be executed. Dr. Chow-Sing LinProgram Design I - CH114

Memory Layout Dr. Chow-Sing LinProgram Design I - CH115 Figure Memory Cells in Main Memory

Byte and Bit 0 and 1  one bit 8 bits  1 byte  one character Dr. Chow-Sing LinProgram Design I - CH116

Main Memory RAM(random access memory) – Temporary storage of programs and data – Volatile memory Everything in RAM will be lost when the computer is switched off ROM(read-only memory) – Store read-only information permanently within the computer – Not volatile – Store start-up instructions and other critical instructions Dr. Chow-Sing LinProgram Design I - CH117

Secondary Memory Computer systems provide storage in addition to main memory for two reasons: 1.Computers need storage permanent or semi- permanent so that information can retained during a power loss or when the computer is turn off. 2.Systems typically store more information than will fit in memory. Hard disk, DVD, magnetic tape, ….. Dr. Chow-Sing LinProgram Design I - CH118

Central Processing Unit Play two roles – Coordinating all computer operations – Performing arithmetic and logical operations on data To Process a program stored in main memory, – the CPU retrieves (fetch) each instruction in sequence, interprets the instruction, and then retrieves any data needed to carry out that instruction. – Execute, and store the result back to memory Dr. Chow-Sing LinProgram Design I - CH119

Computer Network Link computers together to communicate with one another Dr. Chow-Sing LinProgram Design I - CH120 LAN, Local Area NetworkWAN, Wide Area Network

Operating System A middleware (program) between computer hardware and users – Loading the operating system into memory is called booting the computer Operating System is responsible for – Communicate with the computer users – Managing allocation of memory, processor time, and other resources for tasks – Collecting input from other input devices (mouse..) – Conveying program out to other output devices (screen..) – Access/writing data from/to secondary storage Dr. Chow-Sing LinProgram Design I - CH121

Application Software Application software is running on top of the operating system – Microsoft office – Google Chrome – Photoshop – ….. Dr. Chow-Sing LinProgram Design I - CH122

Computer Languages Machine language – Binary code , , …. – hardly readable by human – CPU dependent Assembly language – More readable, but still hard to learn CLA, ADD A, STA A, …. – One assembly instruction corresponding to one machine language Dr. Chow-Sing LinProgram Design I - CH123

Table 1.3 A machine language program fragment and its assembly language equivalent Memory AddressesMachine Language Instructions Assembly Language Instructions CLA ADD A ADD B STA A HLT ?A ? ?B ? Dr. Chow-Sing LinProgram Design I - CH124

Computer language (cont’) Write code, run any platform  CPU- independent  high-level language High-level language – Combine algebraic expressions and symbols taken from English Table 1.3 can be replaced by a single high-level language a = a + b ; C, C++, Java, php, C#, Python, …… Dr. Chow-Sing LinProgram Design I - CH125

Computer language(cont’) High-level language must be translated into the target computer machine language Source file  object file  executable file  RUN Dr. Chow-Sing LinProgram Design I - CH126

Dr. Chow-Sing LinProgram Design I - CH127 Figure 1.12 Entering, Translating, and Running a High-Level Language Program

Figure 1.13 Flow of Information During Program Execution Dr. Chow-Sing LinProgram Design I - CH128

The Software Development Method 1.Specify the problem requirement – State the problem clearly and unambiguously and to gain a clear understanding of what is required for its solution. 2.Analyze the problem – Identify the problem Input Output Additional requirement and constraints on the solution Dr. Chow-Sing LinProgram Design I - CH129

The Software Development Method (cont’) 3.Design the algorithm to solve the problem – Develop a list of steps called an algorithm to solve the problem and to then verify that the algorithm solves the problem as intended. – Writing the algorithm is often the most difficult part of the problem-solving process. – List the major steps, and then refine. – Desk check!! 4.Implement the algorithm – Converting each algorithm step into one or more statements in a programming language, such as C. Dr. Chow-Sing LinProgram Design I - CH130

The Software Development Method (cont’) 5.Test and verify the completed program – Testing the completed program to verify that it works as desired. – Run the program several times using different sets of data to ensure its correctness in every aspects. 6.Maintain and update the program – Modifying a program to remove previously undetected errors – keep it up-to-date as government regulations or company policies change. Dr. Chow-Sing LinProgram Design I - CH131

Failure is part of the process !! Debugging !! Dr. Chow-Sing LinProgram Design I - CH132

Dr. Chow-Sing LinProgram Design I - CH133 Figure 1.14 Miles-to-Kilometers Conversion Program

Be sure to read the Chapter Review at the end of each chapter and understand the listed topics ! Do as many implementation exercises as possible ! Dr. Chow-Sing LinProgram Design I - CH134