Presentation is loading. Please wait.

Presentation is loading. Please wait.

CHAPTER 1: OVERVIEW OF COMPUTERS AND PROGRAMMING Prepared By: Pn. Nik Maria Nik Mahamood Reference: Hanly, Koffman, C Problem Solving and Program Design.

Similar presentations


Presentation on theme: "CHAPTER 1: OVERVIEW OF COMPUTERS AND PROGRAMMING Prepared By: Pn. Nik Maria Nik Mahamood Reference: Hanly, Koffman, C Problem Solving and Program Design."— Presentation transcript:

1 CHAPTER 1: OVERVIEW OF COMPUTERS AND PROGRAMMING Prepared By: Pn. Nik Maria Nik Mahamood Reference: Hanly, Koffman, C Problem Solving and Program Design in C, Sixth Edition, Pearson International Edition. Refer chapter 1 (Pg. 36 – 61) INSPIRING CREATIVE AND INNOVATIVE MINDS DDC1012: PROGRAMMING

2 OVERVIEW OF COMPUTERS AND PROGRAMMING 1.1 Electronic Computer Then and Now 1.2 Computer Hardware 1.3Computer Software 1.4The Software Development Method 1.5Applying the Software Development Method INSPIRING CREATIVE AND INNOVATIVE MINDS

3 A computer is a machine that can receive, store, transform and output data of all kinds. is an electronic device that can manipulates data. is programmable; that is what the computer does depends on the program the computer is using. INSPIRING CREATIVE AND INNOVATIVE MINDS 1.1 ELECTRONIC COMPUTER THEN AND NOW MORE INFO: A program is a list of instructions that telling a computer what tasks to do and how to perform them

4 INSPIRING CREATIVE AND INNOVATIVE MINDS 1.1 ELECTRONIC COMPUTER THEN AND NOW Figure 1.1 The Intel Pentium 4 Processor chip is an integrated circuit containing the full circuitry of a central processing unit. This processor can execute a simple instruction such as an integer addition in one six- billionth of a second. Source: This figure is taken from Pearson Addison-Wesley, 2007. FOR MORE INFO...

5 INSPIRING CREATIVE AND INNOVATIVE MINDS 1.1 ELECTRONIC COMPUTER THEN AND NOW Figure 1.2 (a)Notebook Computer(ThinkPad®, Courtesy of IBM). (b) Palmtop Computer (Sony Clié PDA ®, Courtesy of Sony). (c) Desktop Computer (IBM NetVista Desktop, Courtesy of IBM). Source: This figure is taken from Pearson Addison- Wesley, 2007. FOR MORE INFO...

6 The computer system consists of two major categories: Hardware – the actual computer equipment. It is designed to be flexible as possible. Software – the programs that enables us to solve problems with a computer by providing it with list of instructions to perform. Computer system has three basic components, which are: hardware, software and people. INSPIRING CREATIVE AND INNOVATIVE MINDS 1.1 ELECTRONIC COMPUTER THEN AND NOW MORE INFO: A program is a list of instructions that telling a computer what tasks to do and how to perform them

7 INSPIRING CREATIVE AND INNOVATIVE MINDS 1.2 COMPUTER HARDWARE MORE INFO: Components of a computer : main memory, secondary storage, Central Processing Unit (CPU), Input devices and Output devices. Figure 1.3 Components of a Computer Source: This figure is taken from Pearson Addison-Wesley, 2007. FOR MORE INFO...

8 Main Memory Is an essential component in any computer. Stores programs, data and result. Most computers have two types of memory: –Random access memory (RAM) –Read only memory (ROM) INSPIRING CREATIVE AND INNOVATIVE MINDS 1.2 COMPUTER HARDWARE

9 RAM –temporarily stores program while they are being executed by the computer –temporarily stores data as numbers, names and pictures while a computer is manipulating them. –is volatile memory; everything in RAM will be lost when the computer is switched off. INSPIRING CREATIVE AND INNOVATIVE MINDS 1.2 COMPUTER HARDWARE MORE INFO: Volatile memory – memory whose content disappear when the computer is off.

