4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 1 Engineering Problem Solving with C++, Etter/Ingber Chapter 1.

Slides:



Advertisements
Similar presentations
Etter/Ingber Engineering Problem Solving with C Fundamental Concepts Chapter 1 Engineering Problem Solving.
Advertisements

Week 3. Assembly Language Programming  Difficult when starting assembly programming  Have to work at low level  Use processor instructions >Requires.
Introduction to Computer Programming Nai-Wei Lin Department of Computer Science and Information Engineering National Chung Cheng University.
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.
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
Chapter 01 Introduction Chapter 0 Introduction. Chapter 02 History of Computing - Early Computers Abacus (ancient orient, still in use) Slide rule (17C,
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Introduction Extended and Concise Prelude to Programming Concepts and Design Copyright © 2003 Scott/Jones, Inc.. All rights reserved. 1 Introduction.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Computing Components 01/26/11. Announcements & Reminders Programs 1 due Friday, 9/2/11 What is my late policy? Proxy Codes for Labs  You should be able.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
Introduction to Microprocessors Number Systems and Conversions No /6/00 Chapter 1: Introduction to 68HC11 The 68HC11 Microcontroller.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
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
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 0 Introduction to Computers and Programming.
Introduction to Computers and Programming. Some definitions Algorithm: Algorithm: A procedure for solving a problem A procedure for solving a problem.
Chapter 1: Introduction To Computer | SCP1103 Programming Technique C | Jumail, FSKSM, UTM, 2005 | Last Updated: July 2005 Slide 1 Introduction To Computers.
CS 161 INTRO TO PROGRAMMING I Dr. Blaise W. Liffick Fall
Introduction to Programming Dr Masitah Ghazali Programming Techniques I SCJ1013.
About the Presentations The presentations cover the objectives found in the opening of each chapter All chapter objectives are listed in the beginning.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 0 - Introduction to Computers and Programming.
Chapter 1 An Overview of Computers and Programming Languages.
Chapter 1 Engineering Problem Solving 1. Hardware and Software 2 A computer is a machine designed to perform operations specified with a set of instructions.
CS 1 •This is Computer Science 1. •Who is Professor Adams?
Copyright © 2012 Pearson Education, Inc. Chapter 1 INTRODUCTION TO COMPUTING AND ENGINEERING PROBLEM SOLVING.
CSU0014 Assembly Languages Homepage: Textbook: Kip R. Irvine, Assembly Language for Intel-Based Computers,
Summer 2014 Chapter 1: Basic Concepts. Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Chapter Overview Welcome to Assembly Language.
Assembly Language for x86 Processors 7th Edition
CS 1410 Intro to Computer Tecnology Computers and History1.
An Introduction to Computers August 12, 2008 Mrs. C. Furman.
Chapter I: Introduction to Computer Science. Computer: is a machine that accepts input data, processes the data and creates output data. This is a specific-purpose.
Computer Systems Organization CS 1428 Foundations of Computer Science.
CPS120: Introduction to Computer Science Introduction to Computers.
CMSC104 Lecture 2 Remember to report to the lab on Wednesday.
1 8/29/05CS150 Introduction to Computer Science 1 Professor: Shereen Khoja
CPU Internal memory I/O interface circuit System bus
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.
Chapter 19 Number Systems. Irvine, Kip R. Assembly Language for Intel-Based Computers, Translating Languages English: Display the sum of A times.
Beginning Snapshots Chapter 0. C++ An Introduction to Computing, 3rd ed. 2 Objectives Give an overview of computer science Show its breadth Provide context.
Chapter 1 09/04/13. Change Your Password  The command is: passwd In the lab first do : ssh -Y onyx  You will have to see me to change it, if you forget.
ECEN209-Computer Architecture (chapter 1 in reference)
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 1 An Overview of Computers and Programming Languages.
©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Introduction to Computers and Computing.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
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.
Chapter I: Introduction to Computer Science. Computer: is a machine that accepts input data, processes the data and creates output data. This is a specific-purpose.
CSCI 161: Introduction to Programming
Chapter 1: An Overview of Computers and Programming Languages
Engineering Problem Solving With C An Object Based Approach
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
About the Presentations
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
Introduction to Computer Programming
Chapter 1: Preliminaries
Computer Evolution and Performance
CS 330 Programming Languages
Chapter 0 Introduction Introduction Chapter 0.
Dr. Clincy Professor of CS
Presentation transcript:

4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 1 Engineering Problem Solving with C++, Etter/Ingber Chapter 1

Introduction to Computing and Engineering Problem Solving 4 Historical Perspective 4 Recent Engineering Achievements 4 Computing Systems 4 Data Representation and Storage 4 An Engineering Problem Solving Methodology 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 2

HISTORICAL PERSPECTIVE Charles Babbage Analytical Engine Augusta Ada Byron Digital Computers 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 3

Charles Babbage, Esq English mathematician. 4 Designed the Analytical Engine in the early 1800s. 4 Published “Of the Analytical Engine” in /23/2015Engineering Problem Solving with C++ second edition, J. ingber 4

Analytical Engine 4 Designed to process base ten numbers. 4 Consisted of four parts: –Storage unit –Processing unit –Input device –Output device 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 5

Analytical Engine 4 Luigi F. Menabrea, French engineer and mathematician, described Babbage’s vision of a machine capable of solving any problem using: –Inputs –Outputs –Programs written on punch cards 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 6

Augusta Ada Byron, Wrote the English translation of Menabrea’s Sketch of the Analytical Engine. 4 Envisioned the multidisciplinary potential of the Analytical Engine. 4 Wrote detailed instructions for performing numerical computations using the Analytical Engine. 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 7

Digital Computers 4 ABC (Atanasoff Berry Computer) Developed at Iowa State University between 1939 and 1942 by John Atanasoff and Clifford Berry. Weighed 700 pounds. Executed one instruction every 15 seconds. 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 8

Digital Computers 4 ENIAC(Electronic Numerical Integrator And Calculator) Developed by research team lead by John Mauchly and J. Presper Eckert during the early 1940s. Weighed 30 tons. Executed hundreds of instructions every second. 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 9

Digital Computers 4 Intel Pentium 4 Processor. Weighs < 16 ounces. Executes trillions of instructions per second. 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 10

RECENT ENGINEERING ACHIEVEMENTS 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 11

Recent Engineering Achievements 4 Digital computers facilitate multidisciplinary engineering achievements that: –Improve our lives – Expanded the possibilities for our future. 4 Changing engineering environment requires engineers with: –Communication skills –Skills for working in interdisciplinary teams –An awareness of ethic issues and environmental concerns. 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 12

COMPUTING SYSTEMS Computer Hardware Computer Software 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 13

Computing Systems 4 A computing system is a complete working system that includes: –Hardware –Software 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 14

Hardware 4 Hardware refers to the physical parts off the computing system that have mass (ie they can actually be touched): –Computer –Display –Mouse –Printer –…–… 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 15

Computer Hardware 4 Jon von Neumann computing model –Input device –Output device –Memory Unit –CPU(Central Processing Unit) consisting of: Control Unit ALU(Arithmetic Logic Unit) 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 16

Von Neumann computing model 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 17

Software 4 Computer software refers to programs that reside and execute electronically on the hardware. –Compilers –Translate source code –Operating systems –Provide the HCI (Human Computer Interface) –Application programs –Provide problem solutions 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 18

Hierarchy of Computer Languages 4 Natural Language Processing 4 Cobol 4 Pascal 4 Java 4 C++ 4 Assembler 4 Machine Language 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 19

Executing a C++ C++ source program Compiler Object Program Linker/Loader Executable Program OS-Execute Output 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 20

4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 21 Key Terms 4 Source Program –printable/Readable Program file 4 Object Program –nonprintable machine readable file 4 Executable Program –nonprintable executable code 4 Syntax errors –reported by the compiler 4 Linker errors –reported by the linker 4 Execution/Run-time errors –reported by the operating system 4 Logic errors –not reported

DATA REPRESENTATION AND STORAGE Number Systems Data Types and Storage 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 22

Data Representation and Storage 4 Digital computers store information as a sequence of bits (binary digits). 4 The value or state of a bit at any given time can be 0 or 1 (off or on). 4 Data is stored as a sequence of bytes. –A byte is a sequence of 8 bits. 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 23

Data Representation and Storage: Memory Diagram AddressSixteen Bit Word /23/2015Engineering Problem Solving with C++ second edition, J. ingber 24 Address Space = 8 Word Size = 16

Data Representation and Storage 4 Right most bit is referred to as the least significant bit. 4 Left most bit is referred to as the most significant bit. 4 Value stored at address 000 is = But what does it represent? 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 25

Number Systems 4 Base ten number system Ten decimal digits (0,1,2,3,4,5,6,7,8,9) Each digit multiplies a power of ten –Example: = 2* * *10 0 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 26

Number Systems 4 Base two (binary) number system Two binary digits (0,1) Each digit multiplies a power of two –Example: = 1* * * * *2 0 = 1*16 + 0*8 + 1*4 + 1*2 + 0*1 = = /23/2015Engineering Problem Solving with C++ second edition, J. ingber 27

Number Systems 4 Base eight number system Eight octal digits (0,1,2,3,4,5,6,7) Each digit multiplies a power of eight –Example: = 2* * *8 0 = 2*64 + 4*8 + 5*1 = = /23/2015Engineering Problem Solving with C++ second edition, J. ingber 28

Number Systems 4 Base sixteen number system Sixteen hex digits (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F) Each digit multiplies a power of sixteen –Example: 2FB 16 = 2* F* B*16 0 = 2*256 + F*16 + B*1 = = /23/2015Engineering Problem Solving with C++ second edition, J. ingber 29

Number Systems: Practice! = ? = ? = ? A1B 16 = ? 2 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 30

Data Types 4 Integer Data Type: –Often represented in 4 bytes (System Dependent) –Left most bit is reserved for the sign of the number –Remaining 31 bits represent the magnitude of the number. 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 31

Data Types 4 Representation of data affects the efficiency of arithmetic and logic operations. 4 For efficiency, negative integers are often represented in their 2’s complement form. 4 The 2’s complement of an integer is formed by negating all of the bits and adding one. 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 32

Example: 2’s Complement 4 Form the 2’s complement representation for the value assuming a word size of 8 for simplicity = Negate bits: Add 1: ’s complement is /23/2015Engineering Problem Solving with C++ second edition, J. ingber 33

Example: 2’s Complement 4 Add 127 to = _______ /23/2015Engineering Problem Solving with C++ second edition, J. ingber 34

Data Types 4 Floating Point Data –Floating point types represent real numbers, such as 1.25, that include a decimal point. –Digits to the right of the decimal point form the fractional part of the number. –Digits to the left of the decimal point form the integral part of the number. 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 35

Practice! Floating Point Data  Convert to binary. 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 36

AN ENGINEERING PROBLEM- SOLVING METHODOLOGY 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 37

5 Step Problem Solving Methodology 1. State the problem clearly. 2. Describe the input and output. 3. Work a hand example. 4. Develop a solution. 5. Test your solution. 4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 38