0% found this document useful (0 votes)
15 views

CPDS_UNIT1_Part1

Uploaded by

seepanadinesh669
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

CPDS_UNIT1_Part1

Uploaded by

seepanadinesh669
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

UNIT-I Prepared by Dr. B. Kesava Rao, Asst.Prof., ECE.

Introduction to Computers – Computer Systems, Computing Environments,


Computer Languages, Creating and running programs, Software Development.

1. List and explain the functions of various parts of computer hardware and
software.

Ans: A computer is a system made up of two major components:


1. Computer Hardware.
2. Computer Software.
The following figure shows a computer system:

Computer

Hardware Software
Fig: Computer System

1. Computer Hardware: The computer hardware is the physical equipment.


The hardware component of computer system consists of 5 parts:
1. Input Devices.
2. Central Processing Unit (CPU).
3. Primary Storage.
4. Output Devices.
5. Auxiliary Storage Devices.
The following figure shows the hardware components:

Fig: Hardware Components


A. Input Devices: The input device is usually a keyboard where programs and data are
entered in to the computer. Other Input Devices: a touch screen, a mouse, a pen, an
audio input unit.
B. Central Processing Unit (CPU): It is responsible for executing instructions such as
arithmetic calculations, comparisons among data and movement of data inside the
system. Today’s computers may have one or more CPU’s
C. Primary Storage: It is also known as main memory. It is a place where the programs
and data is stored temporarily during processing. The Data in primary storage is erased,
when we turn off a personal computer or when we log off from a time-sharing computer
(volatile).
D. Output Devices: The output device is usually a monitor or a printer to show output.
If the output is shown on the monitor, it is a soft copy and if the output is printed on the
printer, it is a hard copy.
E. Auxiliary Storage Devices (secondary storage devices): It is used for both input
and output. It is also known as secondary storage. It is a place where the programs and
data are stored permanently. When we turn off the computer the programs and data
remain in the secondary storage, ready for the next time when we need them.
II. Computer Software: Software is the collection of Programs (instructions) that allow
the hardware to do its job.
They are two types of Computer Software.
A. System Software
B. Application Software
The following figure shows the Computer Software.

Fig: Computer Software

A. System Software: System Software consists of programs that manage the hardware
resources of a computer and perform required information processing tasks.
These programs are divided in to three classes.
i. Operating System Software.
ii. System Support Software.
iii. System Development Software.
i. Operating System Software: It provides services such as a user interface, files and
data base access and interfaces to communication systems such as Internet protocols.
The primary purpose of this software is to keep the system operating in an efficient
manner while allowing the users access to the system.
ii. System Support Software: System Support Software provides system utilities and
other operating services. Examples of system utilities are sort programs and disk format
programs. Operating services consist of programs that provide performance statistics for
the operational staff and security monitors to protect the system and data.
iii. System Development Software: It includes language translators that convert
programs in to machine language for execution, debugging tools to ensure that programs
are error - free and computer -assisted software engineering (CASE) systems.
B. Application Software: It is directly responsible for helping users to solve their
problems. Application software is broken in to two classes.
i. General - Purpose Software
ii. Application - Specific Software
i. General Purpose Software: It is purchased from a software developer and can be
used for more than one application. Examples: word processors, database management
systems, computer – aided design systems. They are labelled general purpose because
they can solve a variety of user computing problems.
ii. Application Specific Software: It can be used only for its intended purpose.
Example: A general ledger system used by accountants.
They can be used only for the task for which they were designed. They cannot be used
for other generalized tasks.
Relationship between system and application software is shown in the figure:

Fig: Relationship between System and Application Software


Each circle is an interface point. The inner core is hardware. The user is represented by
the outer layer. To work with the system, the typical user uses some form of application
software. The application software in turn interacts with operating system ( OS ), which
is part of system software layer. The System software provides the direct interaction
with the hardware. The opening at the bottom of the figure is the path followed by the
user who interacts directly with the Operating System when necessary.
2. Explain Creation and Running of Programs?
(Or)
Describe how the developers will write the Programs?