10 ROM –offers stores information permanently within the computer. –Computer can retrieve (or read) but cannot store (or write) information in ROM. –is not volatile; the data stored do not disappear when the computer is switched off. –start-up instructions and other critical instructions are burned into ROM chips. INSPIRING CREATIVE AND INNOVATIVE MINDS 1.2 COMPUTER HARDWARE

11 When we refer to main memory, we mean RAM because that is the part of main memory is normally accessible to the programmer. All data stored in memory are represented digitally. INSPIRING CREATIVE AND INNOVATIVE MINDS 1.2 COMPUTER HARDWARE MORE INFO: Digital representation ~ binary numbers made up of digits 0 and 1.

12 Secondary Storage Computer systems provide storage in addition to main memory because of two reasons: –Computer needs storage that is permanent; information can be retained during a power loss or the computer is turned off. –Computer systems typically store more information than will fit in memory. Unit such as disks or tapes that retain data even when the power to the disk drive or tape drive is off. INSPIRING CREATIVE AND INNOVATIVE MINDS 1.2 COMPUTER HARDWARE

13 INSPIRING CREATIVE AND INNOVATIVE MINDS 1.2 COMPUTER HARDWARE Figure 1.3 Figure 1.4 Secondary Storage Media Source: This figure is taken from Pearson Addison-Wesley, 2007 FOR MORE INFO...

14 Central Processing Unit (CPU) Is a brain of a computer. Data processing done by Central Processing Unit (CPU). The CPU is composed of two parts: –Control Unit Coordinates and controls all the other parts of computer system. The control unit even oversees the operations of the input and output devices. INSPIRING CREATIVE AND INNOVATIVE MINDS 1.2 COMPUTER HARDWARE MORE INFO: Microprocessor - an entire CPU on a single chip Register - high speed memory location inside the CPU

15 –Arithmetic Unit Does the actual processing by performing mathematical operations and logic comparisons. Example of mathematical operations : +, -, *, / Example of logic comparisons: >, =, <=, = INSPIRING CREATIVE AND INNOVATIVE MINDS 1.2 COMPUTER HARDWARE

16 Input Devices to enter data into the computer in many ways. The most commonly used input devices are –Keyboards: –Pointing devices such as mouse, trackball, Joysticks, Touch-sensitive screen, pen-based systems. –Scanners such as Magnetic Ink character Recognition (MICR) –Voice Recognition such as Voice User Interface(VUI). INSPIRING CREATIVE AND INNOVATIVE MINDS 1.2 COMPUTER HARDWARE

17 INSPIRING CREATIVE AND INNOVATIVE MINDS 1.2 COMPUTER HARDWARE Figure 1.3 Figure 1.5 Example of keyboard for IBM-Type Computers Source: This figure is taken from Pearson Addison-Wesley, 2007 FOR MORE INFO...

18 Output Devices to display / print information. It can be divided into two categories –Softcopy Is ideal when you are writing a document, playing game, watching video clip or reading the latest news. Is temporary. There nothing solid to hold. Can transfer softcopy to a disk to transport it. –Hardcopy Can be touched and carried Some form of paper. INSPIRING CREATIVE AND INNOVATIVE MINDS 1.2 COMPUTER HARDWARE

19 The most commonly used output devices are –Monitors –Printers –Audio output –Plotters INSPIRING CREATIVE AND INNOVATIVE MINDS 1.2 COMPUTER HARDWARE

20 Computer Networks Computers can communicate with one another via networks. LAN connects computers and other devices; allowing them to share information and resources such as printers, scanners, and secondary storage devices for intercommunication WAN is a network that links many individual computer and local area networks over a large geography area. –The most well know WAN, the internet, connects university, corporate, government and public-access networks. –The most widely used aspect of internet is the www. INSPIRING CREATIVE AND INNOVATIVE MINDS 1.2 COMPUTER HARDWARE MORE INFO: LAN - Local Area Network; WAN - Wide Area Network WWW - World Wide Web

