1 / 38

Engineering Problem Solving with C++, Etter/Ingber

Engineering Problem Solving with C++, Etter/Ingber. Chapter 1. Introduction to Computing and Engineering Problem Solving. Historical Perspective Recent Engineering Achievements Computing Systems Data Representation and Storage An Engineering Problem Solving Methodology. Charles Babbage

olga-sawyer
Download Presentation

Engineering Problem Solving with C++, Etter/Ingber

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

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

  3. Charles Babbage Analytical Engine Augusta Ada Byron Digital Computers Historical Perspective Engineering Problem Solving with C++ second edition, J. ingber

  4. Charles Babbage, Esq. 1792-1871 • English mathematician. • Designed the Analytical Engine in the early 1800s. • Published “Of the Analytical Engine” in 1864. Engineering Problem Solving with C++ second edition, J. ingber

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

  6. 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 Engineering Problem Solving with C++ second edition, J. ingber

  7. Augusta Ada Byron, 1815-1852 • 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. Engineering Problem Solving with C++ second edition, J. ingber

  8. 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. Engineering Problem Solving with C++ second edition, J. ingber

  9. 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. Engineering Problem Solving with C++ second edition, J. ingber

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

  11. Recent Engineering Achievements Engineering Problem Solving with C++ second edition, J. ingber

  12. 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. Engineering Problem Solving with C++ second edition, J. ingber

  13. Computer Hardware Computer Software Computing Systems Engineering Problem Solving with C++ second edition, J. ingber

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

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

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

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

  18. 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 Engineering Problem Solving with C++ second edition, J. ingber

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

  20. Executing a C++ Engineering Problem Solving with C++ second edition, J. ingber

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

  22. Number Systems Data Types and Storage Data representation and storage Engineering Problem Solving with C++ second edition, J. ingber

  23. 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. Engineering Problem Solving with C++ second edition, J. ingber

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

  25. Data Representation and Storage • 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 00001010110111012 = 278110 But what does it represent? Engineering Problem Solving with C++ second edition, J. ingber

  26. Number 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: 24510 = 2*102 + 4*101 + 5*100 Engineering Problem Solving with C++ second edition, J. ingber

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

  28. Number Systems • Base eight number system • Eight octal digits (0,1,2,3,4,5,6,7) • Each digit multiplies a power of eight • Example: 2458 = 2*82 + 4*81 + 5*80 = 2*64 + 4*8 + 5*1 = 128 + 32 + 5 = 1658 Engineering Problem Solving with C++ second edition, J. ingber

  29. Number 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: 2FB16 = 2*162 + F*161 + B*160 = 2*256 + F*16 + B*1 = 512 + 240 + 11 = 76310 Engineering Problem Solving with C++ second edition, J. ingber

  30. Number Systems: Practice! • 1002 = ?8 • 37168 = ?2 • 1101001112 = ?10 • 3A1B16 = ?2 Engineering Problem Solving with C++ second edition, J. ingber

  31. 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. Engineering Problem Solving with C++ second edition, J. ingber

  32. 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. Engineering Problem Solving with C++ second edition, J. ingber

  33. Example: 2’s Complement • Form the 2’s complement representation for the value -12710 assuming a word size of 8 for simplicity. 12710 = 011111112 Negate bits: 10000000 Add 1: 10000001 • 2’s complement is 10000001 Engineering Problem Solving with C++ second edition, J. ingber

  34. Example: 2’s Complement • Add 127 to -127 01111111 + 10000001 = _______ 00000000 Engineering Problem Solving with C++ second edition, J. ingber

  35. 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. Engineering Problem Solving with C++ second edition, J. ingber

  36. Practice! Floating Point Data • Convert 12.2510 to binary. Engineering Problem Solving with C++ second edition, J. ingber

  37. An engineering problem-solving methodology Engineering Problem Solving with C++ second edition, J. ingber

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

More Related