Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

ASSEBLER: is a language translator for low-level language.

Assembler is a system program or translator


program that translates (converts) inputs source program written in Assembly language into output object
program that consist machine language binary code 0’s and 1’s.
INTERPRETER AND COMPLIER
Interpreter and compliers are the language translator for high level languages. Although interpreter and
compiler are used for high-level language translations, they differ basically in their operating mode.
INTEPRETER: An interpreter is a language translator (for system program) which translate input high
level language program line by line (or instruction by instruction) into equivalent machine language
instructions and immediately executes each instructions if they are free from errors (if there no
grammatical or semantic mistakes)
COMPILER: A compiler is a language translator which translate input high level language source
program into equivalent machine level language program (called object program) the whole program is
translated into equivalent machine level language if there are no syntax errors, but there is no immediate
execution of instruction by instruction as in case of interpreter.
Differentiate between a complier and interpreter.
Compiler Interpreter
It takes entire high-level language program It takes one statement of a high level
1 as input and translates it into machine 1 language program as input and translates it
language. into machine language and executes it.
All errors that occur in the program are listed Errors that occur only in the statement
2 2
and displayed being taken for transaction are displayed
3 Debugging is faster 3 Debugging is slower
4 Require more memory 4 Require less memory
5 Costlier 5 Cheaper
6 Security of source code 6 No security of source code
Program Development Cycle

Problem solving by a computer is not a simple job, but it is a creative process which largely
defines the systematization and mechanization. This is an intricate process which requires much
thought, careful study and planning, logical precision, and persistence. Problem solving is also a
challenging, exciting and satisfying experience. It is necessary to know the problem solving
techniques to solve a particular problem using computer.

Problem solving by the computer involves the following steps.


1. Problem definition
2. Analysis
3. Design (Algorithm and Flowcharts)
4. Coding
5. Debugging
6. Testing
7. Documentation
1. Problem Definition
This is the first step in computer problem solving. The problem solver should understand the
problem thoroughly interms of the requirements. That is, what is the input and output operations
to be performed. The programmer should extract from the problem statement, a set of well-
defined and precise tasks that can be carried out. If the problem is not properly interpreted then
we can not obtain the desired results.
2. Analysis
The given problem must be analyzed before it is solved. This determines the data items,
their types and relationship. We should specify the operations (Arithmetic and logical) to be
performed on them and checking the suitability in terms of memory and execution time.
3. Design the Program

This stage often uses one of two ways to describe the solution:

1. Algorithm
2. Flow Chart

3.1 Algorithm
It is a problem solving technique. It can be defined as a step by step procedure to solve a
particular problem. It consists of English like statements. Each statement must be precise and
well-defined to perform a specific operation. When these statements are carried out for a given
set of conditions, they would produce the required results.
An Algorithm is named after the famous ninth century Arabic author and mathematician, Abu
Jafar Mohammed Ibn Musa AI Khowarizmi. The last two terms of the name took different
pronunciations over the period such as Alkhowarism, Algorism and finally it became Algorithm.
3.1.1 Characteristics of algorithm
Each and every algorithm is characterized by the following five important characteristics.
 Input: It may accept zero or more inputs.
 Output: It should produce at least one output (result).
 Definiteness: Each instruction must be clear, well-defined and precise. There should not
be any ambiguity.
 Finiteness: It should be a sequence of finite instructions. That is, it should end after a
fixed time. It should not enter an infinite loop.
 Effectiveness: This means that operations must be simple and are carried out in a finite
time at one or more levels of complexity. It should be effective whenever traced manu-
ally for the results. Computer programming languages are required to check the definite-
ness and effectiveness of each instruction of the algorithm

3.1.2 Algorithmic Notations


While writing algorithms the following notations are considered.
 Name of the algorithm: It specifies the problem to be solved.
 Step number: Identification tag of an instruction and it is an unsigned positive integer.
 Explanatory comment: It follows the step number and describes the operation. It should
be written within a pair of square brackets.
 Termination: It specifies the end of the algorithm. It is generally a STOP statement and
the last instruction in the algorithm.
Example 1. Algorithm to compute the Sum of two numbers.

Algorithm : Sum of two numbers.