Ans: CREATING AND RUNNING PROGRAMS: It is the job of programmer to write and
test the program. The following are four steps for creating and running programs:
A. Writing and Editing the Program.
B. Compiling the Program.
C. Linking the Program with the required library modules.
D. Executing the Program.
A. Writing and Editing Program: The Software to write programs is known as text
editor. A text editor helps us enter, change and store character data. Depending on the
editor on our system, it could be used to write letters create reports or write programs.
Example: word processor.
The text editor could be generalized word processor, but every compiler comes with
associated text editor. Some of the features of editors are
Search: To locate and replace statements.
Copy, Paste: To copy and move statements.
Format: To set tabs to align text.
After the program is completed the program is saved in a file to disk. This file will be
input to the compiler, it is known as source file. The following figure shows the various
steps in building a C – program.
B. Compiling Programs: The code in a source file on the disk must be translated in to
machine language. This is the job of compiler which translates code in source file stored
on disk in to machine language. The C compiler is actually two separate programs: the
pre-processor and the translator. The pre-processor reads the source code and prepares
it for the compiler. It scans special instructions known as pre-processor commands.
These commands tell the pre-processor to take for special code libraries, make
substitutions in the code. The result of pre-processing is called translation unit. The
translator reads the translation unit and writes resulting object module to a file that can
be combined with other precompiled units to form the final program. An object module is
the code in machine language. This module is not ready for execution because it does
not have the required C and other functions included.

Fig: Building a C- Program


C. Linking Programs: C programs are made up of many functions.
Example: printf ( ) , cos ( )… etc
Their codes exists elsewhere, they must be attached to our program. The linker
assembles all these functions, ours and the systems, in to a final executable program.
D. Executing Programs: Once our program has been linked, it is ready for execution. To
execute a program, we use operating system command, such as run to load the program
in to main memory and execute it. Getting program in to memory is the function of an
Operating System programs called loader. Loader locates the executable program and
reads it in to memory. In a typical program execution, the program reads data for
processing, either from user or from file. After the program processes the data, it
prepares output. Data output can be to user’s monitor or to a file. When program has
executed, Operating System removes the program from memory.

3. Describe about various computing environments in computer system.


Ans: Computing Environment is a collection of computers / machines, software, and
networks that support the processing and exchange of electronic information meant to
support various types of computing solutions. With the advent if technology the
computing environments have been improved.
Types of Computing Environments:
 Personal computing Environment
 Time sharing Environment
 Client-Server Environment
 Distributed Environment
Personal computing Environment: Personal means, all the computer stuff will be tied
together i.e. computer is completely ours, no other Connections.
Time sharing Environment: In computing, time-sharing is the sharing of a computing
resource among many users by means of multi programming and multi-tasking at the
same time. Mam users are connected to one or more computers.

Fig: Time sharing Environment


Client-Server Environment: A client/server system is “a networked computing model
that distributes processes between clients and servers, which supply the requested
service.” A client/server network connects many computers, called clients, to a main
computer, called a server. Whenever client requests for something, server receives the
request and process it.

Fig: Client-Server Environment


Distributed Environment: Computing Environment Provides a seamless integration of
computing functions between different servers and clients. The servers are connected by
internet all over the world.

Fig: Distributed Environment

4. Explain about computer languages.


Ans: Computer languages are the languages through which the user can
communicate with the computer by writing program instructions.

Computer Languages Classification:


1. Low-Level Language (Machine Language)
 Low-Level language is the only language which can be understood by the
computer.
 Binary Language is an example of a low-level language. Low-level language is also
known as Machine Language.
 The binary language contains only two symbols 1 & 0.
 All the instructions of binary language are written in the form of binary numbers
1's & 0's.
 A computer can directly understand the binary language. Machine language is
also known as the Machine Code.
 As the CPU directly understands the binary language instructions, it does not
require any translator.
 CPU directly starts executing the binary language instructions and takes very less
time to execute the instructions as it does not require any translation.
 Low-level language is considered as the First Generation Language (1GL).

Advantages
 A computer can easily understand the low-level language.
 Low-level language instructions are executed directly without any translation.
 Low-level language instructions require very less time for their execution.

Disadvantages
 Low-level language instructions are very difficult to use and understand.
 Low-level language instructions are machine-dependent, that means a program
written for a particular machine does not execute on another machine.
 In low-level language, there is more chance for errors and it is very difficult to find
errors, debug and modify.

2. Middle-Level Language (Assembly Language)


 Middle-level language is a computer language in which the instructions are
created using symbols such as letters, digits and special characters.
 Assembly language is an example of middle-level language. In assembly language,
we use predefined words called mnemonics.
 Binary code instructions in low-level language are replaced with mnemonics and
operands in middle-level language.
 But the computer cannot understand mnemonics, so we use a translator
called Assembler to translate mnemonics into binary language.
 Assembler is a translator which takes assembly code as input and produces
machine code as output.
 That means, the computer cannot understand middle-level language, so it needs
to be translated into a low-level language to make it understandable by the
computer. Assembler is used to translate middle-level language into low-level
language.

Advantages
 Writing instructions in a middle-level language is easier than writing instructions
