of 8
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
  Lecture-1 Overview and Problem Solving with C Unit-1 1 This Lecture covers    Computing Systems    Hardware and Software    An Engineering Problem-Solving Methodology    Introduction to C    Computing Systems: A computer is a programmable machine. It allows the user to store all sorts of information and then „process‟ that information, or d ata, or carry out actions with the information, such as calculating numbers or organizing words. Computer Hardware:  Computer hardware is the physical parts or components of a computer, such as the monitor, keyboard, computer data storage, graphic card, sound card and motherboard. Internal organization of a computer: CPU  - central processing unit: Where decisions are made, computations are performed, and input/output requests are delegated Memory:  Stores information being processed by the CPU Input devices:  Allows people to supply information to computers Output devices:  Allows people to receive information from computers Computer Software: Computer software, or simply software, is a part of a computer system that consists of data or computer instructions, in contrast to the physical hardware from which the system is built. In computer science and software engineering, computer software is all information processed by computer systems, programs and data.  Lecture-1 Overview and Problem Solving with C Unit-1 2 Operating Systems:  An operating system (OS) is system software that manages computer hardware and software resources and provides common services for computer programs. All computer programs, excluding firmware, require an operating system to function. System Software:  System software is a type of computer program that is designed to run a computer's hardware and application programs. If we think of the computer system as a layered model, the system software is the interface between the hardware and user applications. ... The OS manages all the other programs in a computer. Application Software:  Application software can be divided into two general classes: systems software and applications software. Applications software (also called end-user programs) include such things as database programs, word processors, Web browsers and spreadsheets. “What are the different types of languages?”      Machine level language:  Machine level language is nothing but a set of instructions given to the computer in the form of binary values (0‟s and 1‟s).   Example:  To perform sum of two numbers, the machine instruction may be 11001111. It is difficult to understand by the user. But it is easy for computers to understand machine language. To overcome this difficulty of machine language, assembly language is introduced.    Assembly level language:  Assembly level language is nothing but a set of instructions given to the computer in the form of symbolic (mnemonics) names. Example:  ADD R1, R2 // Adds the value of R1 and R2 SUB R1, R2 // Subtracts the value of R1 and R2 MUL R1, R2 // Multiplies the value of R1 and R2 DIV R1, R2 // Divides the value of R1 and R2 Here the ADD instruction tells that the values of R1 and R2 are to be added. Like that the other operations can be performed. We can write the program using symbolic names as ADD, SUB, MUL and DIV. hence, it is called symbolic language; these symbolic names are called mnemonics. Instead of using 0‟s and 1‟s to represent an instructio n, we can use symbolic names in assembly language; it is easy to remember the symbols than machine language. But computer cannot understand assembly language except machine language. So  Lecture-1 Overview and Problem Solving with C Unit-1 3 we need translator to convert from assembly level language to machine level language is called assembler.    High level language:  A high level language is written using symbols and words like English language. HLL enables the programmer to write machine independent code. The programs written in HLL‟s are portable and it is easy to read and understand by the user. Example:  void main( ) { int a=5, b=10, sum=0; // Initializing values of a=5 and b=10 sum=a+b; // Adding value of a and b and store in sum  printf(“Sum of two number=%d”, sum); // Display the value of sum  } We can easily read and understand this program since all the instructions are similar to English like language. But computer understand only machine instructions, so we need translator to convert high level language to machine level language called compiler.    Executing a C program:  The various steps involved in creating and running in a program are: Step 1:  Writing and editing programs: The software that we use to type a program is called editor. Using vi editor we can type the program, change the program and store the program. Save the program by giving the name of the file as filemane.c. Now the program is saved in the hard disk. This file which is input to the compiler is called “source file”.   Step 2:  Compiling a C program: After finish typing the program, we have to compile it by command cc filename.c, it generates the object file which is a executable file a.out. Compiler:  a program that converts instructions into a machine-code or lower-level form so that they can be read and executed by a computer. Bugs : A software bug is an error, flaw, failure or fault in a computer program or system that causes it to produce an incorrect or unexpected result, or to behave in unintended ways. Compile time errors:  A compile time error is an error that is detected by the compiler. Common causes for compile time errors include: Syntax errors such as missing semi-colon or use of a reserved keyword (such as 'class'). When you try and access a variable that is not in scope. Debugging:  identify and remove errors from (computer hardware or software).  Lecture-1 Overview and Problem Solving with C Unit-1 4 Step 3:  Linking a Program: After compilation we have to run the program by ./a.out. Linker:  In computing, a linker or link editor is a computer program that takes one or more object files generated by a compiler and combines them into a single executable file, library file, or another 'object' file. Step 4:  Program execution: now the program is executed and we get the result on the output screen.    An Engineering Problem Solving Methodology: The problem Solving Methodology presented here works for many engineering problems that can be tailored to solve problems in other areas also. The process is defined in five steps: 1.   State the problem clearly 2.   Describe the input and output information 3.   Work the problem by hand (or with calculator) for a simple set of data 4.   Develop a solution and convert it to computer program. 5.   Test the solution with variety of data.


Sep 22, 2019


Sep 22, 2019
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...

Sign Now!

We are very appreciated for your Prompt Action!