CP_UNIT_1_2011
-
Upload
chandrasekhar-uchiha -
Category
Documents
-
view
219 -
download
0
Transcript of CP_UNIT_1_2011
-
8/2/2019 CP_UNIT_1_2011
1/28
1.0 INTRODUCTION
We know information processing, plays very important role in taking decisionevery moment. In this context, computers play a significant role in bulk ofinformation processing. Here in this unit, we study what is a computer and
architecture of a computer and what are the different program developmentsteps.
Computer is an electronic device used to store, retrieve and process data. Datais the unprocessed facts, figures and statistics. Process is the conversion of rawdata into useful information. To process data a finite and ordered set ofinstructions needed.
Applications of computer
Computers in Business
Medicine and Healthcare
Education
Science
Engineering
Manufacturing
Government
Military
Entertainment
1.1 COMPUTER ARCHITECTURE (BLOCK DIAGRAM)
A computer system consists of hardware and software. Hardware refers to anyphysical, electrical, electromechnaical components of the computer. For examplekeyboard, mouse, cabinet of computer is considered as hardware. Softwarerefers to a program or set of instructions that is written to achieve a specifiedtask.
The figure 1.1 illustrates the block diagram of a computer. It consists of threeparts:
1. Input Devices2. Central Processing Unit3. Output Devices
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 1
-
8/2/2019 CP_UNIT_1_2011
2/28
Figure 1.1: Block diagram of a computer
1.1.1 INPUT DEVICES
The input device is used to enter data and information into a computer. Thedevices like keyboard, mouse and scanner are commonly used as input devices.
A keyboard is used to enter alphanumeric characters and symbols.
The mouse is used to pick or select a command from the monitor screen.
A scanner is used to scan an image or read a barcode and so on.
1.1.2 CENTRAL PROCESSING UNIT
It is the brain of the computer, performs the bulk of the data processing
operations. Its main function is to execute programs stored in the main memoryby fetching the instructions, examining them and executing them. The programinstructions are processed one at a time along with the necessary data. Theresults are sent to memory and the next instruction is processed. This method isrepeated until the program is executed. CPU Consists of 3 functional units: ALU,CU and MU.
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 2
-
8/2/2019 CP_UNIT_1_2011
3/28
Arithmetic and Logic unit
The arithmetic-logic unit (ALU) is the unit of the computer that performsarithmetic and logical operations on the data. This section of the machine can berelatively small consisting of circuits and registers which perform arithmetic (+, -,
*, /) and logic (>,
-
8/2/2019 CP_UNIT_1_2011
4/28
1.2 COMPUTER SYSTEMS
A computer system consists of hardware and software. Hardware refers to anyphysical, electrical, electromechnaical components of the computer. For examplekeyboard, mouse, cabinet of computer is considered as hardware. Software
refers to a program or set of instructions that is written to achieve a specifiedtask.
1.2.1 COMPUTER HARDWARE
The hardware component of the computer system consists of: Input devices,Output devices and Processor discussed in 1.1. Memory will be discussed in 1.3.
1.2.2 COMPUTER SOFTWARE
Software is a set of instructions that are used to carry out a task.
Software can be grouped into two categories namely application softwareand system software.
System software manages the computer resources. It provides theinterface between the hardware and the users.
Application software, on the other hand, is directly responsible for helpingusers solving the problems.
Figure: 1.2 Categories of Software
System Software
System software consists of programs that manage the hardware resources of acomputer and perform required information processing tasks.
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 4
-
8/2/2019 CP_UNIT_1_2011
5/28
System software is divided in to three categories:
Operating System: consisting of programs and data, this runs oncomputers and manages the computer hardware. It keeps the systemoperating in an efficient manner while allowing the users access to the
system.
System Support Software: provides system utilities and other operationservices. Example disk format programs etc.,
System Development Software: includes the language translators thatconvert programs in to machine language for execution. Examplecompiler, assembler.
Application Software
Application Software is divided in to two categories: general-purpose softwareand application-specific software.
General-purpose software can be used for more than one application, ispurchased from software development organizations. Examples includeword processor, database management systems, c etc.,
Application-specific software can be used only for its intended purpose.Examples include library automations system etc.,
1.3 MEMORY
Computer memory refers to the physical devices used to store data orprograms (sequences of instructions) on a temporary or permanent basisfor use in an electronic digital computer.
Computers represent information in binary code, written as sequences of0s and 1s.
A bit is a binary digit, taking a value of either 0 or 1.
A byte is a collection of eight bits.There are two main types of memory, one is called volatile memory and other isnon-volatile memory.
Volatile memory: The term volatile memory means that the information presentin these types of memory devices is deleted as soon as the power is switched off.
Non-volatile memory: The term non volatile memory means that the informationpresent in these types of memory devices is not lost as soon as the power isswitched off.Categories of Memory
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 5
-
8/2/2019 CP_UNIT_1_2011
6/28
Computer memory categorized into the following types
1. Primary memory2. Secondary memory
3. Cache memory4. Registers
Figure 1.3 Categories of Memory
1.3.1 PRIMARY MEMORY
Primary memory (main memory) is available in two forms: RAM and ROM.
Random Access Memory
Random Access Memory is a temporary storage medium in a computer. All datato be processed by the computer are transferred from a storage device orkeyboard to RAM during data processing. Results obtained from executing anyprogram are also stored in RAM. RAM is a volatile memory.
Two main types of RAM are the Dynamic RAM and the Static RAM. The DynamicRAM is capacitance-based and cheap, while the Static RAM is switch-based and
fast.
RAM consists of many storage cells each of size 1 byte and is identified by usinga number called as address or memory location. The memory address isassigned by the computer which also varies from computer to computer and timeto time. The data stored in memory are identified using the memory address.
ROM (Read Only Memory)
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 6
-
8/2/2019 CP_UNIT_1_2011
7/28
Read Only Memory is a permanent storage medium which stores start upprograms. These programs which are loaded when computer is switched on.ROM stores essentially the BIOS (Basic Input Output System) programs whichare recorded by the manufacturer of the computer system. ROM is non-volatile
memory.
1.3.2 SECONDARY MEMORY
Secondary Memory devices it is used to store data and program on a permanentbasis. Secondary Memories are non-volatile in nature. The secondary memorydevices are available in huge sizes. It is much slower in speed compared to theinternal or the primary memory devices. Examples hard disk, CD ROM, DVD etc.,
1.3.3 CACHE MEMORY
Cache memory is a memory placed between CPU and main memory. It is fastercompared to the primary memory. Parts of the program or data that need to beaccessed repeatedly are stored in Cache memory.It is a volatile memory.
Internal Cache
It is available internally within the CPU (like the CPU registers). Hence theinternal Cache is comparable to the registers in terms of speed but much largerin size compared to the registers.
External Cache
It is available externally along with the CPU, ROM and RAM. These are fasterthan the RAM and the ROM.
1.3.4 REGISTERS
Registers are small memory units internally available within the processor. It is avolatile memory.
1.4 COMPUTING ENVIRONMENT
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 7
-
8/2/2019 CP_UNIT_1_2011
8/28
In the early days of computers, there was only one environment: the mainframecomputers hidden in a central computing department. With the advent ofpersonal computers, the environment changed, resulting in computers oneverywhere. In this section we will describe different environments.
Personal Computing Environment
In 1971, Marcian E. Hoff, working for Intel, combined the basic elements of thecentral processing unit into the microprocessor.
If we are using a personal computer, all of the computer hardware componentsare tied together in our personal computer. In this situation, we have the wholecomputer for our self: we can do whatever we want. A typical personal computeris shown in Figure 1.4.
Figure 1.4 Personal Computing Environment
Time-Sharing Environment
Employees in large companies often work in what is known as a time-sharingenvironment. In the time-sharing environment, many users are connected to oneor more computers. These computers may be minicomputers or centralmainframes. The terminals they use are often nonprogrammable, although today
we see more and more microcomputers being used to simulate terminals. Also,in the time-sharing environment, the output and auxiliary storage devices areshared by all users. . A typical personal computer is shown in Figure 1.5.
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 8
-
8/2/2019 CP_UNIT_1_2011
9/28
Figure 1.5 Time-sharing Environment
In the timesharing environment, all computing must be done by the centralcomputer. In other words, the central computer has many duties: It must controlthe shared resources; it must manage the shared data and printing; and it mustdo the computing. All of this work tends to keep the computer busy. In fact, it is
sometimes so busy that the user becomes frustrated by the computers slowresponses.
Client / Server Environment
A Client / Server computing environment splits the computing function between acentral computer and users computers. The users are given personal computersor workstations so that some of the computation responsibility can be movedfrom the central computer and assigned to the workstations.
In the client/server environment, the users microcomputers or workstations are
called the Client. The central computer, which may be a powerfulmicrocomputer, minicomputer, or central mainframe system, is known as theserver. Because the work is now shared between the users computers and thecentral computer, response time and monitor display are faster and the users aremore productive. Figure 1.6 shows a typical client/ server environment.
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 9
-
8/2/2019 CP_UNIT_1_2011
10/28
Figure 1.6 The Client/Server Environment
Distributed Computing
A distributed computing environment provided a seamless integration ofcomputing functions between different servers and clients. The Internet providesconnectivity to different servers throughout the world. For example, eBay usesseveral computers to provide its auction service. This environment provides a
reliable, scalable, and highly available network. Figure 1.7 shows a distributedcomputing system.
Figure 1.7 Distributed Computing System.
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 10
-
8/2/2019 CP_UNIT_1_2011
11/28
1.5 COMPUTER LANGUAGES
Computer Programming is an art of making a computer to do the requiredoperations, by means of issuing sequence of commands to it.
Categories of Computer Languages
1. Machine Language2. Symbolic Languages3. High-Level Languages
1.5.1 MACHINE LANGUAGES
Machine Language is the only language that is directly understood by thecomputer. It does not need any translator program. The instructions are called
machine instruction (machine code) and it is written as strings of 1's (one) and 0s(zero). When this sequence of codes is fed in to the computer, it recognizes thecode and converts it in to electrical signals.
For example, a program instruction may look like this: 10110001101
Machine language is considered to be the first generation language. Because ofit design, machine language is not an easy language to learn. It is also difficult todebug the program written in this language.
Advantage
The program runs faster because no translation is needed. (It is already inmachine understandable form)
Disadvantages
It is very difficult to write programs in machine language. The programmerhas to know details of hardware to write program
It is difficult to debug the program.
1.5.2 SYMBOLIC LANGUAGE
In Symbolic language, set of mnemonics (symbolic keywords) are used torepresent machine codes. Mnemonics are usually combination of words likeADD, SUB and LOAD etc.
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 11
-
8/2/2019 CP_UNIT_1_2011
12/28
Assembler
In order to execute the programs written in symbolic language, a translatorprogram is required to translate it to the machine language. This translatorprogram is called Assembler. Later symbolic language known as Assembly
language. It is considered to be the second-generation language.
Advantages:
The symbolic keywords are easier to code and saves time and effort
It is easier to correct errors and modify programming instructions
Assembly Language has utmost the same efficiency of execution as themachine level language, because there is one-to-one translation betweenassembly language program and its corresponding machine languageprogram.
Disadvantages:
Assembly languages are machine dependent. A program written for onecomputer might not run in other computer.
1.5.3 HIGH LEVEL LANGUAGES
High level languages are the simple languages that use English like instructionsand mathematical symbols like +, -, %, /, for its program construction. In highlevel languages, it is enough to know the logic and required instructions for agiven problem, irrespective of the type of computer used.
Compiler
Compiler is a translator program which converts a program in high level languagein to machine language.
Examples of Higher level languages are: PASCAL, C, ALGOL etc..,
Advantages
High level languages are easy to learn and use
1.6 PROGRAM DEVELOPMENT STEPS
Problem solving is a creative process. It is an act of defining a problem,determining the cause of the problem, identifying, prioritizing, and selectingalternatives for a solution and implementing a solution.
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 12
-
8/2/2019 CP_UNIT_1_2011
13/28
A problem can be solved successfully only after making an effort to understandthe problem. To understand the problem, the following questions help
What do we know about the problem?
What is the information that we have to process in order the find the
solution? What does the solution look like?
What sort of special cases exist?
How can we recognize that we have found the solution?
It is important to see if there are any similarities between the current problem andother problems that have already been solved. We have to be sure that the pastexperience does not hinder us in developing new methodology or technique forsolving a problem. The important aspect to be considered in problem-solving isthe ability to view a problem from a variety of angles.
The various steps involved in Program Development are:
1. Defining or Analyzing the problem2. Design (Algorithm, Flowchart)3. Coding4. Compiling and Running the Program5. Testing and Debugging6. Maintenance&Documenting the program
1.6.1 DEFINING OR ANALYZING THE PROBLEM
The problem is defined by doing a preliminary investigation. Defining a problemhelps us to understand the problem clear. It is also known as Program Analysis.
Tasks in defining a problem:
Specifying the input requirements
Specifying the output requirements
Specifying the processing requirements
Specifying the input requirements
Determine the inputs required and source of the data. The input specification isobtained by answering the following questions:
What specific values will be provided as input to the program?
What format will the values be?
For each input item, what is the valid range of values that it may assume?
What restrictions are placed on the use of these values?
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 13
-
8/2/2019 CP_UNIT_1_2011
14/28
Specifying the output requirements
Describe in detail the output that will be produced. The output specification isobtained by answering the following questions:
What values will be produced? What is the format of these values?
What specific annotation, headings, or titles are required in the report?
What is the amount of output that will be produced?
Specifying the Processing Requirements
Determine the processing requirements for converting the input data to output.
The processing requirement specification is obtained by answering the followingquestions:
What is the method (technique) required in producing the desired output?
What calculations are needed?
What are the validation checks that need to be applied to the input data?
LOGIC
A method of human thought that involves thinking in a linear, step by stepmanner about how a problem can be solved.
Logic is a language for reasoning. It is a collection of rules we use when doing
reasoning.
Importance of Logic in problem solving
For solving a problem there may be multiple valid logics some may be simple andothers may be complex
For example: Determine whether a given number is prime or not?
Logic 1: Divide the number by all the numbers from 2 to one less than thenumber and if for all the division operations, the reminder is non zero, the number
is prime otherwise it is not prime
Logic 2: Same as logic1 but divide the number only from 2 to the number /2
As a programmer our job is to find out appropriate logic to solve given problem.
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 14
-
8/2/2019 CP_UNIT_1_2011
15/28
1.6.2 DESIGN
A design is the path from the problem to a solution in code. Program Design isboth a product and a process. The process results in a theoretical framework fordescribing the effects and consequences of a program as they are related to its
development and implementation.
A well designed program is more likely to be:
Easier to read and understand later
Less of bugs and errors
Easier to extend to add new features
Easier to program in the first place
Modular Design
Once the problem is defined clearly, several design methodologies can beapplied. An important approach is Top-Down programming design. It is astructured design technique which breaks up the problem into a set of sub-problems called Modules and creates a hierarchical structure of modules.
While applying top-down design to a given problem, consider the followingguidelines:
A problem is divided it into smaller logical sub-problems, called Modules
Each module should be independent and should have a single task to do
Each module can have only one entry point and one exit point, so that the
logic flow of the program is easy to follow When the program is executed, it must be able to move from one module
to the next in sequence, until the last module is executed
Each module should be of manageable size, in order to make the designand testing easier
Advantages
Breaking up the problem into parts helps us to clarify what is to be done.
At each step of refinement, the new parts become more focused and,therefore, easier to design.
Modules may be reused.
Breaking the problem into parts allows more than one person to work onthe solution simultaneously.
Algorithm (Design technique)
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 15
-
8/2/2019 CP_UNIT_1_2011
16/28
Finite set of steps to accomplish a task Step-by-step, simple, mechanicalprocedure to compute a function on every possible input.Flowchart
Flowchart is a diagrammatic representation of an algorithm. It uses different
symbols to represent the sequence of operations, required to solve a problem.
1.6.3 CODING
An algorithm expressed in programming languages is called Program. Writing aprogram is called Coding. The logic that has been developed in the algorithm isused to write the program.
1.6.4 COMPILING AND EXECUTING THE PROGRAM
Compilation is a process of translating a source program into machine
understandable form. The compiler is system software, which does thetranslation after examining each instruction for its correctness. The translationresults in the creation of object code.
After compilation, Linking is done if necessary. Linking is the process of puttingtogether all the external references (other program files and functions) that arerequired by the program. The program is now ready for execution. Duringexecution, the executable object code is loaded into the computers memory andthe program instructions are executed.
1.6.5 TESTING AND DEBUGGING
Testing
Testing is the process of executing a program with the deliberate intent of findingerrors. Testing is needed to check whether the expected output matches theactual output. Program should be tested with all possible input data and controlconditions.
Testing is done during every phase of program development. Initially,requirements can be tested for its correctness. Then, the design (algorithm, flowcharts) can be tested for its exactness and efficiency. Structured walk through ismade to verify the design.
Programs are tested with several test criteria and the important ones are givenbelow:
Test whether each and every statement in the program is executed atleast once (Basic path testing).
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 16
-
8/2/2019 CP_UNIT_1_2011
17/28
Test whether every branch in the program is traversed at least once(control flow).
Test whether the input data flows through the program and is converted toan output (data flow).
Debugging
Debugging is a process of correcting the errors. Programs may have logicalerrors which cannot be caught during compilation. Debugging is the process ofidentifying their root causes. One of the ways to ensure the correctness of theprogram is by printing out the intermediate results at strategic points ofcomputation.
Some programmers use the terms testing and debugging interchangeably, butcareful programmers distinguish between the two activities. Testing meansdetecting errors. Debugging means diagnosing and correcting the root causes.
On some programs, debugging occupies as much as 50 percent of the totaldevelopment time. For many programmers, debugging is the hardest part ofprogramming because of improper documentation.
1.6.6 MAINTENANCE AND DOCUMENTING THE PROGRAM
Maintenance
Programs require a continuing process of maintenance and modification to keeppace with changing requirements and implementation technologies.
Maintainability and modifiability are essential characteristics of every program.
Documenting the Program
Documentation explains how the program works and how to use the program.Documentation can be of great value, not only to those involved in maintaining ormodifying a program, but also to the programmers themselves. Details ofparticular programs, or particular pieces of programs, are easily forgotten orconfused without suitable documentation.
1.7 ALGORITHM
An algorithm is a step-by-step description of the solution to a problem. It isdefined as an ordered sequence of well-defined and effective operations which,when carried out for a given set of initial conditions, produce output, andterminate in a finite time. The term ordered sequence specifies, after the
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 17
-
8/2/2019 CP_UNIT_1_2011
18/28
completion of each step in the algorithm, the next step must be unambiguouslydefined.
1.7.1 PROPERTIES OF AN ALGORITHM
1. Finiteness: Must terminate after a finite number of steps.
2. Definiteness: Action in each step to be carried out must be rigorously andunambiguously specified.
3. Input: Has zero or more inputs that are provided to it initially ordynamically.
4. Output: Has one or more outputs; quantities that have a specified relationto inputs.
5. Effectiveness: operations must all be sufficiently basic.
1.7.2 CATEGORIES OF AN ALGORITHM
Algorithm is mainly divided in to three types.
1. Sequence: A series of steps that we perform one after the other. Stepscarried out in given sequence
2. Selection: Making a choice from multiple available options. Next stepdepends on outcome of condition.
3. Iteration: Performing repetitive tasks. Partial sequence of steps executedrepeatedly until condition reached.
1.7.3 DEVELOPING ALGORITHMS
Algorithm development process is a trial-and-error process.
Programmers make initial attempt to the solution and review it, to test itscorrectness. The errors identified leads to insertions, deletions, or modificationsto the existing algorithm.
This refining continues until the programmer is satisfied that, the algorithm isessentially correct and ready to be executed.
The more experience we gain in developing an algorithm, the closer our firstattempt will be to a correct solution and the less revision will be required.
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 18
-
8/2/2019 CP_UNIT_1_2011
19/28
However, a novice programmer should not view developing algorithm as a single-step operation.1.6.4 EXAMPLES
Example (sequence)
1. Write an algorithm to find the Area of a Circle.
2. Write an algorithm to add two numbers.
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 19
Aim: Algorithm to find the Area of a Circle
Algorithm:
BEGIN
Step 1: Accept the RADIUS
Step 2: Find the square of RADIUS and store it in SQUAREStep 3: Multiply SQUARE with 3.14 and store the result in AREAStep 4: Display AREA
END
Aim: algorithm to find the addition of two numbers.
Algorithm
BEGIN
Step 1: Accept two numbers in A and B
Step 2: C = A + BStep 3: Display C
END
-
8/2/2019 CP_UNIT_1_2011
20/28
Example (selection)
1. Write an algorithm to find the average marks of a student. Also check
whether the student has passed or failed. (Average
-
8/2/2019 CP_UNIT_1_2011
21/28
1.8 FLOWCHART
A flowchart is a diagrammatic representation of computation. A flowchart is an
organized combination of shapes, lines and text that graphically illustrates aprocess or structure.
Typical flowchart symbols are given below:
Figure 1.8 Symbols used in flowchart
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 21
-
8/2/2019 CP_UNIT_1_2011
22/28
Example (sequence)
1. Draw a flowchart to find the addition of two numbers.
Figure: 1.9 Flowchart to find addition of two numbers
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 22
Start
Accept a, b
C=a + b
Display c
End
-
8/2/2019 CP_UNIT_1_2011
23/28
Example (selection)
1. Draw a Flowchart to find the whether a given year is a leap year or not.
False
True
Figure: 1.10 Flowchart to find the given year is leap or not
1.9 SYSTEM DEVELOPMENT (SDLC)
Todays large-scale projects are built using a series of interrelated phasescommonly referred to as the software development life cycle.
Depending on the company and the type of the software being developed, thismodel consists of between five to seven steps. Figure 1.11 is one possiblevariation of the sdlc model.
Sdlc model starts with Requirement. In this phase, the analyst defines therequirements that specify what the proposed project is to accomplish,
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 23
Start
Accept year
Display leap
year
End
if(year
%4==0)
Display non
leap year
-
8/2/2019 CP_UNIT_1_2011
24/28
defines needed information, function, behavior, performance of theproposed project.
Design phase determines how the system will be built.
Coding can be done using any programming language consists ofprograms.
After coding we need to test the project. All the programs are testedtogether to make sure the system works as a whole.
Final phase, maintenance, keeps the project working once it has put intoproduction.
Figure: 1.11 Software Development Life Cycle
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 24
-
8/2/2019 CP_UNIT_1_2011
25/28
APPENDIX OVERVIEW OF COMPUTER
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 25
-
8/2/2019 CP_UNIT_1_2011
26/28
Objective Questions
1. Computer systems is made up of [ ]
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 26
-
8/2/2019 CP_UNIT_1_2011
27/28
a) Hardware b) Softwarec) Both a & b d) None of the above
2. Primary Memory is also called as [ ]a) Auxiliary Memory b) Secondary Storage
c) Soft Copy d) Main memory
3. The terminal (start/stop) in the flow chart is indicated by [ ]a) Parallelogram b) Ovalc) Rectangle d) Diamond
4. A well-defined, finite set of steps to solve a definite nature of the problemis called [ ]a) Algorithm b) Pseudo code
c) Flowchart d) None of the above
5. Input/output in the flow chart is indicated by [ ]a) Parallelogram b) Ovalc) Rectangle d) Diamond
6. Central Processing Unit of the computer system consists of [ ]a) Control Unit b) Arithmetic Logic Unitc) both a & b d) None of the above
7. Pseudo Code is [ ]a)English like statements b)Problem Solving toolc)Follow a loosely defined syntax d)All of the above
8. The process in the flow chart is [ ]a) Parallelogram b) Ovalc) Rectangle d) Diamond
9. A pictorial representation of an algorithm is called [ ]a) Pseudo Code b) Programc) Operating System d) Flow Chart
Match the following:
10. RAM a Input Device [ ]11. Plotter b) volatile [ ]12. ROM c) Output Device [ ]13. Key Board d) non-volatile [ ]
ASSIGNMENT I
B.V.RAJESH, ASSISTANT PROFESSOR, DEPARTMENT OF IT, SNIST PAGE NO: 27
-
8/2/2019 CP_UNIT_1_2011
28/28
1. Draw the architecture of a computer? Explain.
2. What are the different program development steps? Explain each step indetail.
3. What is an algorithm? What are the different properties and categories of analgorithm? Explain with an example.
4. What is flowchart? What are the different symbols used to draw the flowchart.Explain with an example.
5. Write an algorithm to find the nature of the roots of a quadratic equation.
6. given the 3 sides of triangle a, b and c as input, Draw a flowchart to testwhether it is isosceles, equilateral or not. It should also validate whether theinput forms a triangle or not. (Ex. 10, 3, 3 is not a triangle)