Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 1 Engineering Problem Solving with C++, Etter/Ingber Chapter 1."— Presentation transcript:

1

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

3 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

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

5 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

6 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

7 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

8 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

9 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

10 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

11 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

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

13 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

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

15 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

16 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

17 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

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

19 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

20 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

21 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

22 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

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

24 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

25 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

26 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

27 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

28 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

29 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

30 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

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

32 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

33 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

34 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

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

36 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

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

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

39 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


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

Similar presentations


Ads by Google