You are on page 1of 65

Computer

Fundamental and
Programming
Prepared by: Mary Kris P. Morco
Professorial Lecturer
Today's Agenda

Programming Languages

Problem Solving using Computer

Number System
Introduction to Programming Languages
Programming Languages

Programming languages are the basic building blocks for all software, allowing people to
tell computers what to do and the means by which software are developed. A
programming language or computer language is a standardized communication
technique for expressing instructions to a computer. To communicate with computer, we
need to use language which computer can understand and process i.e. programs should
be written in computer understandable languages called programming languages.
Programming language consists of a set of characters, symbols and set of rules known as
syntax rule. Programmer has to follow all specified rules strictly to get desired results. In
general, programming language is a set of syntactic and semantic rules used to define
computer programs.
What is a
Programming
Languages?
A programming language is a formal
language comprising a set of strings that
produce various kinds of machine code
output. Programming languages are one
kind of computer language, and are used
in computer programming to implement
algorithms.
What is a Programming Language (contd...)
A programming language is a special language programmers use to
develop software programs, scripts, or other sets of instruction for
computers to execute.

Computer programming Like many human-based The portion of the


languages allow us to give languages, there is a range language that a computer
instructions to a computer of computer programming can understand is called a
in a language the computer languages ​that “binary.” Translating
understands. programmers can use to programming language into
communicate with a binary is known as
computer. “compiling.”
A programming language is a
set of written symbols that
instructs the computer
hardware to perform specific
tasks. Typically, a
programming language
consists of vocabulary and a
set of rules (called syntax)
that the programmer must
learn.
1. Python - is an advanced programming language that is
interpreted, object-oriented and built on flexible and robust
semantics.
2. Java - is a general-purpose, object-oriented, high-level
programming language with several features that make it ideal
for web-based development.
3. Ruby/Ruby on Rails - is an open-sourced, object-oriented
scripting language that can be used independently or as part of
the Ruby on Rails web framework.
4. HTML (HyperText Markup Language) - HTML is the standard
12 most important, markup language used to create web pages; it ensures proper
formatting of text and images (using tags) so that Internet
relevant and in- browsers can display them in the ways they were intended to
look.
demand programming 5. JavaScript - is a client-side programming language that runs
inside a client browser and processes commands on a computer
languages ​nowadays rather than a server. It is commonly placed into an HTML or
ASP file. Despite its name, JavaScript is not related to Java.

6. C Language - is a structure-oriented, middle-level
programming language mostly used to develop low-level
applications.
7. C++ - is a general purpose, object-oriented, middle-level
programming language and is an extension of C language,
which makes it possible to code C++ in a “C style”. In some
situations, coding can be done in either format, making C++ an
example of a hybrid language.
7. C++ - is a general purpose, object-oriented, middle-level
programming language and is an extension of C language, which
makes it possible to code C++ in a “C style”. In some situations,
coding can be done in either format, making C++ an example of a
hybrid language.
8. C# - Pronounced C-sharp (not C-hashtag), C# is a multi-
paradigm programming language that features strong typing,
imperative, declarative, functional, generic, object-oriented and
component-oriented disciplines.
9. Objective-C - is a simple, general-purpose and object-oriented
language. It uses a system of message passing borrowed from the
12 most important, language Smalltalk; when an object in Objective-C is sent a
message, it can choose to ignore or forward to another object,
relevant and in- rather than return a value.
10. PHP (Hypertext Preprocessor) - is an open-source scripting
demand programming language designed for creating dynamic web pages that effectively
work with databases. It is also used as a general-purpose
languages ​nowadays programming language.


