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

Chapter-1-Overview-of-Computer-Software-and-Programming-Languages

Uploaded by

coco30864
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Chapter-1-Overview-of-Computer-Software-and-Programming-Languages

Uploaded by

coco30864
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Overview of Computer

Software and
Programming
Languages
Chapter - 1

Prepared by C Programming
Kabin Devkota
Udita Bista
Number System
Decimal Number System(base 10)

uses symbols 0 to 9

position

place value
Number System

Decimal Number System(base 10)

decimal number 123 represents


=1*10^2 + 2*10^1 + 3*10^0
=1*100 + 2*10 + 3*1
=100 + 20 + 3
=123
Number System
Octal Number System(base 8)
uses symbols 0 to 7

position

place value
Number System
Octal Number System(base 8)

decimal equivalent of octal number 234 can be found as:


=2*8^2 + 3*8^1 + 4*8^0
=2*64 + 3*8 + 4*1
=128 + 24 + 4
=156
Number System
Hexadecimal Number System(base 16)
uses symbols 0 to 9 and A to F
A denotes 10, B denotes 11 and so on

position

place value
Number System
Hexadecimal Number System(base 16)
decimal equivalent of hexadecimal number B25 can be
found as:
=B*16^2 + 2*16^1 + 5*16^0
=11*256 + 2*8 + 5*1
=2816 + 32 + 5
=2853
Number System
Binary Number System(base 2)
uses symbols 0 and 1

decimal equivalent of binary number 1101 can be found as:


=1*2^3 + 1*2^2 + 0*2^1 + 1*2^0
=1*8 + 1*4 + 0*2 + 1*1
=8 + 4 + 0 + 1
=13
The bit
Smallest "unit" of data on a binary computer.

The nibble
collection of 4 bits

The Byte
8- bits
Byte represents 2^8 or 256 different values
Usually byte represents
unsigned numeric values in range 0 to 255
signed numbers in range -128 to +127
ASCII (American Standard Code for Information Interchange) character codes
other special data types requiring no more than 256 different values
The word
16-bits
can represent 2^16(65,536) different values
uses for words
16-bit integer data values
16-bit memory addresses

The double word


32 bits
used to represent 32-bit floating point value
Computer system
Software and its types
Set of coded commands or instructions that tells computer what to do
It is a part of computer system that instruct the hardware to perform
meaningful tasks.
Software is installed onto your computer and stored in mass storage devices.
There are two types of software:
System Software
Application Software
System Software

helps to run the computer's hardware and application programs


responsible for controlling, integrating and managing the individual hardware
components of a computer system
eg. OS, device drivers, programming tools
Application Software
software that is developed for particular use
these software run over the environment provided by the system software
specially designed and developed for end users
eg. Ms Office, different games, different anti-virus software
Application software can be classified into:
a. Tailored Software
b. Packaged Software
c. Utility Software
a.Tailored Software
software especially developed for some specific organization or other user
eg. Student Mangagement System

b. Packaged Software
different kinds of programs related to an application are combined together
to form a package
packages are common to many users
eg. Ms Word, Excel, Power point as a packaged software named Microsoft
Office
c. Utility Software
software designed to help to analyze, configure, optimize or maintain a
computer system
It is used to support the computer infrastructure
eg. Anti-virus, disk manager, etc.
Computer Program and
Programming Languages
Instruction
basic command that tells/instructs computer to do something

Program
set of instructions or command that is arranged in a sequence to guide a
computer to find solution for the given problem
a program when executed causes the computer to behave in a certain pre-
determined manner
contains statements and variables where variable represents various types of
data and statements are instructions
Features of Good Computer Program
1. Accuracy
2. Efficiency
3. Generality
4. Modularity
5. Clarity
6. Simplicity
Programming Languages
the process of developing and implementing computer program to solve a
program is known as computer programming
There are various programming languages used for programming purpose
Programming language helps to give instruction to the computer in a specific
standard way
Standard communication technique between user and computer
Generation of Programming Languages
First Generation(Machine Language)
first generation language
lowest level language
uses strings of 0's and 1's to give instructions and data to computer
instructions are entered through switches

Advantages Disadvantages
code or programs run all operation codes and memory addresses have to be
very fast remembered
no need of compiler or difficult to learn
assembler tough to debug errors
difficult to insert new instructions in already created programs
portability of programs are difficult because architecture of CPU
may be different for different computers
Second Generation(Assembly Language)
more descriptive and user friendly than machine language
uses large number of mnemonics to make programming easier rather than
strings of 1's and 0's as in machine languages
is also machine dependent
sometimes used in kernels and device drivers

Advantages Disadvantages
easier to understand programs are usually long
easier to locate and correct errors it is still complex
can be modified easily is machine dependent
needs assembler(a program to translate assembly
language to machine language)
Third Generation(Procedural Oriented Language)
designed to express the logic or the procedure of program
more programmer friendly
eg. FORTRAN, ALGOL, COBOL - early 3GL
C, C++, Java, C#, Python, Delphi

Forth Generation(Problem Oriented Language)


designed to solve specific problems by enabling user to describe what they
want rather than step-by-step procedure
eg. SQL, QBE, EXPRESS
Fifth Generation(Natural Language)
languages used in day to day activities
research activities are being carried out to develop programming language
that can use natural language as its code
main objective of natural languages is to make machine smarter
used in artificial intelligence and expert system

Advantages Disadvantages
more user friendly have to be translated to machine languages by a
programs are written fast and translator(compiler or interpreter) i.e. extra task
easier to maintain object code generated by translator might be
inefficient as compared to assembly language program
Language Processor and its types
a computer understands instructions in machine code
but it's not practical to write a computer program directly in machine code
the programs written in high level languages are called source code
this program cannot be directly executed by the computer and must be converted
into machine language to be executed, done by language processor
the program after translation into machine code is called object code
The language processors can be of three types:
a. Compiler
b. Assembler
c. Interpreter
Language Processor and its types
a. Compiler
the language processor that reads the complete source program written in high
level language as a whole in one go and translates it into an equivalent program in
machine language
eg. C, C++, C#, Java
source code is translated to object code if it is error free
the errors are specified at the end of compilation with line numbers in case of
presence of errors
Language Processor and its types
b. Assembler
it is used to translate the program written in assembly language into machine code

c. Interpreter
it translates single statement of source code into machine code and executes
immediately before moving on to the next line
if at any line, an error is encountered, interpreter terminates its translating process
directly executes instructions without previously converting them all into object
code or machine code
eg. Perl, Python, Matlab
End of Chapter 1

You might also like