21 INSPIRING CREATIVE AND INNOVATIVE MINDS 1.2 COMPUTER HARDWARE FOR MORE INFO... Figure 1.6 Local Area Network Source: This figure is taken from Pearson Addison-Wesley, 2007

22 INSPIRING CREATIVE AND INNOVATIVE MINDS 1.2 COMPUTER HARDWARE FOR MORE INFO... Figure 1.7 A Wide Area Network with Satellite Relays of Microwave Signals Source: This figure is taken from Pearson Addison-Wesley, 2007

23 Software is a computer programs. – It refers to any program that tells the computer systems what tasks to do and how to perform them. Computer need software to function. Software is composed to two types: –System software –Application Software INSPIRING CREATIVE AND INNOVATIVE MINDS 1.3 COMPUTER SOFTWARE

24 System software –The operating system and utility programs are the two major categories of system software Operating system (OS) –is the most important program that runs on a computer. –Every computer must have an operating system to run other programs. –Example of OS: Windows2000, Window95/98, Mac OS, Unix, DOS, Windows XP, Windows Wista and etc. –Operating systems responsible for directing all computer operations and managing all computer resources. INSPIRING CREATIVE AND INNOVATIVE MINDS 1.3 COMPUTER SOFTWARE

25 – –OS performs basic tasks, such as Booting computer Communicating with the computer user Collecting input from the input devices Conveying program output to the output devices Accessing data from secondary storage Writing data to secondary storage. INSPIRING CREATIVE AND INNOVATIVE MINDS 1.3 COMPUTER SOFTWARE

26 Utility programs –helps manage, maintain and control computer resources –Some examples of utility programs include: Virus scanning software Backup software Scandisk Disk defragmenter INSPIRING CREATIVE AND INNOVATIVE MINDS 1.3 COMPUTER SOFTWARE

27 Application software Application programs are develop to assist a computer users in accomplishing specific tasks. Some application programs are special-purpose programs, which perform a specific task for a single profession. –For examples safety managers use a program that prints records of occupation-related injuries and illness in a format required by federal regulatory bureau. Other application programs are general-purpose programs. INSPIRING CREATIVE AND INNOVATIVE MINDS 1.3 COMPUTER SOFTWARE

28 Commonly used general-purpose programs include the following –Word processing –Desktop processing –Electronic spreadsheet –Database –Presentation –Graphic software –Telecommunications software INSPIRING CREATIVE AND INNOVATIVE MINDS 1.3 COMPUTER SOFTWARE

29 Computer Languages Consists of two types: –Low level language to program a computer system for targeting the maximum effective from the use of a specific machine. Examples machine language, assembly language Advantage – the implementation is more faster; can be extremely efficient, making optimum use of both computer memory and processing time Disadvantages – difficult to use, machine dependent, need to know the architecture of machine INSPIRING CREATIVE AND INNOVATIVE MINDS 1.3 COMPUTER SOFTWARE

30 –High level language to program applications for scientist, data processing, words processing etc. Examples: C, C++, Java, Fortran, Cobol etc Thus before a high-level language program can be executed, it must first be translated into the target computer’s machine language. The program that does this translation is called compiler. Advantage: faster development of large programs, machine independent, easy to understand – uses simple English words, no need to know machine architecture. Disadvantage: the implementation is slower. INSPIRING CREATIVE AND INNOVATIVE MINDS 1.3 COMPUTER SOFTWARE

31 INSPIRING CREATIVE AND INNOVATIVE MINDS 1.3 COMPUTER SOFTWARE FOR MORE INFO...

32 INSPIRING CREATIVE AND INNOVATIVE MINDS 1.3 COMPUTER SOFTWARE FOR MORE INFO... Figure 1.8 Entering, Translating, and Running a High-Level Language Program Source: This figure is taken from Pearson Addison-Wesley, 2007