11. SQL (Structured Query Language) - is a database query
language (not a development language) that allows for adding,
accessing and managing content in a database. It is the language
that allows programmers to perform the common acronym CRUD
(Create; Read; Update; Delete) within a database.
12. Swift - is Apple’s newest open-source, multi-paradigm
programming language for iOS and OS X apps. Swift integrates
Objective-C’s named parameters and object-oriented model, while
including an advanced compiler, debugger and framework
infrastructure.
Why do we Why are there
need a so many
Programming Programming
Language? Languages?
One language cannot serve all
These languages ​allow computers to
application areas well.
quickly and efficiently process large and
complex ranges of information. Different nations people speak
We need them because COMPUTERS different languages, in the same way
CAN'T UNDERSTAND ENGLISH AND for different purposes we need
HUMANS CAN'T EASILY WRITE different languages.
MACHINE CODE. Programming languages have evolved
Like many human-based languages, over time as different ways have been
there is a range of computer developed to design them.
programming languages ​that
programmers can use to communicate
with a computer.
Programming
languages are
generally classified in
two categories;
1. Low Level Language
2. High Level Language.
Low Level High Level
Language Language
A low level language is a High Level Language is much closer
programming language that is much to human language so it is more
closer to the hardware. It requires a suitable to write code in high level
thorough knowledge of the hardware language. It is more or less
for which the program is being independent of the particular type of
created. It can be divided into two computer used. And, High level
types, Machine Language and language are classified in two broad
Assembly Language. categories; they are procedure
oriented programming language and
object oriented programming
language.
Programming Language Classification
Machine Language (Low Level Language)
Computer understands only machine language that uses 0s and 1s.
It is the lowest level language that computer understands. In
machine language different instructions are formed by taking
combinations of 0s and 1s. The computer converts all high level
languages into machine language before executing any statements.
Machine language is written in binary form that a computer can
execute directly. These are also known as machine code or object
code. This language is not feasible for humans to use because it
consists entirely of binary numbers. This language is fastest in
terms of execution in the sense that it does not need to be
translated.
Advantage of Machine Disadvantage of Machine
Language Language
Machine Dependent : Program written in
Translation Free : Machine language is the
machine language are machine dependent
only language that computer understands.
and hence program developed for one
Program written in languages other than
system does not execute on other system.
machine language must be translated to
Complex Language for Programming : Since
machine language. However, the program
machine language consists only sequence of
written in machine language can be directly
0s and 1s, so it is very difficult for
executed without any translation.
programmer to remember and write each
High Speed : Since program written in
instructions.
machine language need not to be translated
Error Prone : While programming using
and hence conversion time is saved which
machine language everything need to be
enables execution of machine language
expressed in sequence of 0s and 1s which is
program extremely fast.
very tedious task. So errors are frequently
occurred while programming using machine
language.
Time Consuming : Writing program in
machine language is time consuming
process.
Assembly Language (Low Level Language)
Instruction formed by using 1s and 0s i.e. using binary numbers
are hard to remember and it is tedious to program using it. In
assembly language the binary bits are replaced by certain
keywords which are known as mnemonic. These mnemonics are in
fact abbreviated letters which are much easier to remember. This
language is easier to learn than machine language. An assembler is
used to convert assembly language into machine language. It is still
faster as compared to high level language but slower than lowest
level language (Machine language) due to the requirement of
translation.
Working of an Assembler
Advantage of Assembly Disadvantage of Assembly
Language Language
Machine Dependent:Program written in
Easy to Understand and Use: Assembly
assembly language are machine dependent
language uses mnemonic codes which are
and hence program developed for one
easy to use and remember. So, errors which
system does not execute on other system.
can occur while writing program using
Difficult to Learn :Since assembly language
assembly language are less as compared to
is machine dependent so every type of
writing program using machine language.
computer architecture requires a different
Also, assembler provides a way to locate
assembly language. Programmer need to
and correct errors.
study and understand different mnemonic
Speed: Program written in assembly
code according to the architecture used.
language executes faster than program
Slow Program Development Time:
written high level language.
Developing program in assembly language is
slow process as compared to high level
language.
High Level Language (Advantages,
Disadvantages & Types)
High level language is much closer to human language so it is more
suitable to write code in high level language. It is more or less
independent of the particular type of computer used (i.e. more
portable) and has its own set of rules called syntax. Its main
advantage is that it is easier to read, write and maintain. The first
high level programming languages were designed in the 1950s.
Now there are dozens of such languages available such as BASIC,
COBOL, C, C++, FORTRAN, LISP, PASCAL, prolog, etc. This
language is lot slower in terms of execution as compared to low
level language. Compiler or interpreter is used to convert high
level language to machine language.
Working of Compiler or Interpreter
Advantage of High Level Disadvantage of High
Language Level Language
Easy to Use and Understand : High level language Poor Control on Hardware: Since high level
uses English like words and they are closer to languages are away from hardware and
natural language which makes easy to learn and programmer does not need to be aware of
understand. Programmer need not to understand
hardware, accessing and controlling
detailed computer architecture for writing
hardware directly is difficult.
programs using high level language.
Machine Independent : Programs written in high Slow Execution: Program written in high
level language are portable and hence program level language need to be translated to
written using high level language can be machine language. This translation process
executed on any type of computer with little or increases the execution time of program.
no modification at all.
Debugging is Easy : High level language makes
easier to write and debug a program and gives
the programmer time to think about overall logic
rather than thinking about program code.
Because of the use of compilers and interpreters,
errors can be detected and located easily.
Easy to Maintain Program : Modification and
maintenance of program written in high level
language is easy compared low level language.
A high level language
can be further
categorized into:
1. Object oriented
2. Procedural programming
language.
Procedure Oriented Object Oriented
Programming Language Programming Language

