Copyright © 2012 Pearson Education, Inc. Chapter 1 INTRODUCTION TO COMPUTING AND ENGINEERING PROBLEM SOLVING.

Slides:



Advertisements
Similar presentations
Week 3. Assembly Language Programming  Difficult when starting assembly programming  Have to work at low level  Use processor instructions >Requires.
Advertisements

4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 1 Engineering Problem Solving with C++, Etter/Ingber Chapter 1.
Introduction to Computer Programming Nai-Wei Lin Department of Computer Science and Information Engineering National Chung Cheng University.
Topics What are computers? A little bit of history Computer basics Bilgisayar Kullanımı I.
Fundamentals and a Brief History of Computer Systems.
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
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.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
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:
©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.
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.
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.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 0 - Introduction to Computers and Programming.
1 CSC103: Introduction to Computer and Programming Lecture No 2.
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.
Topics Introduction Hardware and Software How Computers Store Data
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
1 Modified from  Modified from 1998 Morgan Kaufmann Publishers Chapter Three: Arithmetic for Computers citation and following credit line is included:
General Computer Science for Engineers CISC 106 Lecture 02 Dr. John Cavazos Computer and Information Sciences 09/03/2010.
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.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Seventh Edition by Tony Gaddis, Judy.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 1 Introduction to Computers and Programming.
Computer Systems Organization CS 1428 Foundations of Computer Science.
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
CPU Internal memory I/O interface circuit System bus
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 1- 1 October 20, October 20, 2015October 20, 2015October 20,
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.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
 Lecture 2 Processor Organization  Control needs to have the  Ability to fetch instructions from memory  Logic and means to control instruction sequencing.
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.
Computer Science I CSCI Summer 2009 David E. Goldschmidt, Ph.D.
CDA 3100 Fall2009. Special Thanks Thanks to Dr. Xiuwen Liu for letting me use his class slides and other materials as a base for this course.
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.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
Copyright © 2014, 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Eighth Edition by Tony Gaddis,
C++ Programming: From Problem Analysis to Program Design, Fifth Edition 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 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.
Engr 198: Programming-Based Design Course Introduction
Chapter 1: An Overview of Computers and Programming Languages
Engineering Problem Solving With C An Object Based Approach
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
Chapter 3 DataStorage Foundations of Computer Science ã Cengage Learning.
Introduction to Computer Programming
Computer Evolution and Performance
CS 330 Programming Languages
Professor: Shereen Khoja
Dr. Clincy Professor of CS
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

Copyright © 2012 Pearson Education, Inc. Chapter 1 INTRODUCTION TO COMPUTING AND ENGINEERING PROBLEM SOLVING

Copyright © 2012 Pearson Education, Inc. Outline Objectives 1.Historical Perspective 2.Recent Engineering Achievements 3.Computing Systems 4.Data Representation and Storage 5.An Engineering Problem-Solving Methodology

Copyright © 2012 Pearson Education, Inc. Objectives Introduce computing and engineering problem solving, including: A brief history Recent engineering achievements A discussion of Numbering Systems A discussion of hardware and software A five-step problem-solving methodology

Historical Perspective Copyright © 2012 Pearson Education, Inc. Charles Babbage, ( , above) designed the Analytical Engine (left) to process decimal numbers. Augusta Ada Byron ( , below) wrote the first computer program.

Charles Babbage, Esq English mathematician. Designed the Analytical Engine in the early 1800s. Published “Of the Analytical Engine” in Copyright © 2012 Pearson Education, Inc.

Analytical Engine Designed to process base ten numbers. Consisted of four parts: –Storage unit –Processing unit –Input device –Output device Copyright © 2012 Pearson Education, Inc.

Analytical Engine 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 Copyright © 2012 Pearson Education, Inc.

Augusta Ada Byron Wrote the English translation of Menabrea’s Sketch of the Analytical Engine. Envisioned the multidisciplinary potential of the Analytical Engine. Wrote detailed instructions for performing numerical computations using the Analytical Engine. Copyright © 2012 Pearson Education, Inc.

Digital Computers 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. Copyright © 2012 Pearson Education, Inc.

Digital Computers 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. Copyright © 2012 Pearson Education, Inc.

ENIAC vs. Intel Pentium 4 Copyright © 2012 Pearson Education, Inc. ENIAC executes hundreds of operations per second (30 tons) Today’s processors execute trillions of operations per second and weigh ounces.

Recent Engineering Achievements Copyright © 2012 Pearson Education, Inc. Image credits: NASA/JPL/Malin Space Science Systems.

Recent Engineering Achievements Extraterrestrial Explorations –First manned lunar landing (July 21, 1969) –Mars Global Surveyor, Mars Reconnaissance Orbiter, and Mars Exploration Rovers Terrestrial Application Satellites Computer Axial Tomography (CAT) Scanners Computer simulations Advanced composite materials. Speech understanding Weather, climate, and global change prediction Copyright © 2012 Pearson Education, Inc.

