Tuesday, August 14, 2012

Software And Computer Program


Software

In loose terms, software refer to computer programs which serve as interface between the user and the hardware. Software can be categorized into two, namely:

1. System Software
- including operating system, compilers, linkers etc.
2. Application Software
- including word processor, spreadsheet, calculator etc.

Computer Program

A computer program is very much like an algorithm. However, it may not be finite, i.e., a program need not terminate after a finite number of steps. An example of such a program is an operating system.

Basically, a computer program is made up of two components:
1. Data
2. Instructions for manipulating data

A computer program is written using a certain computer programming language.
Computer Programming Language

A programming language describes the:
1. vocabulary (set of symbols and words)
2. syntax (rules)
3. semantics (meaning)
that are used to write a valid computer program.

Types of Computer Programming Languages
1. Low-Level Languages
Low-level languages include:
- machine language (lowest level, defined in terms of zero's and one's)
- assembly language (uses mnemonics)

They are called low-level because they require the programmers to have a good understanding of the underlying hardware for which the programs are intended to run
Programs written using low-level languages are not portable, i.e. they cannot be executed in two different and incompatible processors

2. High-Level Languages
High-level languages include:
- FORTRAN
- ALGOL
- COBOL
- PL/1
- BASIC
- Pascal
- C++
- Java

They are called high-level because (1) the language is quasi-English and (2) it does not require the programmer to know the actual computer hardware

The programs written in high-level languages are able to exhibit portability

Digital Computer


A digital computer is a machine (also called hardware) that is capable of storing data and executing algorithms. It is made up of the following physical components

1. Central Processing Unit (CPU)
2. Memory
2.1 Primary Memory
Read Only Memory (ROM)
Random Access Memory (RAM)
2.2 Secondary Memory
Includes magnetic, hard disk, floppy diskette, ZIP disk, CD-ROM
3. Input/Output Devices (I/O)
3.1 Input devices include keyboard, mouse, touchpad etc.
3.2 Output devices include display screen, printer, plotter

Algorithm


Algorithm (from "Fundamentals of Data Structures", by Horowitz & Sahni)

An algorithm is a finite set of instructions which, if followed, accomplish a particular task.

In addition, every algorithm must satisfy the following criteria:

1. Input: there are zero or more quantities which are externally supplied
2. Output: at least one quantity is produced
3. Definiteness: each instruction must be clear and unambiguous
4. Finiteness: if we trace the instructions of an algorithm, then for all cases, the algorithm will terminate after a finite number of steps
5. Effectiveness: every instruction must be sufficiently basic that it can in principle be carried out by a person using only pencil and paper. It is not enough that each operation be definite, but it must also be feasible.

What is Computer Science?


Algorithm-Centric View 
Computer science is viewed as the study of algorithms. This encompasses:
1. Machines for executing the algorithms
2. Languages for describing the algorithms
3. Foundation of algorithms
4. Analysis of algorithms

Data-Centric View 
Alternatively, computer science is viewed as the study of data. This encompasses:
1. Machines that hold data
2. Languages for describing data manipulation
3. Foundations which describe what kind of refined data can be produced from raw data
4. Structures for representing data

Combined View
Computer science can be defined as the study of data, its representation and transformation by a digital
computer.