Procedural programming is based upon the In object oriented programming; the data
idea of series of procedure calls. A (i.e. variables) and code are combined to
programmer writing program in this form objects. This allows more effective
language can exactly specify a sequence of code duplication which is not the case when
steps in order to perform a particular task. programs are divided into subroutines (or
Languages which express step-by-step functions). The required programming parts
algorithms written to solve a problem are can be called again and again within the
known as procedural languages. A program. Its main distinction with
procedure may be a program in itself that procedural programming is that in
may be called within a main program, a procedural programming task is divided
subroutine or another program. A into subroutines, structures and functions.
programmer knows exactly what is to be Whereas in object oriented programming,
accomplished at the end of the program and data as well as functions and subroutines
uses a sequence of algorithmic steps in are encapsulated to form objects. C++
order to achieve it. C language is example of language is example of object oriented
procedure oriented programming language. programming language.
Low level programming languages are machine dependent that
means program written in low level language are not portable.

High level language programming languages are machine


independent that means program written in high level language
Low vs High Level are portable.

Language Low level language programs are faster because they do not
(Differences) require much translation.

High level language programs are slower because they require


translation.

Major differences between


low level language and high Programming in low level language require knowledge of the
level language are pointed computer hardware.
out as :
Programming in high level language do not require knowledge of
the computer hardware.
Debugging and testing is difficult.
Low vs High Level
Debugging and testing is easier as compared to low level
Language language.

(Differences)
(contd...) Low level language provide no or less abstraction from hardware.

High level language provide high abstraction form hardware.

Major differences between


low level language and high Example : Machine language and Assembly language.
level language are pointed
out as : Example : C, Java, C++, Python etc.
Generations of Programming Languages

1GL 2GL 3GL 4GL 5GL

Machine Languages Assembly Languages Procedural Languages Non-procedural Intelligent Languages


(Low-level Languages) (Low-level languages) (High-level Languages) Languages (High-level Languages)
Machine code is any low-level Assembly language (or assembler A procedural language is a computer
(High-level Languages) Fifth-generation languages are used mainly
programming language, consisting of language), sometimes abbreviated asm, programming language that follows, in in artificial intelligence research. OPS5 and
In the non-procedural languages, the user has
machine language instructions, is any low-level programming language order, a set of commands. Examples of Mercury are examples of fifth-generation
to specify only “what to do” and not “how to
which is used to control a in which there is a very strong computer procedural languages are BASIC, languages. as is ICAD, which was built upon
do”. It is also known as an applicative or
computer's central processing unit correspondence between the C, FORTRAN, Java, and Pascal. Procedural Lisp. KL-ONE is an example of a related
functional language. It involves the
(CPU). Each instruction causes the instructions in the language and the languages are some of the common types of idea, a frame language.
development of the functions from other
CPU to perform a very specific task, architecture's machine code programming languages used by script and
functions to construct more complex
such as a load, a store, a jump, or an instructions. Because assembly depends software programmers.
functions. Examples of Non-Procedural
arithmetic logic unit (ALU) operation on the machine code instructions, every
languages: SQL, PROLOG, LISP.
on one or more units of data in the assembly language is designed for
CPU's registers or memory. exactly one specific computer

architecture. Assembly language may

also be called symbolic machine code.

Machine language is the only programming language that the


computer can understand directly without translation.
First Generation Also known as Machine code or Object code.
Languages [1GL] It is made up of entirely 1s and 0s.