Recent Engineering Achievements Digital computers facilitate multidisciplinary engineering achievements that: –Improve our lives. – Expanded the possibilities for our future. Changing engineering environment requires engineers with: –Communication skills. –Skills for working in interdisciplinary teams. –An awareness of ethic issues and environmental concerns. –A global perspective. Copyright © 2012 Pearson Education, Inc.

Computing Systems Copyright © 2012 Pearson Education, Inc. The von Neumann Computing Model

Computing Systems A computing system is a complete working system that includes: –Hardware –Software Copyright © 2012 Pearson Education, Inc.

Hardware Hardware refers to the physical parts off the computing system that have mass (i.e. they can actually be touched): –Computer –Display –Mouse –Printer –… Copyright © 2012 Pearson Education, Inc.

Hardware Jon von Neumann computing model –Input device(s) –Output device(s) –Memory Unit –CPU (Central Processing Unit) consisting of: Control Unit ALU (Arithmetic Logic Unit) Copyright © 2012 Pearson Education, Inc.

Software Interface to Computer Hardware Copyright © 2012 Pearson Education, Inc.

Software 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 Copyright © 2012 Pearson Education, Inc.

Building a Program Computers only understand machine language. High-level languages like C++ must be translated to machine language for execution. Copyright © 2012 Pearson Education, Inc.

Key Terms Source Program –printable/Readable Program file Object Program –nonprintable machine readable file Executable Program –nonprintable executable code Copyright © 2012 Pearson Education, Inc.

Errors in Programs Syntax/Parse Errors –Mistakes with the language. –Always reported by the compiler Linking Errors –Missing pieces prevent the final assembly of an executable program. Run-time Errors –Occur when program is executing. –May or may not be reported. Copyright © 2012 Pearson Education, Inc.

Logic Errors Can be difficult to find. Debugging can be time consuming. –Better tools for find bugs It is important to carefully check the output of your programs for errors. –Even programs that appear to work correctly may have bugs! Copyright © 2012 Pearson Education, Inc.

Debugging Process of eliminating logic errors (i.e. bugs) from programs. User-friendly programming environments such as Microsoft Visual C++ integrate the compiler with –text processors and code editors –special tools to help find bugs in programs (debugger) –testing tools –and much more… Copyright © 2012 Pearson Education, Inc.

Data Representation and Storage Copyright © 2012 Pearson Education, Inc.

Data Representation and Storage Digital computers store information as a sequence of bits (binary digits). The value or state of a bit at any given time can be 0 or 1 (off or on). Data is stored as a sequence of bytes. –A byte is a sequence of 8 bits. Copyright © 2012 Pearson Education, Inc.

Memory Diagram Address Space = 8 Word Size = 16 Copyright © 2012 Pearson Education, Inc. AddressSixteen Bit Word

Data Representation Right most bit is referred to as the least significant bit. Left most bit is referred to as the most significant bit. Value stored at address 000 is = But what does it represent? Copyright © 2012 Pearson Education, Inc.

Numbering Systems 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: Copyright © 2012 Pearson Education, Inc = 2* * *10 0

Numbering Systems Base two (binary) number system Two binary digits (0,1) Each digit multiplies a power of two –Example: Copyright © 2012 Pearson Education, Inc = 1* * * * *2 0 = 1*16 + 0*8 + 1*4 + 1*2 + 0*1 = = 22 10

Numbering Systems Base eight number system Eight octal digits (0,1,2,3,4,5,6,7) Each digit multiplies a power of eight –Example: Copyright © 2012 Pearson Education, Inc = 2* * *8 0 = 2*64 + 4*8 + 5*1 = = 165 8

Numbering Systems 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: Copyright © 2012 Pearson Education, Inc. 2FB 16 = 2* F* B*16 0 = 2*256 + F*16 + B*1 = =

Practice with Number Systems = ? = ? = ? 10 3A1B 16 = ? 2 Copyright © 2012 Pearson Education, Inc.

Practice with Number Systems = = = A1B 16 = Copyright © 2012 Pearson Education, Inc.

Data Types 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. Copyright © 2012 Pearson Education, Inc.

Data Types Representation of data affects the efficiency of arithmetic and logic operations. For efficiency, negative integers are often represented in their 2’s complement form. The 2’s complement of an integer is formed by negating all of the bits and adding one. Copyright © 2012 Pearson Education, Inc.

Two’s Complement Form the 2’s complement representation for the value assuming a word size of 8 bits for simplicity = Negate bits: Add 1: ’s complement is Copyright © 2012 Pearson Education, Inc.

Two’s Complement Add to Copyright © 2012 Pearson Education, Inc  = = 0 10

Data Types 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. Copyright © 2012 Pearson Education, Inc.

Practice with Decimals Convert to binary. Copyright © 2012 Pearson Education, Inc.

Practice with Decimals Convert to binary. First convert the integer part: = Then repeatedly multiply the fractional part by 2:.25*2=0.5C0.50*2=1.0C1 Therefore: = Copyright © 2012 Pearson Education, Inc.

Engineering Problem-Solving Methodology Copyright © 2012 Pearson Education, Inc.

Five 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. Copyright © 2012 Pearson Education, Inc.