[Read the values of A and B]
Step 1 : Read A, B
Step 2 : [Compute the Sum]
Sum = A + B
Step 3 : [Print the Contents of the Sum ]
Print Sum
Step 4 : [End of the Algorithm]
Stop

Example 2. Algorithm to compute the area of circle

Algorithm : Area of Circle


Step 1 : Read Radius
Step 2 : [Compute the area ]
Area = 1 3.142 * Radius * Radius
Step 3 : [Print the Area ]
Print Area
Step 4 : [End of the Algorithm ]
Stop
3.2 Flowcharts
A Flowcharts is a pictorial or graphical representation of solution to any problem.
Flowcharts are constructed by using special geometrical symbols. Each symbol represents an
activity. The activity could be either input or output of data, computation or processing of data,
taking a decision or terminating the solution and so on. The symbols used in a flowchart are
joined by arrows.

3.2.1 Advantages of Flowcharts.


1. Flowcharts provide an excellent means of communication, which is very easy to under-
stand.
2. It has tot a definite procedure, which shows all the major parts of a program.
3. It is easy to convert it into a program.
4. It is indepent of programming language.
5. It is easy to debug as every step has got its own logical sequence.
Predefined Process
Example 1. Design a flowchart and an algorithm to find the area of a circle

START

INPUT
Radius

Area 3.142 * Radius * Radius

OUTPUT
Area

STOP

Example 2: Design a flowchart to find the sum of two numbers.

START

INPUT A,B

Sum A+B

OUTPUT
Sum

STOP
4. Code the program.
Translate the logic from the flow chart/Algorithm into a programming language. In this
stage the programmer uses an editor and creates a text file with comments describing the
algorithm and other useful information about the program, and program statements in a
particular programming language. The syntax of the programming language is used to
construct commands properly. If Algorithm was developed above, these make very good
comments and can help the programmer write the program(s).
5. Debugging
If any bugs are detected, return to the coding phase to eliminate them or correct errors
from program.
6. Test the program.
Check whether the program gives desired results. Run a number of test cases through
the program to demonstrate that it works.
7. Document the program.
This is the time for a formal document called the user manual to be produced. Most of
the program code should already contain adequate comments for documentation in the
coding phase. The comments in the code help write the user manual documentation.

Computer Virus:
Computer viruses are every where. Their very names give computer users a scare-klez, Melissa, my heart,
W32 and Michelangelo. With the use of the internet and endless communication between computers,
virus spreading faster than ever. The only way to prevent their growth is trough public awareness of safe
computing.
DEFINITION OF VIRUS:
A computer program, which is designed to replicate itself by copying itself into other program stored in a
computer. It may have a negative effect, such as causing a program to operate incorrectly or it may
corrupt a computers memory. OR
A computer is simply a set of computer instructions or computer code that is written by some
unscrupulous persons.
TYPES OF VIRUS: Virus can be divided into classes according to the environment.
i. File Virus: Either infect execution in various ways (parasitic-the most common type of virus), or cre -
ate file doubles (companion viruses),or use file system specific features(link virus)
ii. Boot Virus: Either save them selves in disk boot sector, or to the Master Boot Record, or change the
pointer to achieve boot sector.
iii. Macro Virus: Infect document files, electronic spreads sheets and database of several popular soft-
ware packages.
iv. Network Virus: Use protocols and commands of computer network or email to spread themselves.
ANTIVIRUS
Antivirus software is a special kind of program that is written to isolate or remove viruses from your
computer.
Some antivirus programs are installed and run as you need them. Other more advanced antivirus
can configured to automatically scan your computer for viruses and update them selves on a set schedule.
Viruses are usually very small programs that contain fragments of unique code. This code
fragments can be used as a method of identification, or ‘Fingerprints’. Antivirus companies then combine
these ‘fingerprints’ into one large data base called ‘Virus definition’
When an antivirus programs scans computer for viruses, it compares the contents of each file on
your computer to its database of virus definition. If it finds a match, generally a virus is present.
Some of the popular antivirus software’s are semantic, McAfee, Dr Solomon and sophos.
Computer security:
Computers are every where in today’s society. They are used to help control our telephone
communication networks, and to process our paychecks. The computers play a big role and have a big
responsibility. Mistakes can lead some one to loose his/her savings overnight, could lead to a loss of a life
should an advance medical equipment malfunctions or could cause a plane to crash.

You might also like