There was no strict demarcation between first and second


generation languages in early days of its creation. In fact, the
terms were not used until third generation programming Machine Language machine-dependent(i.e.,itdepends on
language emerged. The first generation programming language
consisted entirely of binary numbers which were entered type of processor…).Programmers had to know the
through the front panel switches of the computer system; thus,
they are appropriately named as machine level language. The internal operations of specific type of CPU.
main and perhaps the only benefit in writing machine level
language is that the code written by the user does not require
any translation and hence can run very fast and efficiently. This
language is far more difficult to learn than other generational
programming languages and it is equally difficult to trace
errors, if any were to occur. Instructions (programs) are stored
in memory locations sequentially and therefore entire code
needs to be changed if insertion or deletion in the code needs
to be made. Furthermore, this generation of programming Very efficient code(high execution speed)but very difficult to write
language is significantly less portable than other generation of
languages.
Low-level language and Developed in 1950s.
Second Generation Uses symbolic addressing capabilities i.e.,symbolic operation code
Languages [2GL] replace binary operation code

Assembly level languages are suitably included in


second generation of programming language
since their creation immediately followed the An assembler is required to translate assembly language to
emergence of first generation programming machine language.
language. The tedious coding consisting entirely
of numbers is somewhat eliminated in this
language, since certain mnemonics are used in
place of numbers. However, translation is
required to convert these mnemonics into
machine code. Therefore, the coding process is
slower than machine language. The language is It is also machine dependent and it had its own limitations.
specific to particular processor or family thus less
portable than other higher generational
languages. Although primitive, this language is It provides an easier and more efficient way to program than
still widely used to program microcontrollers, machine language.
device drivers, etc.
High-level language and machine independent.

Third Generation Use english like statements and commands.

Languages [3GL] A language translator is required to convert a high-level language program into
machine language. Two types of language translators are used with high level
As a refined version of second generation languages: compilers and interpreters.
programming language, the third generation
programming language emerged which brought a
structured logic to the software, making One line of Third Generation Code can produce many lines of object code ,
programming more user friendly. The high level saving lots of time and is easier while writing programs.
languages of this generation are more English-like in
structure where each and every statement is taken
from natural language. The codes written in this 3GL are easy to write and maintain.
language need to be translated, which is done by a
compiler or interpreter. Due to this translation
process the codes run much slower. The codes are Examples :C,C++,Java , COBOL,BASIC(Beginners All Purpose Symbolic
easier to edit and debug and are machine
independent. A programmer does not require the
Instruction Code),FORTRAN(Formula Translation),ALGOL(Algorithmic
hardware and details of the machine being Language), APL(A Programming Language)
programmed. Examples of 3GL are C, C++, C#,
PASCAL, FORTRAN, JAVA, etc.
Advantages: Hardware Independence , time saving ,programmer friendly
Disadvantages: Code used might not make best use ofprocessor specific
features unlike 1GL ,2GL.
Also known as Very High Level Language.
Fourth Generation They allow programmers and users to specify what thecomputer
Languages [4GL] is supposed to do without having to specify howthe computer is
supposed to do it.
The fourth generation programming language is one step
ahead of the third generation programming language. So much easier than other generations.
There are fewer options for the programmers, but the
programs are much easier to write and debug than 3GLs.
There built in GUI (Graphical user interfaces) objects like
buttons, dropdown menus, add-ins, etc. and no separate
Used with Databases.
code needs to be written for them. These languages are
particularly developed with the viewpoint of solving a
particular class of problem. Given the right kind of
problem, the use of an appropriate 4GL can be Five basic types of language tools fall into the fourthgeneration
spectacularly successful. All 4GLs are designed to reduce language category.
programming effort, the time it takes to develop software,
and the cost of software development. Compilers and (1)Query languages
interpreters are still needed to convert it into machine
code. Thus a single line code in this language is equivalent (2)Report generators
to more lines of coding in lower level language. Therefore, (3)Applications generators.
the programs generated using these languages are larger
and much slower. For e.g. SQL, ORACLE, MATLAB, (4)Decision support systems and financial planning languages.
ColdFusion, CSS etc. (5)Some microcomputer application software
Fifth Generation Languages used for artificial intelligence and neural networks.

