Professional Documents
Culture Documents
TECHNOLOGY
NOTES
MARICI MAHARAJH
Table of Contents
SECTION 1: COMPUTER FUNDAMENTALS AND INFORMATION
PROCESSING .................................................................................................................. 9
COMPUTER FUNDAMENTALS ............................................................................... 9
OBJECTIVE 1: EXPLAIN THE CONCEPT OF INFORMATION
TECHNOLOGY ......................................................................................................... 9
OBJECTIVE 2: Distinguish among the major types of computer systems in
terms of processing speed, storage and portability. ......................................... 9
WHAT IS A COMPUTER? ................................. Error! Bookmark not defined.
COMPUTER SYSTEMS ............................................................................................ 13
THE MAIN FUNCTIONS OF A COMPUTER SYSTEM ................................... 14
CATEGORIES OF COMPUTER HARDWARE...................................................... 15
THE CENTRAL PROCESSING UNIT (CPU) ................................................... 16
THE CONTROL UNIT (CU) ................................................................................ 16
THE ARITHMETIC / LOGIC UNIT (ALU) ..................................................... 17
MAIN MEMORY .................................................................................................... 17
PERIPHERAL DEVICES ........................................................................................... 19
TECHNICAL TERMS USED WITH THE STORAGE OF DATA..................... 19
BISTABLE DEVICES .............................................................................................. 20
COMPUTER DEVICES FOR INPUT AND OUTPUT .............................................. 21
INPUT DEVICES ..................................................................................................... 35
POINTING DEVICES ......................................................................................... 35
SCANNERS ........................................................................................................... 36
OTHER DEVICES ................................................................................................ 38
INPUT DEVICES ..................................................................................................... 40
MANUAL INPUT DEVICES .................................................................................. 40
DIRECT DATA ENTRY DEVICES ......................................................................... 41
OUTPUT DEVICES .................................................................................................. 43
SECONDARY STORAGE DEVICES AND MEDIA................................................. 21
SECONDARY STORAGE TERMS ......................................................................... 27
INTERFACE .............................................................................................................. 29
ADVANTAGES AND DISADVANTAGES OF STORAGE DEVICES............. 31
MAGNETIC MEDIA ................................................................................................. 31
OPTICAL STORAGE ............................................................................................... 32
HOW DATA IS STORED IN THE COMPUTER ................................................... 50
HOW DATA IS REPRESENTED .......................................................................... 50
BINARY NUMBER SYSTEM ................................................................................. 52
Page 1 of 176
CONVERTING A NUMBER FROM BASE 2 TO BASE 10 ............................... 52
CONVERTING A NUMBER FROM BASE 10 TO BASE 2 ............................... 53
BINARY ADDITION .............................................................................................. 54
BINARY CODED DECIMAL (BCD) ....................................................................... 55
REPRESENTING NEGATIVE NUMBERS .......................................................... 56
ONES COMPLEMENT ......................................................................................... 56
TWOs COMPLEMENT ........................................................................................ 57
SIGN AND MAGNITUDE .................................................................................. 57
ASCII CODES .......................................................................................................... 58
BINARY SUBTRACTION ...................................................................................... 59
OCTAL NUMBERS .................................................................................................... 61
CONVERTING FROM DECIMAL TO OCTAL ................................................. 61
CONVERTING FROM OCTAL TO DECIMAL ................................................ 63
ADDING OCTAL NUMBERS ............................................................................. 63
SUBTRACTING OCTAL NUMBERS ................................................................ 64
CONVERTING DECIMAL TO HEXADECIMAL ................................................ 64
CONVERTING HEXADECIMAL TO DECIMAL ................................................ 68
SOFTWARE .................................................................................................................. 72
OPERATING SYSTEM ........................................................................................... 73
Functions of an Operating System ...................................................................... 73
USER INTERFACE .................................................................................................. 75
SOFTWARE USER INTERFACE .......................................................................... 75
GRAPHICAL USER INTERFACE (GUI) .......................................................... 75
COMMAND DRIVEN INTERFACE .................................................................. 76
MENU DRIVEN INTERFACE ............................................................................ 76
HARDWARE USER INTERFACE...................................................................... 76
PROCESSING MODES ........................................................................................... 77
BATCH PROCESSING ........................................................................................ 77
ONLINE PROCESSING...................................................................................... 77
REAL-TIME PROCESSING ............................................................................... 78
TIME SHARING .................................................................................................. 78
MANAGING PROCESSES AND TASKS ............................................................ 78
1. MULTITASKING .......................................................................................... 78
2. MULTIPROCESSING ............................................................................... 78
3. MULTIPROGRAMMING .......................................................................... 78
APPLICATION SOFTWARE ................................................................................. 79
GENERAL-PURPOSE ........................................................................................... 79
SPECIALISED APPLICATION ......................................................................... 79
Page 2 of 176
CUSTOM-WRITTEN .......................................................................................... 79
INTEGRATED SOFTWARE .............................................................................. 80
DATA COMMUNICATION ........................................................................................ 81
1. NARROW-BAND ................................................................................................ 81
2. VOICE-BAND .................................................................................................. 81
3. BROAD-BAND................................................................................................. 81
1. SIMPLEX .......................................................................................................... 81
2. HALF-DUPLEX ............................................................................................ 81
3. DUPLEX (FULL DUPLEX) .......................................................................... 81
4. POINT-TO-POINT ................................................................................... 82
5. BROADCAST .............................................................................................. 82
PROTOCOL ................................................................................................................ 82
BLUETOOTH .............................................................................................. 82
Wi-Fi ............................................................................................................. 82
NETWORKS .................................................................................................................. 83
LOCAL AREA NETWORKS (LAN) ....................................................................... 83
WIDE AREA NETWORK (WAN) ......................................................................... 84
METROPOLITAN AREA NETWORK (MAN) ..................................................... 84
TRANSMISSION MEDIA .................................................................................... 84
TWISTED PAIR CABLES ........................................................................ 84
COAXIAL CABLE ....................................................................................... 85
FIBRE-OPTIC CABLE ............................................................................... 85
WIRELESS CONNECTIONS ................................................................................ 85
INFRA-RED SIGNALS ............................................................................ 85
MICROWAVE SIGNALS ......................................................................... 85
SATELLITE LINKS .................................................................................. 86
MODEM (MODULATOR/DEMODULATOR) ...................................................... 86
TERMS ASSOCIATED WITH DATA COMMUNICATION .......................... 86
1. UPLOAD........................................................................................................... 86
2. DOWNLOAD............................................................................................... 86
3. BULLETIN BOARD ................................................................................... 86
PROTECTING AND SECURING INFORMATION .............................................. 87
PASSWORDS ........................................................................................................... 87
ENCRYPTION ........................................................................................................... 88
PHYSICAL ACCESS RESTRICTIONS ............................................................... 88
SOFTWARE ACCESS RESTRICTIONS ............................................................ 88
VIRUS PROTECTION............................................................................................. 89
ANTI-VIRUS SOFTWARE ................................................................................... 89
Page 3 of 176
FIREPROOF CABINETS ........................................................................................ 89
FIREWALLS.............................................................................................................. 89
BACK-UP AND RECOVERY .................................................................................... 90
ARCHIVING .............................................................................................................. 90
DATA CORRUPTION .............................................................................................. 90
SOFTWARE RIGHTS ............................................................................................. 90
TROUBLESHOOTING AND COMPUTER MAINTENANCE .............................. 92
COMPUTER MAINTENANCE ............................................................................... 92
SCANNING DISKS FOR ERRORS ...................................................................... 92
DEFRAGMENTING OF THE FILE SYSTEM ..................................................... 92
BASIC TROUBLESHOOTING .............................................................................. 93
APPLICATIONS AND IMPLICATIONS OF IT ................................................... 99
EXPERT SYSTEMS.................................................................................................. 99
ROBOTS..................................................................................................................... 99
CAD – COMPUTER AIDED DESIGN ................................................................... 99
CADD – COMPUTER AIDED DESIGN AND DRAFTING ............................... 99
CAM – COMPUTER AIDED MANUFACTURING ............................................. 100
CAE – COMPUTER AIDED ENGINEERING ..................................................... 100
COMPUTER –ASSISTED ASSESSMENT (CAA) ............................................ 100
COMPUTER ASSISTED LEARNING (CAL) / COMPUTER AIDED
INSTRUCTION (CAI) ........................................................................................... 100
CML/CMI .................................................................................................................. 101
ADVANTAGES OF INFORMATION TECHNOLOGY IN EDUCATION ... 101
DISADVANTAGES OF INFORMATION TECHNOLOGY IN EDUCATION
..................................................................................................................................... 102
CLOUD COMPUTING ............................................................................................. 102
WEARABLE TECHNOLOGY ................................................................................. 102
SMART OBJECTS .................................................................................................. 103
CURRENT TRENDS IN TECHNOLOGY ................................................................ 104
TELECOMMUTING ................................................................................................ 104
VIDEOCONFERENCING AND TELECONFERENCING ................................. 104
ADVANTAGES .................................................................................................... 105
DISADVANTAGES............................................................................................. 105
TELECONFERENCING .......................................................................................... 105
MEASURES TO REDUCE INFORMATION MISUSE ........................................ 107
INFORMATION MISUSE ................................................................................... 107
UNAUTHORISED COLLECTION OF INFORMATION ................................ 107
INDUSTRIAL ESPIONAGE ............................................................................. 107
Page 4 of 176
ELECTRONIC ESPIONAGE ............................................................................. 107
ELECTRONIC SURVEILLANCE....................................................................... 108
ELECTRON EAVESDROPPING ........................................................................ 108
WAYS TO REDUCE MISUSE OF INFORMATION ....................................... 108
DATA PROTECTION LAWS ................................................................................ 108
PIRACY ...................................................................................................................... 109
COMPUTER FRAUD ................................................................................................ 109
Identity theft ........................................................................................... 109
Credit card fraud ..................................................................................... 109
INFORMATION TECHNOLOGY: JOB SKILLS AND CAREERS .................... 110
ROLES OF PERSONNEL IN COMPUTER RELATED PROFESSIONS ....... 110
PROGRAMMERS .................................................................................................. 110
SYSTEMS PROGRAMMER ................................................................................ 110
SYSTEM ANALYSTS AND DESIGNERS ..................................................... 110
MANAGERS ......................................................................................................... 110
DATABASE ADMINISTRATORS .................................................................. 110
NETWORK ADMINISTRATORS..................................................................... 111
DATA-ENTRY CLERKS ....................................................................................... 111
COMPUTER OPERATORS .................................................................................. 111
LIBRARIANS........................................................................................................ 111
TECHNICIANS .................................................................................................... 111
COMPUTER ENGINEERS .................................................................................. 111
CONSULTANTS ................................................................................................. 112
DATA COMMUNICATIONS SPECIALISTS ............................................... 112
COMPUTER TRAINERS .................................................................................... 112
ELECTRONIC DATA-PROCESSING AUDITORS (EDP) ........................... 112
PROBLEM SOLVING AND PROGRAM DESIGN.................................................. 113
INTRODUCTION TO PROGRAMMING ............................................................ 113
ALGORITHM PHASE ......................................................................................... 113
IMPLEMENTATION PHASE ........................................................................... 114
DEFINING THE PROBLEM .................................................................................. 114
INPUT – OUTPUT – PROCESSING (IPO) CHARTS or DEFINING
DIAGRAMS .............................................................................................................. 115
ALGORITHM DESIGN .......................................................................................... 119
PSEUDOCODE ......................................................................................................... 119
VARIABLES ............................................................................................................. 120
BASIC DATA TYPES FOR VARIABLES............................................................ 121
CHOOSING VARAIBLE NAMES .................................................................... 122
Page 5 of 176
ALGORITHMIC STRUCTURE.............................................................................. 122
READING AND WRITING IN ALGORITHMS ............................................... 123
WRITING INSTRUCTIONS ........................................................................... 123
PROMPTING INSTRUCTIONS ...................................................................... 123
OUTPUT INSTRUCTIONS .............................................................................. 123
OUTPUTTING A STRING CONSTANT ....................................................... 124
OUTPUTTING A STING CONSTANT AND A VARIABLE ...................... 124
CONVERTING THE IPO CHART TO AN ALGORITHM ................................ 124
CONTROL STRUCTURES ..................................................................................... 126
SEQUENTIAL STATEMENTS........................................................................ 126
SELECTION STRUCTURES ............................................................................. 127
INITIALISING A VARIABLE ............................................................................ 128
LOOPS ................................................................................................................... 132
FLOWCHARTS ........................................................................................................ 139
ARITHMETIC OPERATORS ................................................................................ 140
RELATIONAL OPERATORS ................................................................................ 141
CONDITIONAL AND LOOPING OPERATORS .............................................. 141
BOOLEAN OPERATORS ....................................................................................... 142
Truth table for NOT ......................................................................................... 142
Truth table for AND ......................................................................................... 142
Truth Table for OR ............................................................................................ 143
TESTING ALGORITHMS ..................................................................................... 143
DRY –RUN TESTING ......................................................................................... 143
TRACE TABLES ................................................................................................... 144
WHAT IS A COMPUTER PROGRAM? ............................................................... 145
COMPUTER LANGUAGES..................................................................................... 145
1. MACHINE LANGUAGE ............................................................................... 145
2. ASSEMBLY LANGUAGE / LOW LEVEL LANGUAGE....................... 146
3. HIGH LEVEL LANGUAGE....................................................................... 146
COMPARISON OF THE DIFFERENT LEVELS OF LANGUAGES ............... 147
GENERATION OF LANGUAGES ........................................................................ 148
IMPLEMENTING A PROGRAM ........................................................................... 150
TESTING AND DEBUGGING .............................................................................. 151
SYNTAX ERRORS .............................................................................................. 151
LOGIC ERRORS................................................................................................... 151
RUN-TIME ERRORS .......................................................................................... 151
TYPES OF TESTING ............................................................................................. 151
VALIDATION AND VERIFICATION ............................................................... 152
Page 6 of 176
DOCUMENTING PROGRAMS .............................................................................. 152
INTERNAL DOCUMENTATION .................................................................... 153
EXTERNAL DOCUMENTATION .................................................................... 153
PROGRAMMING IN PASCAL .............................................................................. 154
WRITING PROGRAMS IN PASCAL .............................................................. 154
DECLARING DATA TYPES............................................................................... 155
VARIABLES AND CONSTANTS .................................................................... 155
PASCAL RESERVED WORDS........................................................................... 156
PUNCTUATION .................................................................................................. 156
INITIALISING A VARIABLE ........................................................................ 157
DECLARING CONSTANTS .............................................................................. 157
MANIPULATING DATA ................................................................................... 157
INPUT AND STORAGE ..................................................................................... 157
PROCESSING .......................................................................................................... 158
OUTPUT ................................................................................................................ 158
CONTROL STRUCTURES ................................................................................. 159
EXAMPLE of Pascal Code: ................................................................................. 159
ARRAYS .................................................................................................................... 160
DECLARING ARRAYS........................................................................................ 160
FULL PASCAL PROGRAM WITH AN ARRAY .................................................. 162
PROCEDURES .......................................................................................................... 162
INFORMATION PROCESSING .............................................................................. 164
INFORMATION AS A COMMODITY ............................................................... 166
FORMS OF INFORMATION PROCESSING ................................................... 166
COMMERCIAL INFORMATION PROCESSING ......................................... 166
INDUSTRIAL INFORMATION PROCESSING .......................................... 167
SCIENTIFIC INFORMATION PROCESSING............................................ 167
SOURCES OF DATA .............................................................................................. 168
SOURCE DOCUMENT ........................................................................................ 168
TURNAROUND DOCUMENT ........................................................................... 168
DATA LOGGING ..................................................................................................... 168
VALIDATION AND VERIFICATION ............................................................... 169
DATA VERIFICATION ..................................................................................... 169
DATA VALIDATION ......................................................................................... 170
FILE ORGANISATION AND ACCESS ............................................................. 172
MASTER AND TRANSACTION FILES ........................................................ 173
FILE ORGANIZATION AND ACCESS METHODS ....................................... 174
SEQUENTIAL AND SERIAL........................................................................... 174
Page 7 of 176
RANDOM FILE ORDERING AND ACCESS .................................................. 174
INDEX SEQUENTIAL FILE ORDERING AND ACCESS .......................... 175
Page 8 of 176
SECTION 1: COMPUTER FUNDAMENTALS AND INFORMATION
PROCESSING
COMPUTER FUNDAMENTALS
Page 9 of 176
The different categories of computers include super computers,
computer is made for a unique use, and they have varying capabilities.
Page 10 of 176
instructions in a matter of seconds, and
data at once.
simultaneously (multitasking).
Page 11 of 176
MOBILE DEVICES A mobile device is a general term for any
Page 12 of 176
OBJECTIVE 3: Explain the functions of the major hardware components
of a computer system.
COMPUTER SYSTEMS
A computer system is a combination of computer hardware and software.
the monitor or the keyboard. In other words, the parts of the computer you
Page 13 of 176
can touch are all hardware. Software is the term that is used to refer to
the programs that run on the hardware. Neither one is much use without
the other; since without hardware, you would not be able to run software nor
without software, you would just have an expensive piece of equipment that
does nothing.
Page 14 of 176
can process them.
computer.
HARDCOPY OR SOFTCOPY.
computer.
1. The processor - The Central Processing Unit (CPU). The speed of the
Page 15 of 176
The number operations per second is measured in hertz (Hz),
3. Output devices, which are used for outputting (‘sending out’) data
computer that does the processing. It also controls the transfer of data
between memory and the other devices that make up the computer system.
• Main Memory
the processor, so that they carry out the right tasks, in the right order.
Page 16 of 176
3. To read and interpret program instructions (instructions that allow
MAIN MEMORY
FUNCTIONS OF MAIN MEMORY
• The contents in this type of memory are temporary and are lost
not lost when the computer is turned off (the data is NON-
Page 17 of 176
VOLATILE).
the computer.
manufacturers
adds the instructions later. Then they are fixed and cannot be
changed.
can be done several times as opposed to a ROM chip, which can only
be programmed once.
The diagram below shows the components of the basic computer system.
CU
ALU
INPUT OUTPUT
MAIN MEMORY
SECONDARY
STORAGE
Page 18 of 176
PERIPHERAL DEVICES
Peripherals device are those hardware devices that are externally connected
Binary Digit.
is measured in bytes.
cycle
Page 19 of 176
instruction is stored.
BISTABLE DEVICES
A BISTABLE device is a device that can exist in one of two possible states.
It can be compared to an on/off switch. You would have already come across
either up or down.
NUMBER OF BYTES
thousand
(1,099,511,627,776)
Page 20 of 176
SECONDARY STORAGE DEVICES AND MEDIA
From magnetic tape and hard disks to CD-ROMS and DVD-ROMS, several
secondary storage devices are available - each with a slightly different use.
What all have in common is that each is used to store programs and data so
MAGNETIC TAPE
useful for this purpose since it is very cheap. Magnetic tape comes in the
form of a reel or cartridge and is made of plastic that is coated with a metal
oxide.
The tape is divided into parallel rows known as TRACKS. Tracks 1 to 8 each
store a bit in a byte. Track nine is called the PARITY TRACK. It is used as
a method of checking the accuracy of the data. Each group of nine bits (one
FRAME
TRACK NO.
1 0
2 1
3 0
4 1
Page 21 of 176
5 1
6 0
7 0
8 1
(Parity) 9 1
There are two types of PARITY: ODD PARITY and EVEN PARITY. If data
is stored using Odd parity, then the number of ones in each frame should
always be odd. So when each byte is being recorded, the computer checks
the number of ones. If it was Even, the corresponding bit in the parity
track is set to one, therefore making the number of ones odd. If it was
odd, the parity track is set to zero. Therefore, when the computer is
reading the tape and it comes across a group of bits with an even number of
ones, it will know that something is wrong. Even parity works in a similar
manner.
read using a magnetic tape drive. Data is accessed sequentially, which means
that the data is accessed in order in which it was stored. Magnetic tape is
used for:
Page 22 of 176
➢ Data entry using a key-to-tape device
➢ Archiving data.
FLOPPY DISK
documents so that they can be used on more than one computer. Like
magnetic tape, this is divided into tracks. However, these tracks are in the
Page 23 of 176
TRACK – a ring-shaped are of disk
A hard disk is a large capacity, rigid magnetic disk that is used for storing
data. Data is read from or written to a hard disk using an arm-like device
Page 24 of 176
the disk (store it on the disk) and to read data from the disk. Data can be
fixed head.
A moving read/write head moves on the track that corresponds to the data
while the disk is spinning. A fixed read/write head does not move. Instead,
there is a fixed head for each track. This gives the fixed-head system the
advantage of having a faster access time. The access time is the time it
takes for the data to be accessed. This faster access time is because of
the faster seek time (the time it takes the read/write head to get to a
The term hard drive refers to a collection of hard disks and read/write
heads. Each disk (or PLATTER) surface can have its own read/write head(s)
randomly (directly).
MICROFILM
Microfilm can be used to hold tiny images – for example, of old newspapers
viewers.
Page 25 of 176
OPTICAL DISK
Optical disks will eventually make the magnetic disk and magnetic tape
storage devices, the optical disk uses two laser beams. One beam writes to
the recording surface by burning small pits (holes) into the disk, while the
other lower density beam is used to read the data from the surface. Using
this technology, which is a direct access method, data can be stored at very
high densities, accounting for the huge storage capacities of these media.
Optical disks tend to be more reliable than the other secondary storage
devices and they also cost less. Four common forms of optical disks are:
➢ Read only
➢ Erasable – CD-RW
Page 26 of 176
➢ DVD-R – these allow users to record on it once and read it many
times.
times.
As its name implies, it allows the user to write information unto it only
and optical methods. These disks are read and written in magneto-
optical drives. Because these drives use both magnetic and optical
technology, they are more expensive that those that use just one of
Page 27 of 176
➢ A TRACK is:
data is stored.
stored.
the exact location and reading only the required data, thereby
avoiding data that came before or after. Disk drives generally access
magnetic tape drives. If it turns out that the data was stored in a
Page 28 of 176
INTERFACE
An interface is the connection between any two systems or parts that
• A PORT – the plug-in slot that lets you connect the storage medium
Page 29 of 176
hard disks and tape drives, but it can connect a wide range of other
computer and mass storage such as hard disk and optical drives.
drive.
Page 30 of 176
ADVANTAGES AND DISADVANTAGES OF STORAGE DEVICES
MAGNETIC MEDIA
Page 31 of 176
OPTICAL STORAGE
STORAGE ADVANTAGES DISADVANTAGES
CD-ROM ➢ Stores large ➢ As CD is read-only,
amounts of data – data cannot be
up to 650 Mb per changed or deleted
CR-ROM ➢ Slower access times
➢ Very cheap to than hard drives
produce, ➢ Cannot read DVD
particularly on a
large scale
➢ Good way of
distributing
software
CD-R ➢ As with CD-ROM, a ➢ Must have a CD-R
CD-R stores large recorder to write
amounts of data to a disk
➢ Possible to add ➢ CD-R software has
data (write) to the varying capabilities
CR-R in more than
one session
➢ Good for backing up
file
CD-RW ➢ As with CD-ROM, ➢ Must have a CD-RW
CD-RW stores large recorder to write
amounts of data to a disk
➢ CR-RW can be ➢ CD-RW does not
Page 32 of 176
erased and reused work in all CD
as many times as players
required
➢ Good for backing up
files
DVD ➢ Stores massive ➢ New technology, so
amount of data – to number of DVDs in
17 Gb use is smaller than
➢ Excellent for number of CD-
showing video ROMs
➢ DVD players can ➢ New technology, so
read CD-ROM price of drives
relatively expensive
➢ DVDs do not work in
CD-ROM drives
Page 33 of 176
Floppy Magnetism (on a Direct access Floppy disks are
disk circle of plastic) available in several
Read-write
sizes, but they have
access
low storage capacity
Removable and are rarely used in
modern computers.
Low capacity
High capacity
Page 34 of 176
COMPUTER DEVICES FOR INPUT AND OUTPUT
INPUT DEVICES
Input devices accept data signals and translate them for usage and storage
POINTING DEVICES
1. The MOUSE is your pointing device. As you move the mouse, a pointer
on the monitor screen moves in the same direction as the mouse does.
2. A JOYSTICK is a lever that can give you a similar control over things
3. A TRACK PAD is a small, flat, square pad below the space bar, upon
which you place your finger. As you move your finger across the track
easy way to select choices from an on-screen menu and perform other
simple tasks.
5. A LIGHT PEN looks like a pen with a wire attaching it to the computer
system. When you point at a position on the screen, the software can
Page 35 of 176
find the exact position being indicated, and so you can select, activate
between 6 and 30 inches wide. It works with a stylus which you move
SCANNERS
A scanner reads picture-type information into the computer. There are a
over it.
The scanner reads the picture as the paper goes through. The original
Page 36 of 176
4. A BARCODE READER is a device that reads a pattern of bars
barcode reader usually passes a small laser beam over the pattern and
or credit card.
printed using special ink having good magnetic qualities used in the
Page 37 of 176
9. POINT OF SALE TERMINALS (POS) – these are terminals to which
input devices like bar code readers are connected, that process
OTHER DEVICES
the microphone you see used on stage. When you talk your sound
(VDE).
Page 38 of 176
clerk types in the data using the keyboard. The data may be typed a
second time in order to verify it. The data is then saved on a disk.
The data from the disk can then be transferred to the high-speed
cameras use digital methods to capture and store images. The data is
then stored on a digital media such as memory cards, floppy disks, etc.
iris (eye) scan. They are mainly used for security purposes, for
light, heat, pressure etc. and send them to the computer system.
Page 39 of 176
INPUT DEVICES
Page 40 of 176
SCANNER Relatively cheap and easy to The quality of the image
install depends on the quality of
Depending on use, flat bed the hard copy, scanner
or hand-held scanners can and scanner software
be chosen
KEY-TO-DISK Data can be prepared off- Requires many human and
line computer resources
Data can be validated by Expensive
the program as it is being
entered
VOICE The user can speak at The voice recognition
RECOGNITIO normal rates for dictation system must be trained
N SYSTEM to recognise voice
patterns
Software cannot
interpret all English
meanings
Page 41 of 176
still be read if
they care
creased or not
stuck onto a
flat surface
➢ Can be printed
using a normal
printer and ink
and so are
cheap to
produce
Page 42 of 176
the data use is in
decline
➢ Not easy to
forge
➢ Incorrect or
inconsistent
marking of
the sheet
may result in
the data
being
rejected
OUTPUT DEVICES
Page 43 of 176
2. MONITOR – a VISUAL DISPLAY UNIT (VDU) is a television like
device that most people call the computer screen or monitor. Images
are displayed on the monitor using PIXELS in the form of little tiny
pixels that are displayed on the screen at the same time. It is given
CRT uses similar technology to the television. LCD screens are much
thinner and use a lot less energy and as a result are used in portable
heads, inked ribbons or laser, they use something a bit more low-tech
DRAFTING.
Page 44 of 176
screen for it to be photographed by a high speed camera. The
reduced size.
IMPACT PRINTERS.
inked ribbon onto the paper. There are two types of impact
➢ LINE PRINTERS
Line printers are printers that can use multiple print hammers
Page 45 of 176
Speed for line printers is measured in lines per minute (lpm).
shipping applications.
➢ CHARACTER PRINTERS
force the character into the ink ribbon onto the paper. It
print head moves back and forth, these pins strike the
Page 46 of 176
Non – impact printers are printers that print using methods
quieter.
Page 47 of 176
➢ THERMAL PRINTERS – are printers that print by
Page 48 of 176
Page 49 of 176
HOW DATA IS STORED IN THE COMPUTER
typed format. Instead, all data and instructions input into the computer
have to be translated to codes which the computer can store and use. These
codes are created using various combinations of two digits only, (called bits),
namely a “0” and “1”. This system is known as the BINARY NUMBER
SYSTEM.
The binary method of coding data and instructions on the computer is only
as DISCRETE DATA.
DATA.
Page 50 of 176
Page 51 of 176
BINARY NUMBER SYSTEM
As you go from the rightmost bit (called the least significant bit) to the
leftmost bit (called the most significant bit), the place value increases by a
factor of 2.
Increase by factor of 2
Place Value 16 8 4 2 1
(in base 10) 24 23 22 21 20
Digit 1 0 1 1 1
(in base 2)
number into a decimal number. For example, let us convert the number
101112 to base 10. To do this you must follow a few simple steps:
➢ Above each digit, write its place value in base 10. So you would
➢ Multiply each digit by its place value and add the results
together.
24 23 22 21 20
Page 52 of 176
16 8 4 2 1
1 0 1 1 1
= 16 + 0 +4 + 2 + 1
= 2310
➢ Divide the decimal number by 2. Write down the quotient and the
remainder.
➢ On the next row, divide the quotient from the previous row by 2.
2 103
Write down
2 51 R 1 the
Page 53 of 176
remainders in
2 25 R 1 this
2 12 R 1 direction
2 6 R 0
2 3 R 0
2 1 R 1
0 R 1
BINARY ADDITION
EXAMPLE: 111 + 10 + 111 + 110
111
10
111
110
101102
1+0+1+0 = 2
Page 54 of 176
2/2 = 1 R 0
➢ Write the remainder as the result for this column and carry over
binary form in a less tedious way. The decimal number is treated as a set of
Note that when using BCD; each digit is represented using a four-bit
BCD negative and positive signs are represented using a 4-bit pattern
which does not represent any of the digits. One convention is:
Page 55 of 176
8 9 6 DECIMAL
896 = 1000100101102
+896 = 10101000100101102
-896 = 10111000100101102
1. ONES COMPLEMENT
2. TWOS COMPLEMENT
ONES COMPLEMENT
Ones complement is a simple one step process.
Going from left to right simply change all the 1s to 0s and 0s to 1s.
Page 56 of 176
TWOs COMPLEMENT
To find the twos complement of a binary number is almost as easy as finding
the ones complement. In fact, it is exactly the same with the exception of
➢ Add 1
➢ Add 1 = 011010112
leftmost bit is used as the sign bit. All the other bits represent the
Page 57 of 176
magnitude of the number. So in the case of the example (where we use 8
bits in total), 7 bits will be used to store the magnitude of the number and
Steps:
45 = 00101101
-45 = 10101101
ASCII CODES
The AMERICAN STANDARD CODE FOR INFORMATION INTERCHANGE is
the standard that PCs use when representing data. For example:
The ASCII code for D is 010001002. What is the binary for the
Steps:
Page 58 of 176
D is the 4th letter of the alphabet and W is the 23rd. Therefore, in
order to get the ASCII code for W you have to add 19 (23-4) to the
ASCII code for D. Obviously you cannot just add a binary number to a
0 1 0 0 0 1 0 0
0 0 0 1 0 0 1 1 +
0 1 0 1 0 1 1 1
8710
BINARY SUBTRACTION
EXAMPLES:
1. 01 – 00
01
Page 59 of 176
00
102
RULE: 1-0 = 1
2. 01 – 01
01
01
002
RULE: 1-1 = 0
3. 10001 -1011
01121
10001
1011
001102
1. 111 -101 = 10
2. 1111 – 1101= 10
3. 1110 – 1011 = 11
4. 1010 – 111 = 11
Page 60 of 176
OCTAL NUMBERS
OCTAL NUMBERS are numbers to base 8. We therefore use the digits 0 to
7. Since the number base or scale is 8, each digit of a number has a place
8 98
Write down
8 12 R 2 the
remainders in
8 1 R 4 this
0 R 1 direction
ANSEWER: 1428
8 985
Write down
8 123 R 1 the
remainders in
8 15 R 3 this
8 1 R 7 direction
0 R 1
Page 61 of 176
ANSWER: 17318
Page 62 of 176
CONVERTING FROM OCTAL TO DECIMAL
In converting from octal numbers to denary numbers, we use the fact that
EXAMPLES:
448+32+3
= 48310
675 + 204 =
11
675
204+
11018
111
4763
215+
52008
Page 63 of 176
SUBTRACTING OCTAL NUMBERS
EXAMPLE:
7632
475-
7135
Note: a remainder in this topic refers to the left over value after
performing an integer division.
HEXADECIMAL 0 1 2 3 4 5 6 7 8 9 A B C D E F
DECIMAL 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Example 1
Convert the number 1128 DECIMAL to HEXADECIMAL
Page 64 of 176
NOTES DIVISION RESULT REMAINDER (in
HEXADECIMAL)
Start by dividing the 1128 / 16 70 8
number by 16.
The remainder is
(70.5 - 70)
multiplied with 16;
or (0.5 times 16),
which is 8.
Then, divide the 70 / 16 4 6
result again by 16
(the number 70 on
the DIVISION
column comes from
the previous
RESULT).
In this case,
70/16=4.375. So
the integer division
result is 4 (throw out
anything after the
decimal point)
The remainder is
(0.375 multiplied
with 16, which is 6.
Repeat. Note here 4 / 16 0 4
Page 65 of 176
that 4/16=0.25. So
the integer division
result is 0.
The remainder is
(0.25-0) multiplied
with 16, which is 4.
Stop because the
result is already 0 (0
divided by 16 will
always be 0)
Well, here is the 468
answer. These
numbers come from
the REMAINDER
column values (read
from bottom to top)
Side note: You can get the remainder of a division using the Modulus or %
operator. Ie: 1128%16=8.
Example 2
Convert the number 256 DECIMAL to HEXADECIMAL
ANSWER 100
Page 66 of 176
Example 3
Convert the number 921 DECIMAL to HEXADECIMAL
ANSWER 399
Example 4
Convert the number 188 DECIMAL to HEXADECIMAL
ANSWER BC
Note that here, the answer would not be 1112, but BC. Remember to write
down the remainder in hex, not decimal.
Example 5
Convert the number 590 DECIMAL to HEXADECIMAL
Page 67 of 176
590 / 16 36 E (14 decimal)
36 / 16 2 4 (4 decimal)
2 / 16 0 2 (2 decimal)
ANSWER 24E
1. Get the last digit of the hex number, call this digit the current
Digit.
2. Make a variable, let's call it power. Set the value to 0.
3. Multiply the current digit with (16^power), store the result.
4. Increment power by 1.
5. Set the current Digit to the previous digit of the hex number.
6. Repeat from step 3 until all digits have been multiplied.
7. Sum the result of step 3 to get the answer number.
Example 1
Convert the number 1128 HEXADECIMAL to DECIMAL
Page 68 of 176
1 x (16^3) 4096 Process the previous digit,
which is 1, note that 16^3
means 16 x 16 x 16
Here, we stop because
there's no more digit to
process
ANSWER 4392 This number comes from
the sum of the RESULTS
(8+32+256+4096)=4392
Once discerned, notice that the above process is essentially performing this
calculation:
• Counting the number of digits takes extra time, and you might count
wrongly.
• If you don't remember what a particular value of a power-of-16 is,
it's easier to calculate it from the previous power value. For instance,
if you don't remember what the value of 16^3 is, then just multiply
the value of 16^2 (which you'll likely already have if you started
backward) with 16.
Example 2
Convert the number 589 HEXADECIMAL to DECIMAL
MULTIPLICATION RESULT
9 x (16^0) 9
8 x (16^1) 128
5 x (16^2) 1280
ANSWER 1417
Page 69 of 176
16^0 1
16^1 = 16 16
16^2 = 16x16 256
16^3 = 16x16x16 4096
16^4 = 16x16x16x16 65536
Example 3
Convert the number 1531 HEXADECIMAL to DECIMAL
(This time, let's use the table of the power-of-16s above.)
MULTIPLICATION RESULT
1 x 1 1
3 x 16 48
5 x 256 1280
1 x 4096 4096
ANSWER 5425
Example 4
Convert the number FA8 HEXADECIMAL to HEXADECIMAL
MULTIPLICATION RESULT
8 x 1 8
A x 16 (remember that hex A=decimal 160
10)
F x 256 (remember that hex 3840
F=decimal 15)
ANSWER 4008
Example 5
Convert the number 8F HEXADECIMAL to DECIMAL
Page 70 of 176
DIVISION RESULT
F x 1 15
8 x 16 128
ANSWER 143
Example 6
Convert the number A0 HEXADECIMAL to DECIMAL
DIVISION RESULT
0 x 1 0
A x 16 160
ANSWER 160
Example 7
Convert the number 12 HEXADECIMAL to DECIMAL
DIVISION RESULT
2 x 1 2
1 x 16 16
ANSWER 18
Example 8
Convert the number 35432 HEXADECIMAL to DECIMAL
Page 71 of 176
SOFTWARE
Software is a general term for the various kinds of programs, installation
files and documentation that together are used to operate computers and
related devices.
Page 72 of 176
System Software is the category of software used to operate and maintain
OPERATING SYSTEM
An Operating System is a group of programs that work interactively to
Page 73 of 176
✓ Communication
✓ File transfer
✓ Resource Management
as computer files. The operating system organises the files and allow
the correct data and instructions are copied into the main memory ready
to use.
devices such as the keyboard, and send signals to output devices such as
processes under way at the same time. These are organised by the
operating system.
✓ User Interface – the user interface is the system that allows you – the
user – to interact with the computer, to input instructions and data, and
receive results.
Page 74 of 176
USER INTERFACE
A user interface can be thought of as a link between user and computer. It
allows the user and the computer to communicate with each other. The goal
efficiently.
draw device, usually a mouse. The way the GUI works, is often summarized
out. Activating the icon causes the action to be carried out. It can be
activated by double clicking on the icon, causing the action associated with
stretching across the top of a screen (or window) contains the names of
Page 75 of 176
up menu appears on your display screen at the point where your mouse is
pointing device. The pointing device is the primary means of interacting with
a computer running a GUI. It is used to move the pointer around the screen
to carry out actions such as selecting icons and menu options, dragging and
must not only remember what commands exists; they must also remember
the syntax. This is a main draw back with this type of interface. DOS and
UNIX are some operating systems that use a command line interface.
them. There are two type – Pop-up Menu and Pull-Down Menu. (Explained
above)
computer.
1. Touch screen
Page 76 of 176
2. Non-visual interface, such as voice based or braille based input and
PROCESSING MODES
Data can be processed in four ways, depending on the data and what is
BATCH PROCESSING
These process data in batches at one time- not as single items. The entire
The payroll system, for example normally requires the collection of data
over a period of time with the actual processing of the pay being done only
ONLINE PROCESSING
These provide a direct link between the user and the computer processor via
Page 77 of 176
REAL-TIME PROCESSING
Real-time processing is where jobs and transactions are processed
systems.
TIME SHARING
Time sharing is used when a system has more than one user at a time. It
runs more than one program at the same time. They could be
Page 78 of 176
APPLICATION SOFTWARE
Application programs or application software, are programs that allow a
computer to carry out specific tasks, but they are not essential for the
computer to work.
Advantages:
➢ The user has close control over revisions and can modify the software
as needed.
➢ The program may run fast as the code is optimized for a specific
purpose only.
➢ It is more costly
Page 79 of 176
➢ It may have flaws during a period of initial use whereas package
application.
features.
➢ Users get value for money as it costs less to purchase the integrated
Disadvantages:
➢ The integrated software does not have all the features of the
Page 80 of 176
DATA COMMUNICATION
Page 81 of 176
4. POINT-TO-POINT – communication connects two fixed points, and
conversation.
anyone who can pick up the signal can hear it. An example is a radio
PROTOCOL
Protocols are a set of rules and procedures governing the transmission and
receiving of data. Some international protocols are HTTP, PPP, TCP/IP, FTP,
Protocols are used to ensure that transmissions are coordinated with minimal
interference.
Page 82 of 176
NETWORKS
A network is a group of computers and peripheral devices that are
costs and increases efficiency by allowing the sharing of programs, data and
or at most within buildings that are close together, for example a school.
Page 83 of 176
WIDE AREA NETWORK (WAN)
A Wide Area Network (WAN) connects computers that are spread out over
a large are such as an island, the whole Caribbean, or even across the ocean.
city, or a district.
DISADVANTAGES OF NETWORKING
that they are not supposed to see by hacking into computers on the
network.
TRANSMISSION MEDIA
Networks are connected by physical cables that transmit the electronic
wires. In each pair the wires are twisted around each other. This type
and reliable.
Page 84 of 176
➢ COAXIAL CABLE – This type of cable is made of an inner conducting
interference.
Cable
WIRELESS CONNECTIONS
Other network technologies send signals without the use of wires or cables.
human eye. Can be used to connect items that are close together,
radio signal and can be used for communication. They work over
Page 85 of 176
➢ SATELLITE LINKS – between satellites in orbit and aerials often use
sky.
MODEM (MODULATOR/DEMODULATOR)
A modem is a device that can convert digital signals into analogue and vice
1. UPLOAD – this is the process by which one computer, the host, sends
Page 86 of 176
PROTECTING AND SECURING INFORMATION
from theft, fire, viruses, hackers, and data loss and data corruption.
Numerous methods are used to protect and secure information. The most
1. Using Passwords
2. File Encryption
5. Using Firewalls
8. Archiving
9. Virus protection
PASSWORDS
A password is a combination of characters used to prevent unauthorized
Page 87 of 176
ENCRYPTION
Encryption is the process of encoding information so that it bears no
similarity to the original in order to secure it. Files are encrypted using a
original information.
Installation keys are also used for software access restrictions; they are
also used to cut down on software piracy. This is the unlawful copying of
computer software.
Page 88 of 176
VIRUS PROTECTION
A virus is a malicious program that is designed to corrupt the files on a
disks that are suspected of having a virus and by using up-to-date anti-virus
software.
ANTI-VIRUS SOFTWARE
An anti-virus program is a special type of software that tries to detect and
FIREPROOF CABINETS
A fireproof cabinet is a cabinet that is designed to withstand the high
storage media.
FIREWALLS
A firewall is a program that identifies certain weaknesses in networked
computers and tries to prevent them from being exploited. This makes it
secure.
Page 89 of 176
BACK-UP AND RECOVERY
Backing up data is the process of making a copy of the data and storing it on
ARCHIVING
When data has remained unchanged for a long time and is not accessed on a
space, you might want to store it in a separate location instead. This is what
DATA CORRUPTION
When something causes data to become lost or damaged, this data is said to
➢ A computer virus
➢ Computer malfunction.
SOFTWARE RIGHTS
➢ PROPRIETY SOFTWARE – commercial software that you buy is
You are not allowed to make changes to it, make copies of it or resell
it.
Page 90 of 176
➢ OPEN SOURCE SOFTWARE – commercial software is usually provided
in the form of executable files. But if you use open source software
working for free, and everyone who uses it is allowed to make further
improvements.
Page 91 of 176
TROUBLESHOOTING AND COMPUTER MAINTENANCE
COMPUTER MAINTENANCE
When you use a computer over a period of time, problems may develop which,
even though they are usually not serious, may accumulate and cause a
systems come with tools to help you get rid of these problems and keep your
a program crashes, chances are that there will be file errors on your disk.
Disks do not last forever so some part will go bad. Data saved on these
of these things happening, your hard drives should be scanned for file errors
program fixes them. If physical errors are discovered, the program does
the equivalent of putting up warning signs around the areas saying that no
data should be stored there. The tools in windows that would allow you to
and delete files a lot, the files on your computer become fragmented. When
files are heavily fragmented, it causes the computer to run slower since it
has to be going all over the disk to find the parts of a file.
Page 92 of 176
Defragmentation is the process by which the computer takes the fragments
of files and reorganises them on a hard drive so that they are stored
contiguously.
BASIC TROUBLESHOOTING
➢ THE COMPUTER (TOWER) IS NOT TURNING ON
electrical socket.
The power supply is not working Place your hand close to the fan on
working.
Page 93 of 176
➢ THE MONITOR IS NOT WORKING
firmly.
socket.
Monitor is not connected to the Make sure that the thick cable from
tower.
The computer has turned off the If you left the monitor on and come
Page 94 of 176
anything (even though the switch is
immediately).
“Invalid system disk. Replace the Either remove the disk or replace it
disk and press any key” with a boot diskette. Press any key
on the keyboard.
Page 95 of 176
➢ THE PRINTER IS NOT WORKING
Printer cable is not connected Make sure that one end of the
firmly.
You press the keys on the Make sure the keyboard is connected
Page 96 of 176
Try moving the mouse to see if the
computer.
When you press a letter key (by Check to see if any of the SHIFT,
itself) a window, e.g. the run CTRL, ALT or Windows keys is stuck.
The mouse pointer is not moving Make sure the mouse is connected to
Page 97 of 176
Take out the ball from the mouse, if
mouse.
When you try to access a disk you Open Windows Explorer. Right click
are told that the disk is not the icon for the floppy drive. Click
When you try to copy files to a Hold the disk with the label facing
disk or to delete files from it you down. Locate the square tab above a
get an error saying that the disk is small hole in a corner of the disk.
some (or all) of the files stored on of the floppy disk for bad sectors.
disk.
Page 98 of 176
APPLICATIONS AND IMPLICATIONS OF IT
EXPERT SYSTEMS
Expert systems are used in medicine. An expert system is a complex type of
software used to answer questions. Typically, expert systems are used for
Expert systems are also used to diagnose problems in car servicing and
computer maintenance.
ROBOTS
Robots are used in factories where repetitive tasks must be carried out.
Robots work quickly and accurately. They use sensors to measure their
✓ Easy to revise, and make changes, and test the strength and
suitability of design.
Page 99 of 176
✓ Used to produce computer animation for special effects in movies.
manufacture objects. CADD and CAM usually work together, so you can
design an object on the screen of the computer and then send the
instructions to a machine that will cut the object from a piece of metal.
✓ Cheaper to test out designs on the computer, rather than in real life.
EXAMPLE: a new bridge design will be planned and thoroughly tested on the
assess which boxes have been marked, and give a score accordingly.
CML/CMI
COMPUTER MANAGED LEARNING AND COMPUTER MANAGED
INSTRUCTION are other tools used in educations. However, unlike CAI and
to manage indexes.
interactive.
➢ Students can learn on their own and at their own pace even in the
absence of a teacher.
simulation.
➢ Abstract concepts can often be explained more clearly with the use of
multimedia.
CLOUD COMPUTING
Cloud computing is a modern use of Internet technology to carry out your
such as Google or Yahoo. You still need a computer of our own to connect to
the Internet, but most of the software and data is stored somewhere far
ADVANTAGES
✓ Good for people with small computer systems without much personal
storage capacity
WEARABLE TECHNOLOGY
Wearable technology is clothing that has computer systems built into it. It
speed of an athlete. It can also be used for fun – to create a T-shirt with a
SMART OBJECTS
A smart object is any object that sends out wireless signals that can be
picked up by local computer systems. Some have their own processors inside
TELECOMMUTING
Telecommuting is a term used to refer to when an employee works off-site
office network/computer.
The reduced commuting means reduced cost, less stress (from not having to
put up with rush hour traffic) and is more convenient for the employee. All
channel. The most common method of doing this is via a modem, telephone
electricity costs. There is also the initial cost of setting up the computer
work when he/she wishes, and may be distracted by things such as telephone
calls, television, there may be a loss of productivity. Also there may be the
travel.
who are located at various locations in the world. All that is need are
computers with microphones and digital video cameras (or webcams) and a
ADVANTAGES
Videoconferencing offers people the advantage of convenience, productivity
DISADVANTAGES
An increase in telecommunication cost and loss of personal contact is
experienced. Also is the connections being slow, the video and audio may not
TELECONFERENCING
Teleconferencing is a way of holding a meeting even if the people are in
not have to travel so much, and this is also better for the
environment.
INFORMATION MISUSE
Since computers make it easy to collect, store and share information, they
also make it easy to misuse it. For example, is collected on people who use
information
➢ By using information for purposes other than those for which it was
intended.
surveillance.
INDUSTRIAL ESPIONAGE
This is when secret information is obtained by spying on competitors or
opponents.
ELECTRONIC ESPIONAGE
This is the use of electronic devices to monitor electronic communication
from the user and from the computer, often without the user’s knowledge.
✓ Lack of security
ELECTRON EAVESDROPPING
Even is data is protected by passwords and other methods, some people will
private information
✓ Not be used for any reason incompatible with its original purpose
corrections
✓ Be kept secure
PIRACY
Software piracy is the copying of programs without consent of the owner.
COMPUTER FRAUD
Fraud is a general term for any illegal deception or trick. Computers can be
PROGRAMMERS
➢ Write applications programs or system programs
➢ Test and debug programs
➢ Prepare the installation of CD-ROMS
➢ Maintain programs
SYSTEMS PROGRAMMER
➢ Design systems programs
➢ Write systems programs
➢ Test and debug programs
MANAGERS
➢ Make sure jobs in the department are done correctly, on time and
within the budget
➢ Prepares budgets for the department
➢ Manage the human resources within the department
DATABASE ADMINISTRATORS
➢ Designs and develop database applications
➢ Control access to the data
➢ Keep the data up to date
DATA-ENTRY CLERKS
➢ Transfer data from source documents onto machine-readable media or
directly into the computer
➢ Verify previously entered data
COMPUTER OPERATORS
➢ Start up and shut down the computer equipment
➢ Supervise data-entry operators
➢ Back up data files on a regular basis
➢ Mount tapes, load printer paper, change ribbons, etc.
LIBRARIANS
➢ File, store and distribute data files, tapes, diskettes, compact disks,
etc.
➢ File archived material
➢ File and distribute hard copies
➢ File documentation for programs
TECHNICIANS
➢ Assemble and service computer equipment
➢ Find and fix computer problems
COMPUTER ENGINEERS
➢ Design computer configurations
➢ Determine the network cabling requirements and layout
➢ Determine the power requirements for the computer department
➢ Design computer chips
➢ Design and develop processes for the manufacturing of computer
parts
COMPUTER TRAINERS
➢ Train people to use computer hardware and software
➢ Develop training manuals
➢ Examine and mark examination scripts
INTRODUCTION TO PROGRAMMING
SOLVING THE PROBLEM
You should first think about a method and develop an algorithm to solve the
solution.
ALGORITHM PHASE
In this phase, there are three steps:
problem.
3. Test your algorithm. You must make sure your algorithm works
IMPLEMENTATION PHASE
In this phase, there are three steps:
3. Document the program. Here you write comments on how to use the
this is, what the program is meant to do. The following four steps are used
2. Specify the input – since you know what the output is you can specify
PROCESSING. The input is the source data that is provided. The input can
The output is the end result required. Keywords that help identify the
output are, print, display, produce, output. The processing column is a list of
If you are unsure of what goes under the processing column, you can ask
desired output?’
processing section.
EXAMPLE 1
DEFINING DIAGRAM
num2
➢ Add the three
num3
numbers together
The first step is to identify the input (that is, the data that is given). The
keyword, read, identifies the input as three numbers, that is, any three
numbers. A name must be given to refer to each number. We can call them
The next step is to identify the output. The keyword, print, identifies the
The final step in defining this problem is to list the processing steps. This is
you would list all the actions that must be performed in order to get the
their total?
NOTE THAT:
sequential order.
2. All the necessary actions must be explicitly stated. For example, the
list of the things that must be done in order to solve the problem.
EXAMPLE 2
particular day. However, you are told to ask the user to input the maximum
and minimum temperature readings. You then calculate and output the
temperature
➢ Read max_temp,
min_temp
➢ Calculate average
temp
=(max_temp +
min_temp)/2
to a problem. It must have a set of rules, must be explicit and have a clear
stopping point. It is really used to expand the processing part of the IPO
➢ Correct – it should accept all inputs (even invalid inputs) and output a
➢ Simple – each step of the algorithm should perform one logical step in
➢ Precise – the algorithm should present the solution steps precisely and
results quickly, depending on the problem size, and not waste any
memory or time.
PSEUDOCODE
The statements, keywords, variables, loops and subroutines used to define
➢ Variables – store data for the program to work with. A variable could
etc.
VARIABLES
A Variable is the name that represents a piece of data that can take many
called a LOCAL VARAIBLE. In the examples above num1, num2, num3, total,
NOTE
When new values are placed into previously assigned memory locations,
fractions
ALGORITHMIC STRUCTURE
Every algorithm should have the following sections, in the stated order;
initialization of variables.
WRITING INSTRUCTIONS
Commands used to input data are READ and INPUT.
PROMPTING INSTRUCTIONS
Prompting statements are used along with input statements to request or
notify the user to enter data into the computer. These statements are
instructions.
OUTPUT INSTRUCTIONS
These instructions display/output data that is in the computer’s memory.
Commands used to output data are PRINT or WRITE. You can output string
being printed.
For example, if $5.00 is printed by itself, you may not know what it means
numbers
PRINT average_temp
SEQUENTIAL STATEMENTS
Sequential statements are statements which are executed one after the
EXAMPLE:
made, based on some condition that evaluates to TRUE. In the case of IF…
IF … THEN CONSTRUCT
The IF … THEN construct contains a condition which is tested before an
action can be undertaken. If the condition holds TRUE, then the action is
SYNTAX:
IF <CONDITION> THEN
ENDIF
EXAMPLE:
their sales representatives per month. Once the income is greater than
N.B – CASE 1
placed within the IF… THEN- ENDIF construct, only if the income
INITIALISING A VARIABLE
It may sometimes be necessary or wise to initialise a variable, that is, to
BONUS = 0
PRINT ‘ENTER THE INCOME GENERATED’
READ INCOME_GENERATED
N.B – CASE 3
In case 3, if the income generated is less than or equal to $5000.00
and no bonus is calculated then the bonus printed will be $0.00. This is
QUESTIONS:
A car rental firm leases its cars for $250.00 per day. The manager gives a
discount based on the number of days that the car is rented. If the rental
period is greater than or equal to 7 days, then a 25% discount is given. Read
READ RENTAL_PERIOD
ENDIF
whether the student has passed. If the score is greater than or equal to
50, the student has passed. Print “PASS” if the student has passed.
READ MARK
ENDIF
IF <Condition> THEN
condition is TRUE>
ELSE
condition is FALSE>
ENDIF
EXAMPLES:
Input the age of a person. If the age is greater than 35, output “old person”
READ AGE
ELSE
ENDIF
paid before 30 days. Read a fee and the number of days. Output the fee,
IF <Condition> THEN
ELSE
IF <condition> THEN
ENDIF
ENDIF
EXAMPLE:
A stadium has four stands, A, B, C and D. The admission fee for stand A is
$2.00, stand B is $2.50, stand C is $4.00 and stand D is $5.00. Read a stand
and the number of spectators in the stand. Calculate and print the revenue
LOOPS
Loops are useful for repeating parts of a program. That is, they will
satisfied. In order to exit from a loop, you must have a method for checking
to see if you have completed the task. Once a loop terminates, control is
returned to the first sentence after the block of sentences in the loop.
✓ Definite – when you know in advance how many times to repeat the
WHILE LOOP
User input ----- (then) ---- check condition ---- (then) ---- performs
statements
REPEAT LOOP
User input ---- (then) ---- performs statements ---- (then) ---- check
condition
WHILE - DO LOOP
The WHILE –DO loop repeatedly executes a statement or a block of
statements as long as the condition is TRUE.
The condition in a WHILE loop is tested at the beginning of the loop, so
it is possible for the statement not to be executed at all.
The initial value for the condition can be stored in a variable which is read or
not a real value for the problem being solved. For example, 999, could be
EXAMPLE:
THESE TWO
NUMBER = 1 STATEMENTS ARE
WHILE (NUMBER <= 3) DO EXECUTED ONLY
NUMBER = NUMBER + 1 IN THE LOOP
PRINT “THE NUMBER IS”, NUMBER
ENDWHILE
PRINT “OUT OF LOOP”
AGE = 15
WHILE (AGE < 20) DO
PRINT “YOU ARE NOT 20 YEARS OLD”
AGE = AGE + 1
ENDWHILE
PRINT “YOU ARE OUT OF THE LOOP”
EXAMPLE:
WHILE NO = 0 DO
The loop is repeated once, NO = 0, otherwise it is terminated.
2. Use <> if only one value is to be used for terminating the loop.
EXAMPLE:
WHILE SCORE <> 999 DO
3. Use <= or < if the value to terminate the loop are less than the
dummy value or less than or equal to the dummy value respectively.
FOR is the beginning and ENDFOR is the end of the loop. The loop variable
is used to count the number of times the loop is executed. The value of this
variable starts at the beginning value and is increased by one each time the
The step clause indicates how much the loop variable is to be increased or
decreased by each time the loop is executed. The step clause is not
When the end value is reached, the loop terminates and the instruction
EXAMPLE: Print a table to find the square and cube of all even numbers
between 2 and 20 inclusive
the condition is FALSE. This condition is tested at the end of the loop, so
STATEMENTS
DECISIO
FALSE N
TRUE
A = 1
REPEAT
A = A + 2
Print ‘The value of A is ‘, A
UNTIL A>= 10
START / STOP
DECISION
INPUT / OUTPUT
PROCESS
Start
Enter weight1,
weight2
Stop
RELATIONAL OPERATORS
OPERATOR MEANING
< LESS THAN
> GREATER THAN
= EQUAL TO
< = LESS THAN OR EQUAL TO
> = GREATER THAN OR EQUAL TO
< > NOT EQUAL
A NOT
1 0
0 1
➢ If any one of the values is NOT TRUE, then the result is FALSE
A B A AND B
1 1 1
1 0 0
0 1 0
0 0 0
A B A OR B
1 1 1
1 0 1
0 1 1
0 0 0
TESTING ALGORITHMS
Before you convert an algorithm to code, it is a good idea to check that it is
complete and logical. This can be done by using actual values on the
algorithm. There are two ways to do this: DRY –RUN TESTING and TRACE
TABLES.
TRACE TABLES
Trace table is a very useful tool which allows you to see the state of your
algorithm with as much detail as you wish. They are tables that track each
variable as it progresses through the calculation. It will show you the output
of each cycle of calculation within a problem.
EXAMPLE:
Number = 0
Number2 = 1
While number <12 Do
Number = number + 3
Number2 = number2 + 2
Print number, number2
EndWhile
The first step is to create a table with a column for each variable and one
row per pass, so the number of rows depends on how many times the
calculations is carried out.
➢ The first row contains the initialised values
Number Number2
0 1
3 3
6 5
9 7
12 9
COMPUTER LANGUAGES
A computer language is a set of instructions used for writing computer
programs. There are THREE (3) levels of languages:
1. MACHINE LANGUAGE – this was the first language available for
programming. It varies from one computer to another, but the basic
principles are the same. MACHINE LANGUAGE PROGRAMS are
written using a series of 0’s and 1’s i.e. using a BINARY SYSTEM. All
programs written today must be translated into machine language
before they can be executed (used) by the computer.
EXAMPLE: 110110001
➢ Execution faster
than high level
➢ Code is easier to
learn, read,
understand and
correct.
➢ Language is more
English and math
like
➢ Programmer
doesn’t need to
know details of the
computer.
GENERATION OF LANGUAGES
GENERATION DESCRIPTION
➢ Stage 3: Link.
SYNTAX ERRORS
Syntax errors occur when a mistake is made in the language rules or
sentence structure of the programming language. Examples of syntax errors
include misspelling of a variable or key word, and incorrect use of looping
structures. Syntax errors stop the source code from being converted to
machine code.
LOGIC ERRORS
Logic errors occur when a programmer makes mistakes in the sequence of
the program sentences, such as using the wrong mathematical formula or
wrong operator in an expression. The program will usually compile.
RUN-TIME ERRORS
Run-time errors occur as the program compiles or ‘runs’. These errors are
usually due to unexpected events such as division by zero, or lack or memory
for the computer to manipulate the data.
TYPES OF TESTING
Test your program before you execute it. You can do this in two ways:
➢ Testing on paper and
➢ Computer testing
Dry run tests and trace tables are methods of testing on paper. Dry run
testing is a method of checking that a program does not contain any logic
errors. If the program uses loops, you can use trace tables to trace the
logic of a program through multiple values.
➢ Check that the correct format is used, such as a date or time format.
➢ Check that the correct data type has been used, such as a numeric
value and not symbols.
Verification checks that the data entered is exactly correct. This is a time
consuming process and tends to be used only when data accuracy is crucial.
DOCUMENTING PROGRAMS
Documentation says what a program does and how it is used. A program is
not much use to a person if they do not know what it is or what it is used
for.
EXTERNAL DOCUMENTATION
External documentation is often called user documentation or user manuals.
User manuals provide installation instructions, operation instructions and any
other technical specifications that a user might need to run or install a
program.
The PROGRAM part is where you name the program. You can give the
program any name you want, but it should be as relevant as possible. For
example, if the program calculates the average outdoor temperature, you
may want to name is as follows:
PROGRAM Average_Temp (input, output);
In the CONST and VAR sections, you declare all the constants and variables
that you will be using in the program.
You write the input, output and processing instructions between BEGIN and
END.
Every statement ends with a semi-colon (;)
There is a period (full stop) after END.
Example: Write a program to add two numbers and output the results.
PROGRAM addition (input, output);
VAR
Num1, Num2, Sum: REAL;
BEGIN
DECLARING VARIABLES
To declare a variable in a program, state the identifier then the data
type.
Variable identifier: data type;
➢ It can include upper and lower case letters, numbers and the
underscore symbol.
PUNCTUATION
Put a SEMICOLON at the end of any declaration or statement in Pascal.
DECLARING CONSTANTS
You use the CONST section to declare a constant at the start of a Pascal
program.
Pascal syntax to declare const:
Const_identifier: = value;
Year: =2010;
MANIPULATING DATA
In a programming language, an instruction that is a single word is called a
command. A set of instructions is called a construct. In a Pascal program,
you put all the input, processing and output instructions between BEGIN and
END and after you have declared the variables and constants. These
instructions are called executable statement.
PROCESSING
Processing instructions perform the calculations. In other words, they
manipulate the data that was read or declared. Use the operators in the
table below to create arithmetic expressions in Pascal:
OPERATOR MEANING
* Multiplication
/ Real division (will return a result as a
real number)
MOD Modulus(divides two numbers and
returns the remainder)
DIV Integer division (divides two numbers
and returns the integer value)
+ Addition
- Subtraction
OUTPUT
Output instructions tell the computer to display information on the screen,
usually the results of a calculation. Your pseudocode may contain these
words for output statements: output, display, write or print. In Pascal you
use WRITE or WRITELN. Similar to the READLN, WRITELN will
automatically move to the next line when the data had been displayed in the
current line.
Example:
WRITE (‘Total Price’);
CONTROL STRUCTURES
Control Structures deal with conditional statements and loops in Pascal.
Here is a reminder of how to use conditional statements when solving a
problem.
➢ The IF – THEN construct is used when you want to compare a value
against a condition. If the condition is TRUE, a specific action is
carried out.
➢ If the problem contains more than one option – another action that
must be carried out should not be TRUE – use the IF-THEN-ELSE
construct.
➢ If you want to test more than one condition at a time, you use the
AND and OR constructs.
ARRAYS
WHAT IS AN ARRAY?
An ARRAY is a group of data items that are all the same type, such as
integers. Arrays are used to store more than one value in a variable. An
array uses several storage locations to store variables of the same type, but
the array has ONE name. You refer to each storage location using the name
of the array and a subscript or index.
In an array, the subscript or index tells the computer where to locate data
in the array.
DECLARING ARRAYS
You declare an Array like you declare any other variable but you also declare
how many variables you want in the array.
Syntax:
ARRAY_NAME: ARRAY [LOWER_NUMBER .. UPPER_NUMBER] OF
DATA TYPE;
➢ ARRAY_NAME is the Identifier you give to the array.
➢ OF DATA TYPE tells the computer what kind of data type you want
stored in the array, such as integers.
PROCEDURES
Procedures are just like small programs sometimes they are called sub-
programs. They help the programmer to avoid repetitions. A procedure
starts off with a Begin and ends with an End; It can also have its own
variables, which cannot be used with the main program.
Procedure Initialise;
Begin
Max :=0;
Min := 999’
End;
Procedure InputData;
Begin
Writeln(‘Please enter a mark’);
Readln(Marks[N]);
End;
Procedure Dertemine;
Begin
For N := 1 to 10 Do
Begin
InputData;
If (Marks[N] > Max) Then
Max := Marks[N];
If (Marks[N] < Min) Then
Min := Marks[N];
End;
End;
Procedure OutputData;
INFORMATION PROCESSING
Information processing describes the many ways that data is gathered and
Information processing has many benefits that make our lives easier and
more efficient:
➢ It makes a lot of tasks easier and faster. Example, you are able to
examined again.
you even knowing about them. These tasks require little or no control
by humans.
requirements.
person who wishes to use it. In order for it to be useful, information must
be:
solution.
devices
sold. For example, with online information you may have to pay a charge
control systems to sense when they should start operating, how they
traffic lights also contain sensors that can tell when there are cars
intruder is in a room.
switch the heating on. They switch off when the temperature
transactions from your bank account online. You can also do an Electronic
Funds Transfer (EFT). EFT transfers money from one account to another
without using cash or cheque. Many people use bank cards to make
than humans. They control robots to package products or assemble cars and
electronics.
information processing;
➢ Weather forecasting systems collect weather data all over the world
track of patient records. They also use robots to perform heart and
eye surgery.
➢ Laboratories have machines that can read and process data from
samples. For example, a machine can analyse a blood sample and find
READABLE documents.
SOURCE DOCUMENT
A SOURCE document is a document used to capture information by writing it
down. Source documents are human readable. The best example is a form,
TURNAROUND DOCUMENT
A TURNAROUND document is human readable and machine readable. A
machine creates it and a human adds more data or uses it as input for
processes records with the new data. This means that a machine creates it
as output, which you modify, and the machine uses that modified document
DATA LOGGING
Data logging is a method of automatic data capture where a reading from a
software. The sensors will take measurements and at required intervals the
software will record the data. The results can then be displayed as a graph
or a table.
detecting when errors occur (so that they can be corrected) and preventing
cause disorder.
There are two ways to prevent data errors caused by humans: data
DATA VERIFICATION
Data verification ensures that data entered into a computer contains no
errors at all. It is a very thorough way of making sure the data entered is
PROOFREADING.
different people. If the data is differing between the two entries, it does
Proofreading checks the data entered against the data on the original
source document. The person entering the data reads the source document
and checks that it matches what was entered into the computer. Sometimes
a second person will check the entered data. This is very time consuming.
DATA VALIDATION
Data validation uses a variety of checks to make sure that data is as
accurate and complete as possible. It does not check the complete accuracy
of data, but it does help ensure that fewer mistakes are made. If the data
does not pass the checks, the program may return an error or the field will
not be filled in. the checks depend on the type or nature of data that is
entered.
RANGE CHECKS
A range check ensures that numbers entered fall within a specific range.
Example: if you are entering times of the day, you may need to check that
the values for hours cannot go higher than 24. If someone enters 2500 by
REASONABLENESS CHECKS
Reasonableness checks ensure that data is reasonable – not completely
mistake.
that only numbers have been entered or that only symbols and letters have
been entered. A field that captures the age of a person may have a
CONSISTENCY CHECKS
This compares data you have entered against other data you have entered.
If you enter a person’s year of birth and their age in separate fields, a
consistency check will ensure that the two fields corresponds with each
other. Consistency checks can be used to make sure that false or dishonest
PRESENCE CHECKS
Documents and forms have required fields and optional fields. A required
field is one that has to contain a value whereas an optional field can be left
address will be required fields and your cell phone number may be an optional
field. A presence check is used to ensure that the required fields contain
data.
LENGTH CHECKS
A length check determines whether the entered data is correct length – the
right number of digits. Area codes and phone numbers usually have a fixed
detect errors arising from transcription and also to ensure that codes
correctly. It is calculated from the other digits in the number. Check digits
PARITY CHECKS
All data is transmitted as a sequence of 1s and 0s. A common type of error
error, by adding an extra digit to data to make the total number of 1s (or
0s) either odd or even. Note that a parity check can also be considered a
verification check rather than a validation checks since the parity check
➢ A field contains a single data item, and many fields comprise a record.
Each field has a name and one is the key field used to identify the
record.
➢ The way in which the records of the file are organized on the
master file after a certain time (at the end of the day or week for example).
The transaction file updates the master file. The records in the transaction
exists.
There is also another file, known as the change file or TRANSACTION LOG,
records are not stored in any order. They are simply stored one after the
other as they are added, similar to new items on a to-do-list. This type of
ordering is often used to capture transactions as they occur during the day.
they are stored until the right one is reached. This type of access is used
with sequential file ordering. SERIAL ACCESS works the same way- the
records are read one by one in the order they are stored until the desired
record is found.
where files are stored in any order. The computer maps where all this data
is stored so you can immediately access it when you search for it. RANDOM
ACCESS, or DIRECT ACCESS, allows you to access the record you want
records. In other words, records are stored in this file in sequential order
and a set of indices are used to refer to each item stored in the file. This
used when records need to be stored in sequence but individual records must
be quickly accessible.