in a low-level language.
 Middle-level language is more readable compared to low-level language.
 Easy to understand, find errors and modify.

Disadvantages
 Middle-level language is specific to a particular machine architecture that means it
is machine-dependent.
 Middle-level language needs to be translated into low-level language.
 Middle-level language executes slower compared to low-level language.

3. High-Level Language

 A high-level language is a computer language which can be understood by the


users.
 The high-level language is very similar to human languages and has a set of
grammar rules that are used to make instructions more easily.
 Every high-level language has a set of predefined words known as Keywords and a
set of rules known as Syntax to create instructions.
 The high-level language is easier to understand for the users but the computer
cannot understand it.
 High-level language needs to be converted into the low-level language to make it
understandable by the computer.
 We use Compiler or interpreter to convert high-level language to low-level
language.
 Languages like COBOL, FORTRAN, BASIC, C, C++, JAVA, etc., are examples of
high-level languages.
 All these programming languages use human-understandable language like
English to write program instructions.
 These instructions are converted to low-level language by the compiler so that it
can be understood by the computer.

Advantages
 Writing instructions in a high-level language is easier.
 A high-level language is more readable and understandable.
 The programs created using high-level language runs on different machines with
little change or no change.
 Easy to understand, create programs, find errors and modify.

Disadvantages
 High-level language needs to be translated into low-level language.
 High-level language executes slower compared to middle and low-level languages.

Summary: Understanding Computer Languages


The following figure provides a few key points related to computer languages.
From the above figure, we can observe the following key points...

 The programming languages like C, C++, Java, etc., are written in High-level
language which is more comfortable for the developers.
 A high-level language is closer to the users.
 Low-level language is closer to the computer. Computer hardware can understand
only the low-level language (Machine Language).
 The program written in the high-level language needs to be converted to low-level
language to make communication between the user and the computer.
 Middle-level language is not closer to both user and computer. We can consider it
as a combination of both high-level language and low-level language.

4. Give the differences between machine, assembly and high level languages.
Machine level language Assembly level language High level language
Machine language consist of Assembly level language It consists of simple human
binary codes (only 0s and consists of mnemonics like language like English-
1s) abbreviations, symbols. statements.
Ex: 101110111100010 Ex: ADD , SUB, MUL etc. Ex: printf (“Hello World!”);
It is directly executed by It needs assembler to It needs compiler to convert
computer hardware. converts assembly language high level language into
in to machine language. machine language.
Also called as low-level Also called as middle level It high level language.
language. language.
Machine dependent Machine dependent Machine dependent
language. language. language.
No formal structure No formal structure Formal structure
Less memory is required Less memory required More memory requitred
It needs less execution time It needs less execution time It needs more execution
time.
Example: Processor can Example: 8086, 8051, ARM Example: C++, JAVA,
only understand the programming language. Design language.
machine code.
5.Discuss the various stages involved in Software Development process?
What is Software Development?
The software development life cycle is a set of steps or phases that are used to develop a
software using any programming language.
Generally, the software development life cycle contains 6 phases, they are as follows….

1. Planning /Problem definition

2. Problem Analysis

3. Design

4. Implementation

5. Testing & Integration

6. Maintenance

1. Planning / Problem Definition


In this phase, we define the problem statement and we decide the boundaries of the
problem. In this phase we need to understand the problem statement, what is our
requirement, what should be the output of the problem solution. These are defined in
this first phase of the program development life cycle.
2. Problem Analysis
In phase 2, we determine the requirements like variables, functions, etc. to solve the
problem. That means we gather the required resources to solve the problem defined in
the problem definition phase. We also determine the bounds of the solution.
3. Design
During this phase, we develop a step-by-step procedure to solve the problem using the
specification given in the previous phase. This phase is very important for program
development. That means we write the solution in step-by-step statements.
4. Implementation (Coding & Documentation)
This phase uses a programming language to write or implement the actual programming
instructions for the steps defined in the previous phase. In this phase, we construct the
actual program. That means we write the program to solve the given problem using
programming languages like C, C++, Java, etc.,
5. Testing & Integration
During this phase, we check whether the code written in the previous step is solving the
specified problem or not. That means we test the program whether it is solving the
problem for various input data values or not. We also test whether it is providing the
desired output or not.
6. Maintenance
During this phase, the program is actively used by the users. If any enhancements
found in this phase, all the phases are to be repeated to make the enhancements. That
means in this phase, the solution (program) is used by the end-user. If the user
encounters any problem or wants any enhancement, then we need to repeat all the
phases from the starting, so that the encountered problem is solved or enhancement is
added.

You might also like