Languages [5GL] Also called as Intelligent and Natural languages.

The fifth generation programming language uses


human’s natural language as program source code. It is 5GL is a programming language designed to make the computer solve your
designed to make the computer solve the problem
without the programmer. The programmer only needs
problem.
to worry about what problems need to be solved and
what conditions need to be met, without worrying about Natural language allows end users to accessstored data and interact with the
how to implement a routine or algorithm to solve them.
Human languages by nature are full of ambiguity. A computer usingordinary words i.e., it resembles human speech.
single statement in natural language is intended to
provide a particular meaning can serve to present an
entirely new meaning altogether. But this ambiguity
cannot be handled by a computer which requires It can be said that 5GL is still in experimental phase.
specific and well defined instructions. Therefore, the
use of 5GL has not become a reality yet and is still in
the research phase. 5GLs are mostly used in artificial
intelligence research. Prolog, OPS5, Mercury, etc. are
examples of fifth generation languages.
Programming languages are broadly divided
into 2 groups:

TRADITIONAL OBJECTIVE ORIENTED


LANGUAGES LANGUAGES

Sequence of instructions. Objects are created rather


Some1GL,2GL,3GL languages than sequence of instructions.
come under this category Some 3GL,4GL,5GLcome this
Eg:COBOL,BASIC,C category.
Eg:Simula ,
Smalltalk,C++,JAVA , Python.
Special Programming Languages
Also called a "domain-specific language," a special-purpose language is a programming
language designed to solve a finite class of problems. For example, LISP and Prolog were
designed for AI. Tex was created for typesetting.

SCRIPTING COMMAND DOCUMENT FORMATTING WORLD WIDE WEB


LANGUAGES LANGUAGES LANGUAGES DISPLAY LANGUAGES

JavaScript , VBScript , bash, sh, ch. TeX, PostScript, SGML. HTML, XML
PHP, Perl, Python ,Ruby ,
JSP.
Problem Solving
Using Computer
Computer based problem solving is a systematic
process of designing, implementing and using
programming tools during the problem solving
stage. This method enables the computer system to
be more intuitive with human logic than machine
logic. Final outcome of this process is software tools
Problem Solving which is dedicated to solve the problem under
consideration. Software is just a collection of
Using Computer computer programs and programs are a set of
instructions which guides computer’s hardware.
(Steps) These instructions need to be well specified for
solving the problem. After its creation, the software
should be error free and well documented. Software
development is the process of creating such
software, which satisfies end user’s requirements
and needs.
1. Problem Analysis

2. Program Design - Algorithm, Flowchart and Pseudocode

The following six steps 3. Coding


must be followed to
solve a problem using 4. Compilation and Execution

computer.
5. Debugging and Testing

6. Program Documentation
1.Problem Analysis
Problem analysis is the process of defining a problem and decomposing
overall system into smaller parts to identify possible inputs, processes
and outputs associated with the problem.

This task is further subdivided into six sub-tasks namely:


1. Specifying the Objective
2. Specifying the Output
3. Specifying Input Requirements
4. Specifying Processing Requirements
5. Evaluating the Feasibility
6. Problem Analysis Documentation
2.Program Design
The second stage in software development or problem solving using computer
cycle is program design. This stage consists of preparing algorithms, flowcharts
and pseudocodes. Generally, this stage intends to make the program more user
friendly, feasible and optimized. Programmer just requires a pen and pencil in
this step in which the tasks are first converted into a structured layout without
the involvement of computer. In structured programming, a given task is divided
into number of sub-tasks which are termed as modules. Each process is further
divided until no further divisions are required. This process of dividing a program
into modules and then into sub-modules is known as “top down” design
approach. Dividing a program into modules (functions) breaks down a given
programming task into small, independent and manageable tasks.
Algorithms (Characteristics, Guidelines &
Advantages)
Algorithm Introduction

An algorithm is an effective step-by-step procedure for solving a problem in a finite


number of steps. In other words, it is a finite set of well-defined instructions or step-by-
step description of the procedure written in human readable language for solving a given
problem. An algorithm itself is division of a problem into small steps which are ordered in
sequence and easily understandable. Algorithms are very important to the way
computers process information, because a computer program is basically an algorithm
that tells computer what specific tasks to perform in what specific order to accomplish a
specific task. The same problem can be solved with different methods. So, for solving the
same problem, different algorithms can be designed. In these algorithms, number of
steps, time and efforts may vary more or less.
Characteristics of an Guidelines for Developing
Algorithm an Algorithm

