Programming Principles and Techniques Session 2
Programming Principles and Techniques Session 2
rA
pt
ec
h
C
en
tre
U
se
O
nl
y
y
nl
O
Explain data storage in computers
se
Describe the evolution of computer languages
U
Identify aspects of programming
tre
en
List the different modeling tools for program
designing C
h
ec
pt
rA
Fo
y
nl
O
Computers can perform different functions and
se
calculations, but a computer cannot take a
U
decision as a human being.
tre
en
Computers have to be instructed or programmed
C
to perform certain task.
h
ec
se
almost similar for all programming tools.
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
Developed for the purpose of communication between the
se
different components and programs of a computer.
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
Machine Language
se
U
Assembly Language
tre
en
C
High Level Language
h
ec
se
memory or primary storage.
U
tre
Memory is classified into two types, namely,
en
primary storage and secondary storage.
C
h
ec
pt
rA
Fo
y
nl
O
Primary storage is a temporary storage.
se
Random Access Memory (RAM) is known as
U
the primary storage or the main memory.
tre
It is a volatile memory as the data
en
stored in it is lost when the power
is switched off. C
h
ec
pt
(Binary Digits).
y
nl
O
A byte can normally store one character.
se
U
The characters can be any one of the
tre
following:
en
Any number from 0 to 9
C
h
Capital letters from A to Z
ec
se
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
A non-volatile memory
se
U
Not directly accessible by the CPU
tre
en
Secondary storage devices used in a computer are as
follows:
Hard disk drives
C
h
ec
Flash memory
rA
Other storage
Fo
y
nl
O
Data is represented as raw, unorganized facts that
se
need to be processed.
U
tre
When this data is processed into organized
en
collection of useful and meaningful data it is
C
known as information.
h
ec
the data.
Fo
y
nl
O
A computer can only complete its task by
se
going through the following three stages.
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
A general purpose computer system consists
se
of the following hardware components:
U
Input/Output Device
tre
Control Unit
en
Memory
C
h
ec
pt
rA
Fo
y
nl
O
A hardware device that is used to receive data from the
computer user.
se
U
Different types of data such as audio, video, text, and
tre
so on can be provided by the user.
en
The commonly used input devices are as follows:
Keyboard
C
h
ec
Mouse
pt
Microphone
rA
Scanner
Webcam
Fo
y
nl
O
A hardware device that is used to display the processed
data to the computer user.
se
U
The output can be in both tangible and non-tangible
tre
format.
en
The commonly used output devices are as follows:
Monitor
C
h
ec
Printer
pt
Plotter
rA
Speakers
Projectors
Fo
y
nl
O
To write a program, two important aspects need to be
se
considered at the start.
U
These two aspects of programming are shown in the figure.
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
To design the logical solution, two modeling
se
tools are used.
U
1. Flowchart – A diagrammatic representation of
tre
an algorithm.
en
2. Pseudocodes – A representation of an algorithm
C
in a form that can easily be translated into
h
programming statements.
ec
pt
rA
Fo
y
nl
O
Languages are broadly categorized into three types namely, machine
language, assembly language, and high level language.
se
Machine language uses strings of 0s and 1s to represent instructions.
U
tre
Assembly language uses cryptic English like phrases for writing codes that
represent strings of numbers. High level languages use English words.
en
C
There are different types of codes for storing characters in memory such
as American Standard Code for Information Interchange (ASCII), Binary
h
Coded Decimal (BCD), and Extended Binary Coded Decimal Interchange
ec
Code (EBCDIC).
pt
se
provided, and generates the output.
U
tre
The two aspects of programming are understanding the
program specifications and designing the logical solution.
en
C
A flowchart is a diagrammatic representation of an
h
algorithm.
ec
pt