Lec - 1 Introduction To Computation: CE141 - Computer Concepts & Programming
Lec - 1 Introduction To Computation: CE141 - Computer Concepts & Programming
Dipsi Dave
1
CE141 - Computer Concepts & Programming 2017 - 18
What is Computer?
Computer is an electronic device used for storing, processing, and retrieving the
information.
Computer has mainly two components: hardware and software.
The hardware of the computers consists of physical parts of the system which are visible
as well as user can touch and feel it.
The parts of the hardware are circuit boards, chips, CPU, wires, Hard disk, Key board,
Mouse, Printers and so on.
A software of the computers is logical part of the computers and not visible to the users.
Users cannot directly communicate with hardware but users have to first communicate
with software and then software communicates with the hardware to complete work.
Block Diagram
2. Main memory:
It is also known as primary memory or internal memory.
It is used to store instructions and other information in Binary form (0 or 1).
This memory is also known as semiconductor memory because it is made by
semiconductor material like silicon.
It is divided into various types: RAM, ROM, PROM, EPROM, and EEPROM.
3. Input Section
Input section of a computer consists of the devices which are used to enter the
information into the computer from outside world.
The devices used to enter the input the computer are called input devices.
Example: Keyboard, Mouse, touch screen etc...
4. Output Section
Output section of a computer consists of devices used to send the information to the
outside world.
The devices used for output are known as output devices.
Example: Monitor, Printer, LCD, Speakers etc…
Classification of Computers
There are two types of data:
1. Digital data (Discrete data)
2. Analog data (Continues)
Computers are also classified based on their size, cost and configuration.
Dipsi Dave
4
CE141 - Computer Concepts & Programming 2017 - 18
Advantages Of Computers
The speed, accuracy, storage, reliability and automation are main advantages of
computers.
1. Speed:
The computer works at very high speed.
So we can perform large program in a few seconds.
Computer performs millions of operations in second.
2. Accuracy:
Computer performs the computations at very high speed without any mistakes.
There are many applications which need high degree of accuracy.
For example, in space application the path of the rocket is computed by computers
without any mistakes.
3. Storage:
Computers store large information using various storage devices available with
computers.
They not only store large information but also make them available when it is required
for processing.
The storage includes both primary memory and secondary memory.
4. Reliability:
Computer is a very reliable device.
The information stored today in computer is available after years in same form.
Dipsi Dave
5
CE141 - Computer Concepts & Programming 2017 - 18
5. Automation:
Once the one task is created in computers, it can be performed by single click any time.
For example, once the software for banking application is installed in computer, it
calculates the interest quarterly or half yearly by just sending one command.
The automation makes it possible to perform complex work by a click of command or
button.
Limitations Of Computers
1. Lack of Intelligence:
Humans have natural intelligence which makes them use common sense when any work
in done. Computer cannot think while doing work as it does not have natural intelligence.
Computer only executes the instructions provided by human user.
Computer Software
Software is a one type of program that contains sequence of instructions to perform
certain functionality.
There are two types of software :
1. System software
2. Application software
Dipsi Dave
6
CE141 - Computer Concepts & Programming 2017 - 18
1. System Software
System software is designed to operate the computer hardware.
It is also provide platform for running application software.
Types of system software:
a. Operating system
b. System support software
c. System development software
b. System support Software: it mange the hardware more efficiently. Ex: Drivers of the
I/O devices, Antivirus software's.
Driver is a one type of interfacing program which can interacts between I/O devices and
O.S.
Antivirus programs remove viruses from the computer.
2. Application Software
Application software is designed to perform specific user applications.
There are two categories of application software :
a. General-purpose software: Microsoft Office, Oracle etc.
b. Specific-purpose software: tax calculation software, pay-roll system, banking
software's….etc.
The most important categories of software packages are as follows:
a. Database management software
b. Graphics software
c. Data communication software
Dipsi Dave
7
CE141 - Computer Concepts & Programming 2017 - 18
Assembly language:
o The Assembly language is written using set of instructions (mnemonics).
o Assembly language programming is also low level language
o Computer requires assembler to translate assembly language into machine language.
Advantages of Assembly language :
o The program is easy to describe because of instructions.
Dipsi Dave
8
CE141 - Computer Concepts & Programming 2017 - 18
o The programs are very easy to understand or debug. 3. It is required less time to
write the program.
Disadvantages of Assembly language :
o It is required assembler to translate assembly language into machine language.
o Programmer needs to learn the structure of assembly language and syntax of every
statement.
o Assembly language programs are not portable because it is dependable on
machine.
Translator: The translator translates high level language into low level language. There
are three types of translator:
1. Assembler
2. Compiler
3. Interpreter
1. Assembler: Assembler converts assembly language into machine level language.
2. Compiler: Compiler converts high level language into low level language. First
Compiler accept high level program as input. After it checks the program for any
errors if there is no any error in the program then compiler convert High level
program into low level language. If there is any errors then compiler display list of
errors.
3. Interpreter: Interpreter converts high level language into low level language.
Dipsi Dave
9
CE141 - Computer Concepts & Programming 2017 - 18
First Interpreter accept high level program as input. After it checks the first
statement of the program for error if there is not any error in the first statement
then interpreter convert the statement into low level language. If there is any error
then compiler displays that error. This process is repeated until all the statement in
the program is checked.
Note: Compiler convert whole high level program into low level program. Interpreter converts
high level language into low level program statement by statement.
Types of Languages:
1. Interpreted Programming Languages
2. Functional Programming Languages
3. Compiled Programming Languages
4. Procedural Programming Languages
5. Scripting Programming Languages
6. Markup Programming Languages
7. Logic-Based Programming Languages
8. Concurrent Programming Languages
9. Object-Oriented Programming Languages
Dipsi Dave
10
CE141 - Computer Concepts & Programming 2017 - 18
compiled into machine code. Ex: BASIC, Pascal, Python, JavaScript, Lisp, MATLAB,
Perl, PHP, Ruby, Tcl., Windows PowerShell etc…
b. Functional Languages: Functional programming languages define every computation as
a mathematical evaluation. They focus on the application of functions. Many of the
functional programming languages are bound to mathematical calculations. Ex:
Pure Impure
Agda, Frege, Hope, Mercury, QML, C++, C#, Curl, OPSS, Python, Ruby, Lisp
Clean, Hakell, Owl Lisp
c. Compiled Languages: A compiled language is a programming language whose
implementations are typically compilers (translators that generate machine code from
source code), and not interpreters (step-by-step executors of source code, where no pre-
runtime translation takes place). Ex: C, C++, C#, COBOL, Cobra, FORTRAN, JAVA,
Visual Basic etc…
d. Procedural Languages: Procedural (imperative) programming implies specifying the
steps that the programs should take to reach to an intended state. A procedure is a group
of statements that can be referenced through a procedure call. Procedures help in the
reuse of code. Procedural programming makes the programs structured and easily
traceable for program flow. Ex: Bliss, Component Pascal, MATLAB, PL/C etc…
e. Scripting Languages: Scripting languages are programming languages that control an
application. Scripts can execute independent of any other application. They are mostly
embedded in the application that they control and are used to automate frequently
executed tasks like communicating with external programs. Ex: AppleScript, MEL (Maya
Embedded Language), PHP, Tcl, VBScript etc…
f. Markup Languages: A markup language is an artificial language that uses annotations
to text that define how the text is to be displayed. Ex: Curl, HTML, XML, XHTML etc…
g. Logic Based Languages; Logic programming is a type of programming paradigm which
is largely based on formal logic. Any program written in a logic programming language
is a set of sentences in logical form, expressing facts and rules about some problem
domain. Ex: Prolog, Poplog, Oz etc…
h. Concurrent Languages: Concurrent programming is a computer programming
technique that provides for the execution of operations concurrently — either within a
single computer, or across a number of systems. In the latter case, the term distributed
computing is used. Ex: Concurrent Pascal, Limbo, SALSA etc…
i. Object Oriented Languages: Object-oriented programming (OOP) is a programming
paradigm based on the concept of “objects”, which may contain data, in the form of
fields, often known as attributes; and code, in the form of procedures, often known as
methods. In OOP, computer programs are designed by making them out of objects that
interact with one another. Ex: JavaScript (first named Mocha, then LiveScript), C++, C#,
GNU E etc...
Dipsi Dave
11