Finiteness: An algorithm should An algorithm will be enclosed by


have finite number of steps and START (or BEGIN) and STOP (or
it should end after a finite time. END).
Input: An algorithm may have To accept data from user,
many inputs or no inputs at all. generally used statements are
Output: It should result at least INPUT, READ, GET or OBTAIN.
one output. To display result or any message,
Definiteness: Each step must be generally used statements are
clear, well-defined and precise. PRINT, DISPLAY, or WRITE.
Generally, COMPUTE or
There should be no any
CALCULATE is used while
ambiguity.
describing mathematical
Effectiveness: Each step must
expressions and based on
be simple and should take a situation relevant operators can
finite amount of time. be used.
Example of an Algorithm
Advantages of an Disadvantages of an
Algorithm Algorithm
Effective Communication: Since Developing algorithm for complex
algorithm is written in English like problems would be time consuming
language, it is simple to understand and difficult to understand.
step-by-step solution of the problems. Understanding complex logic through
Easy Debugging: Well-designed algorithms can be very difficult.
algorithm makes debugging easy so
that we can identify logical error in the
program.
Easy ann Efficient Coding: An
algorithm acts as a blueprint of a
program and helps during program
development.
Independent of Programming
Language: An algorithm is independent
of programming languages and can be
easily coded using any high level
language.
Flowcharts (Guidelines, Advantages &
Disadvantages)
Flowchart is basically a pictorial or diagrammatic representation of
an algorithm using standard symbols.

In other words, flowchart is a graphical representation that explains the sequence of


operations to be performed in order to solve a problem under consideration.
Standard Flowchart
Symbols

To express different operations in the flowchart various standard symbols


are used. All symbols are connected among themselves in order to show
the flow of information and processing. Different symbols as prescribed by
American National Standard Institute (ANSI) which are frequently required
while drawing flowchart are tabulated below:
Following guidelines must be followed while preparing the
flowcharts:

Guidelines for
Preparing Flowchart
Example of Flowchart
Advantages of Disadvantages of
Flowchart Flowchart
Effective Communication : Flowcharts Complex Logic: For complicated logic,
are better way of communicating the logic flowchart becomes complex and clumsy.
of the system. Difficulty in Modifications: If change is
Effective Analysis : Using flowchart required in the logic then flowchart needs
problem can be analyzed more efficiently. to be redrawn and requires a lot of time.
Easy Debugging and Efficient Testing :
The Flowchart helps in debugging and
testing process.
Efficient Coding : The flowcharts are very
useful during program development
phase.
Proper Documentation : Flowcharts
serves as a good program documentation,
which is needed for various purpose.
Efficient Program Maintenance :
Maintenance of operating programs
becomes easy with the help of flowchart.
Pseudocodes (Guidelines, Advantages &
Disadvantages)
Pseudocode is structured English for describing algorithms
concisely. It is made up of two words, namely, pseudo meaning
imitation and code meaning instructions. As the name suggests,
pseudocode does not obey the syntax rules of any particular
programming language i.e. it is not a real programming code. It
allows the designer to focus on main logic without being distracted
by programming languages syntax.
Following points should be remembered while preparing
pseudocode :