33 INSPIRING CREATIVE AND INNOVATIVE MINDS 1.3 COMPUTER SOFTWARE FOR MORE INFO... Figure 1.9 Flow of Information During Program Execution Source: This figure is taken from Pearson Addison-Wesley, 2007

34 Programmers use the software development method for creating software or system computer Software development method -Step 1: Specify the problem requirements. -Step 2: Analyze the problem -Step 3: Design the algorithm to solve the problem -Step 4: Implement the algorithm -Step 5: Test and verify the completed program -Step 6: Maintain and update the program INSPIRING CREATIVE AND INNOVATIVE MINDS 1.4 THE SOFTWARE DEVELOPMENT METHOD

35 Specify the problem requirements Forces you to state the problem clearly and un-ambiguously and to gain a clear understanding of what is required for its solution. Analyze the problem Involves identifying the problems including input, output, constraints and formula INSPIRING CREATIVE AND INNOVATIVE MINDS 1.4 THE SOFTWARE DEVELOPMENT METHOD

36 Design the algorithm Requires you to develop a list of steps called an algorithm to solve the problem and then verify that the algorithm solves the problem as intended. Implementation the algorithm Involves writing it as a program. You must convert each algorithm step into one or more statements in a programming languages. INSPIRING CREATIVE AND INNOVATIVE MINDS 1.4 THE SOFTWARE DEVELOPMENT METHOD

37 Testing and Verifying the programs Requires testing the completed program to verify that it works as desired. Do not rely on just one test case. Run a program several times using different sets of data. Maintenance and updating the program Involves modifying a program to remove previously undetected errors and to keep it up-to-date as government regulations or company policies change. INSPIRING CREATIVE AND INNOVATIVE MINDS 1.4 THE SOFTWARE DEVELOPMENT METHOD

38 Use the first three steps of the software development method to solve problem in case study given Case Study: Converting Miles to Kilometers “Your summer surveying job requires you to study some maps that give distances kilometers and some that use miles. You and your co-workers prefer to deal in metric measurements. “ INSPIRING CREATIVE AND INNOVATIVE MINDS 1.5 APPLYING THE SOFWARE DEVELOPMENT METHOD

39 ANALYSIS Determine what you are asked to do Identify data requirements for –Input Miles /* get distance in miles */ –Output Kms /* display distance in kilometers –Relevant formula 1 Mile = 1.609 Kilometers INSPIRING CREATIVE AND INNOVATIVE MINDS 1.5 APPLYING THE SOFWARE DEVELOPMENT METHOD

40 DESIGN Formulate the algorithm to solve the problem Algorithm 1. Get Miles 2. Kms = Miles* 1.609 3. Display Kms INSPIRING CREATIVE AND INNOVATIVE MINDS 1.5 APPLYING THE SOFWARE DEVELOPMENT METHOD

41 INSPIRING CREATIVE AND INNOVATIVE MINDS 1.5 APPLYING THE SOFWARE DEVELOPMENT METHOD IMPLEMENTATION

42 Why university curricula for engineers and scientist include in solving problems using a general-purpose programming language such as C? –Discuss !! INSPIRING CREATIVE AND INNOVATIVE MINDS DISCUSSION

43 Most of the computer-oriented work of engineers and scientist uses existing application programs. Engineers and scientist will benefit greatly if they are able to write their own program. Engineers and scientist who have designed, implemented and tested software personally are simply better equipped to evaluate software created by others. INSPIRING CREATIVE AND INNOVATIVE MINDS DISCUSSION


Download ppt "CHAPTER 1: OVERVIEW OF COMPUTERS AND PROGRAMMING Prepared By: Pn. Nik Maria Nik Mahamood Reference: Hanly, Koffman, C Problem Solving and Program Design."

Similar presentations


Ads by Google