Guidelines for 1. Pseudocode will be enclosed by START (or BEGIN) and STOP
(or END).
Preparing 2. Pseudocode should be concise so ignore unnecessary details.
3. To accept data from user, generally used statements are INPUT,
Pseudocode READ, GET or OBTAIN.
4. To display result or any message, generally used statements are
PRINT, DISPLAY, or WRITE.
5. Generally used keywords are capitalized while preparing
pseudocode.
Example of Pseudocode
Advantages of Disdvantages of
Pseudocode Pseudocode
It allows the designer to focus on There are no accepted standards
main logic without being for writing pseudocodes and
distracted by programming designer use their own style while
languages syntax. writing pseudocodes.
Since it is language independent, Pseudocode cannot be compiled
it can be translated to any and executed so its correctness
computer language code. cannot be verified by using
It allows designer to express logic computers.
in plain natural language.
It is easier to write actual code
using pseudocode.
Unlike algorithms, pseudocodes
are concise so pseudocodes are
more readable and easier to
modify.
3.Coding (Programming)
In this stage, process of writing actual program takes place. A coded program is
most popularly referred to as a source code. The coding process can be done in
any language (high level and low level). The actual use of computer takes place in
this stage in which the programmer writes a sequence of instructions ready for
execution. Coding is also known as programming.
Comment clauses in the program help to make the program
readable and understandable by people other than the original
Good program programmer.
It should be efficient.
possess following It must be reliable enough to work under all reasonable
conditions to provide a correct output.
characteristics : It must be able to detect unreasonable error conditions and
report them to the end user or programmer without crashing
the system.
It should be easy to maintain and support after installation.
4.Compilation and
Execution Process
Generally coding is done in high level language or low level language (assembly
language). For the computer to understand these languages, they must be
translated into machine level language. The translation process is carried out by
a compiler/interpreter (for high level language) or an assembler (for assembly
language program). The machine language code thus created can be saved and
run immediately or later on.

In an interpreted program, each program statement is converted into machine


code before program is executed. The execution occurs immediately one
statement at a time sequentially. BASIC is one of the frequently used interpreted
language. In contrast to interpreter, a compiler converts a given source code into
object code. Once an object code is obtained, the compiled programs can be
faster and more efficient than interpreted programs.
Compilation Process
A source code must go through several steps before it becomes an
executable program. In the first step the source code is checked
for any syntax errors. After the syntax errors are traced out a
source file is passed through a compiler which first translates high
level language into object code (A machine code not ready to be
executed). A linker then links the object code with pre-compiled
library functions, thus creating an executable program. This
executable program is then loaded into the memory for execution.
Compilation Process
5.Debugging and Testing
Debugging is the process of fixing a bug in the
software. It can defined as the identifying, analyzing
and removing errors. Testing is the process to find
bugs and errors. Debugging is the process to correct
the bugs found during testing. It is the process to
identify the failure of implemented code.
Error means failure of compilation and execution of the computer
program or not getting expected results after execution. Debugging
and testing are systematic process during program development cycle
to avoid errors in the program. Different types of error that we
encounter while programming are listed below :

Error

Debugging Testing
Testing is performed to verify
Debugging is the process of
that whether the completed
finding errors and removing
software package functions or
them from a computer program,
works according to the
otherwise they will lead to
expectations defined by the
failure of the program. Even
requirements. Testing is
after taking full care during
generally performed by testing
program design and coding,
team which repetitively
some errors may remain in the
executes program with intent to
program and these errors
find error. After testing, list of
appear during compilation or
errors and related information
linking or execution. Debugging
is sent to program developer or
is generally done by program
developmen team.
developer.
Major differences between debugging and testing are pointed below :

Debugging:
It is the process of fixing errors.
Debugging is done during program development phase.
Debugging vs Debugging is done by program developer.

Testing Testing:
It is the process of finding as many errors as possible
Testing is done during testing phase which comes after development
phase.
Testing is generally carried out by separate testing team rather than
program developer.
6. Program Documentation
The program documentation is the process of collecting information about the
program. The documentation process starts from the problem analysis phase to
debugging and testing. Documentation consists two types of documentation, they
are:
1. Programmer's Documentation
2. User's Documentation
Programmer's User's Documentation
Documentation
User documentation is required for the end
user who installs and uses the program. It
Programmer’s documentation contains all the
technical details. Without proper documentation consists instructions for installation of the
it is very difficult even for the original programmer program and user manual.
to update and maintain the program. A
programmer’s documentation contains the
necessary information that a programmer requires
to update and maintain the program.
These information includes:
1. Program analysis document, with a concise
statement of program’s objectives, outputs and
processing procedures.
2. Program design documents with appropriate
flowcharts and diagrams.
3. Program verification documents for outlining,
checking, testing and correction procedures along
with the list of sample data and results.
4. Log used to document future program revision
and maintenance activity.
Number System
What is number
system?
A number system is a system
representing numbers. It is also
called the system of
numeration and it defines a set
of values to represent a
quantity. These numbers are
used as digits and the most
common ones are 0 and 1, that
are used to represent binary
numbers.
Thank you

for

listening!

You might also like