Trace Tables: Natalee A. Johnson, Contributor
Trace Tables: Natalee A. Johnson, Contributor
Trace Tables: Natalee A. Johnson, Contributor
Good day students. In today's lesson I will continue to look at trace tables and begin to look
at relational operators and truth tables.
Here is the solution to the practice questions you were given in the previous lesson.
1. Numcount <---- 0
Sum <-------------0
Largest <----------0
Read Number
Endif
Read Number
Endwhile
Average <---- Sum/Numcount
Print Average, Largest
2. Input N
COUNT <---- 0
NONCOUNT <----0
ZEROCOUNT <-----0
Repeat
Input Number
if Number = 0 then
ZEROCOUNT <------- ZEROCOUNT + 1
end if
3. Oldage <------ 0
For j <---- 1 to 10 do
Read Name, Age
If Age > Oldage then
Oldage <---- Age
Oldperson <---- Name
Endif
Endfor
print "The oldest person is". Oldperson
Trace Tables
As indicated in the previous lesson your trace table is used to test and verify your algorithm.
Let us look at an example of how a trace table is executed using question 1 of the practice
question you were given in the previous lesson.
Example 1
Write a pseudocode algorithm to read a set of positive integers (terminated by 0) and print
their average as well as the largest of the set.
1. Numcount <---- 0
Sum <------------ 0
Largest < -------- 0
Read Number
While Number not equal to 0 do
Sum <----- Sum + Number
Numcount <----- Numcount + 1
If Number > Largest
Read Number
Endwhile
Example 1
We will use the following numbers as inout for the trace table: 2,5,6,1,10 and 0.
Largest
Number Numcount Sum (Variables used for column
headings)
0 0 0
(Step 1: Initializing key
variables)
2
2 (Step 5:
1 = (0 + 1) 2 = (0 + 2)
(Step 2: . Compare Largest with
(Step 4: (Step 3: Sum
While number is not equal number.
Numcount <---- <--- Sum +
to 0. Read input value . Number with greater than
Numcount + 1) Number)
(Number 1) Largest. Largest is now equal
to Number)
5 2 = (1 + ) 7 = (2 + 5) 5
6 3 = (2 + 1) 13 = (7 + 6) 6
6
(Note Largest remains the
1 4 = (3 + 1) 14 = (13 + 1) same because Number which
is '1' is not larger than Largest
which is currently 6)
24 = (14 +
10 5 = (4 + 1) 10
10)
0
(When the user enters this
value the algorithm will stop
as this value terminates the
program)
Average <----Sum/Numcount
For the exampleabove you will first initialize your variables as shown in the
algorithm.
Then you would repeat step 2 to step 5 until the user enters '0'. The program
will then stop.
Both the Average and the Largest value will be printed which is 4.8 and 10
respectively.
NB: When you are repeating step 2 to step 5 until the condition is met (the program ends)
you must work with the current values stored in the respective variables.
The Relational operators are used for comparison of the value of one element with another. There
are six types of relational operations: equal, greater than, less than, greater than or equal to,
less than or equal to, and not equal to. Each of these operations can be used to compare the
values of the variables. The result of each of these operators is either true or false. When using
these operators, make sure all the arguments are the same data type. Integers should be compared
with integers, strings with strings, and so on. Table 1 reviews each of these operators.
We have come to the end of lesson twenty three in our series of lessons in the CSEC
Information Technology lectures. See you next week where we will continue to look at
Relational Operators and Truth Tables. Remember if you fail to prepare, you prepare to fail.
Algorithms and flowcharts - Control Statements pt 3
Natalee A. Johnson, Contributor
Good day students. In today's lesson I will continue to look at algorithms and flow charts:
control statements and trace tables.
Loops
REPEAT
Block Statement(s)
UNTIL (condition)
or
REPEAT
Block Statement(s)
The Repeat - Until loop is similar to the 'while loop' except the condition is tested at the end
of the loop. Thus, the block of statement(s) will continue to execute as long as the specified
condition in the UNTIL statement is false. Using the same example of having a bowl of soup
with a spoon, you would continue to sip your soup as long as you have soup in your bowl.
Example 1
Repeat
__fill spoon with soup
__put spoon in mouth
__swallow soup
Until bowl is empty
Example 2
Sum <-- 0
N <----20
Repeat
Sum <-- Sum + N
N <-- N + 3
Print N, Sum
When constructing a solution to a programming question that contains a loop, ask yourself
the following questions:
Do I need to count anything? If yes, how many? For each item to be counted you
need to initialise each counter variable before the start of the loop, and you need to
put each counter construct inside the loop?
Is there any condition(s) specified by the questions? If yes, for each counter,
accumulator or print statement within the loop block, ask yourself under what
condition does it do this?
Do I need to print anything? If yes, where do I put my print statement? Inside the
loop or outside the loop? A print statement placed inside a loop will be executed
(carried out) each time the loop block is repeated.
What action must I perform when the loop terminates? You may need to calculate an
average, a difference or print a value.
PRACTICE QUESTIONS
3. Write an algorithm to read the names and ages of 10 people and print the name of the
oldest person.
Assume that there are no persons of the same age.
The prompt statement
This is the statement that we use to output a particular statement to the user in a given
pseudocode algorithm.
Print "Statement"
Example 1
Print ("Enter two numbers") (The prompt statement (asking the user to enter two
numbers) )
Print Difference
Write an algorithm to read two numbers and calculate the difference of the two numbers.
The algorithm should prompt the user for the two numbers and output the difference.
TRACE TABLE
A trace table is an important tool for testing the logics of a pseudocode for correctness. A
trace table is a rectangle array of rows and columns. The column headings are the variables
in the pseudocode. As instructions in the pseudocode are carried out and the variables are
modified, the changes are recorded in the appropriate column in the table. When the
pseudocode terminates, the final values in the trace tables should reflect the correct result.
We have come to the end of the lesson. See you next week where we will continue to look
at trace tables. Remember, if you fail to prepare, prepare to fail.
Algorithms and flowcharts - Control Statements pt 2
Natalee A. Johnson, Contributor
Good day students. In today's lesson I will continue to look at algorithms and flow charts:
control statements.
Loops
In our previous lesson, for the ' for loop' example we were required to find the sum of 10
numbers. You would agree that it would agree that it would be time consuming to sit and
memorise the 10 numbers entered in order to add them.
With the use of an accumulator you do not need to write down or try to memorise the
numbers. As in the case of the 'for loop', you can start sum with the value 0 and each
time you are given a new number you add it to your present sum. Hence the statement:
Sum <-- Sum + num, if the first number entered is 40, your sum would be 40. Therefore
Sum <--- Sum + num, would be Sum <--- 0 + 40 = 40
If you then add another number, say 10 to your present sum, your new sum would be 50.
The process will continue until all the numbers have been totaled. The only value you will
keep in your memory is the current sum.
Counters
Counter <--- 0
Counter <---- Counter + 1
In the example abovem, counter is initially set at 0, which means that every time the
assignment statement is executed, the value of the counter variable is increased by 1. Thus
the assignment statement will provide a mechanism for counting. Using the same for loop
example, a counter would count and keep track of the 10 numbers which would be entered
and then totaled. Such that only 10 numbers will be entered.
Please note you could start your counter at 2, 5 and so on, depending on the
algorithm.
The While Loop
Block Statement(s)
Endwhile
The 'While' loop is an example of an indefinite loop; it facilitates the repetition of a block
of instructions until a certain condition is met. No one knows exactly how may times the
block statements (instructions) will be carried out. Using the same example of having a
bowl of soup with a spoon, no one can tell how many sips you would take that will fill your
stomach. It depends on the size of your stomach and the size of the spoon. The algorithm
would look something like this:
Example 1
Please note you use the WHILE LOOP when you do not know exactly ho many
times a block of statements will be carried out. In this case there will be some
terminating condition.
Example 2
Write a pseudocode algorithm to read a set of integer numbers terminated by 999. The
pseudocode should find the sum and average of th enumbers. The algorithm should also
output the sum and avergae of the numbers
Pseudocode version
This program will read a set of integer numbers and calculate the sum and average of the
numbers.
Sum <-- 0
Counter <-- 0
Read number
While number <> 999 do
Endwhile
Average <--- Sum/Counter
Print "The sum is", Sum
Print "The Average is", Average
We have come to the end of another lesson. See you next week where we'll continue to look
at control statements: Loop Structures. Remember, if you fail to prepare, be prepared to
fail.
Algorithms and flowcharts - Control Statements
Natalee A. Johnson, Contributor
Good day students. In today's lesson I will continue to look at algorithms and flow charts:
control statements.
Loop (repetition)
Most of the things we do in our everyday lives require some form of repetition, like getting
ready for school or work. You perform the same steps over and over five to seven days per
week.
When we want the computer to repeat some statements several times, we need a loop
structure or a loop in the pseudocode to instruct the computer what to repeat and how often
these steps are to be repeated.
Initialisation
Repetitive statement(s)
Conclusion
Initialisation
Before a loop is started, we may need some statements to get started. For example, we
may need to initialise a variable to a start value or read an initial value into a variable.
Repetitive statements
Loop block
We must specify what statements are to be repeated by the computer. The repetitive
statements are normally placed in the loop block.
There are namely three main types of loop constructs and they are: For Loop, While Loop
and Repeat Until. Let us now examine each of these loop constructs.
For Control_Variable = 1 to N Do
Block Statement(s)
Endfor
The "FOR" loop is an example of a definite loop, it facilitates the repetition of a block of
instructions a definite number of times. Let us look at an example of having a bowl of soup
with a spoon; you could have at least 20 sips of the soup. The algorithm would look
something like this:
Example 1
Please note you use the FOR LOOP when you have a block of statements that will be carried
out a set number of times, otherwise you use a different loop construct.
Example 2
Pseudocode version
Algorithim Sum
This program will read 10 numbers and find the sum of those numbers.
Sum ---- 0
Read number
Sum ----- Sum + number
Endfor
Print "The sum is", Sum
We have come to the end of another lesson. See you next week where we'll continue to look
at Control Statements: Loop Structures. Remember, if you fail to prepare, be prepared to
fail.
System and Applicaton Software (pt 2)
Natalee A. Johnson, Contributor
USER INTERFACES
Advantages of GUIs
Reduced typing
Disadvantages of GUIs
Clicking an icon can produce unexpected results because of a lack of icon standard
PRACTICE QUESTIONS
Question 5
Your teacher has given you notes on Windows NT, Windows 2000, UNIX and LINUX.
(a) State the type of system software illustrated in the above examples.
(b) Explain why this software is necessary for a computer system.
(c) For EACH of the following types of application software, state whether it can be
described as general purpose, custom-written, integrated or specialised.
(i) A programme that includes all the major types of applications and brings them together
into a single software package.
(ii) Software written solely for a specific task and its users are trained in a particular field.
(iii) Software which can be modified by writing or adding programming modules to perform
specific tasks.
(iv) Software which is not specific to any organisation or business and can be used by
anyone.
Question 6
Name the TWO types of user interface which are represented in the figures below.
C > dir
Figure 1 Figure 2
(a) Discuss which user interface would be better for someone who is not familiar with a
computer.
(b) State the name of another user interface not mentioned in (b).
We are now officially starting a new unit in the syllabus. With this unit, your problem-
solving skills and ability to write simple programs will be tested. So, the question is: do you
like to solve problems? If you do, then you should do well with this unit. If you are not the
problem-solving type, we will work together, nonetheless, to have you develop the skill of
doing so.
Let us begin. In our everyday life we actually solve simple problems. For example, you have
a problem getting to school early in the morning. How would you solve this problem?
You would then evaluate the possible solutions to determine the best solution to the
problem.
Choose the best solution to your problem.
Similarly, the computer is designed to solve problems for you, the user. How is this
possible? A computer solves end-user problems by following a set of instructions given to it
by the programmer and produces the specified results. The computer programmer creates
the instructions for the computer to follow. These instructions are referred to as computer
programs. You were introduced to the term computer programs when we looked at
software. A computer program is a finite set of clear and specific instructions written in a
programming language.
4) Represent the most efficient solution as an algorithm (you will learn about this in
upcoming lessons)
We have come to the end of lesson 16 in our series of lessons. See you next week when we
will continue to look at problem-solving and program design. Remember, if you fail to
prepare, prepare to fail.
System and Applicaton Software
Natalee A. Johnson, Contributor
Good day, students. This is lesson 15 of our series of Gleaner information technology
lessons. Today, we will continue to look at system and application software.
We will continue to look at the choice of O/S, which is dependent on the processing
environment required by the user. The first environment we looked at last week was batch
processing. Let us look at the others:
Time-sharing multi-processing
The processor's time is divided into small units called time slices and shared, in turn,
between users to provide multi-access. These systems allow the CPU to switch between
different programmes rapidly, so that users are unaware that they were 'time-sharing' the
CPU with others. Several persons can connect to the main computer via dumb terminals and
access different application programmes.
These systems came on the scene with the advent of personal computers. The majority of
small micro-computer-based systems have operating systems, which allow a user to
operate the machine in an interactive conversational mode (response to the user's message
is immediate), but normally only one user programme can be in main storage and
processed at a time. There is no multiprogramming of user programmes. Multiprogramming
occurs when more than one programme in main storage is being processed, apparently at
the same time. This is accomplished by the programmes taking turns at short bursts of
processing time.
Single-user multi-tasking
This system only allows one person to use the computer at a time to do multiple tasks.
This is a system that is able to process data so quickly that the results are available to
influence the activity currently taking place. There is often a need for multi-processing.
Multi-processing is the name for the situation that occurs if two or more processors are
present in a computer system and are sharing some, or all, of the same memory. In such
cases, two programmes may be processed at the same instant. These systems are used
mainly in critical systems. Critical systems are systems where delay in the processing of
data after its input can lead to the destruction of life and property. Examples of critical
systems are systems that monitor critically ill patients, nuclear plants, the engine of an
aeroplane, etc.
Utility software
Utility programmes perform tasks related to the maintenance of your computer's health,
hardware or data. Some are included with the operating system; others can be bought as a
separate package. Utility programmes perform tasks such as:
File management
Disk management
Back-up
Data recovery
Data compression
Antivirus programmes
USER INTERFACES
The interaction between end users and the computer is said to take place at the human
computer interface (HCI). The term 'human computer interface' is meant to cover all
aspects of this interaction, not just the hardware. One of the most important features
normally required in an HCI is that it be user- friendly. As the name suggests, a user-
friendly interface is one that the end user finds helpful, easy to learn about and easy to use.
It is easy to recognise unfriendly interfaces, but not so easy to design one that is certain to
be user-friendly.
Types of interfaces
There are many different types of user interfaces available. They may be broadly classified
as follows:
Command-driven interfaces
Menu-driven interfaces
Note: In some situations, two different types of interfaces may be combined, for
example, a menu interface with command options.
Command-driven interfaces
One of the long-established methods by which users can interact with the computer is
utilising commands. Commands enable the user to quickly and simply instruct the computer
what to do. However, they require the user to already have knowledge of what commands
are available, what they do and the rules governing how they should be typed, so they are
more suited to experienced users than the end user. A technical person, such as a computer
operator or programmer, would be familiar with the commands, or where the end user
continually works with the same programme and, therefore, can gain mastery of the
commands.
It is sometimes difficult to remember all the commands. Therefore, users have to constantly
refer to the software user manual.
The user is restricted to using only the keyboard as the interfacing device, while with other
interfaces, a wide variety of input devices can be used.
Commands must be entered at a special location on the screen and in a set format.
Menu-driven interfaces
Menus provide another popular form of user interface. There are many different alternative
forms of menus. The simplest menus provide the user with a number of options and a
simple means of selecting between them. The user is presented with a choice and,
therefore, does not have to remember any commands. The interface is, therefore, suitable
for beginners and infrequent users. All the user has to do is to make a choice. A special type
of menu, called a pop-up menu, an additional sub-menu, pops up as a selection is made.
You can click anywhere on a given document using the right-click mouse button to allow a
pop-up menu to appear.
Pull-down menus are a special type of menu used in windowing and were briefly
introduced. It is a menu displayed as a vertical list which hangs from a horizontal bar on the
screen in order to elicit a choice from the user.
The user is presented with a list of options to choose from, they do not need to
remember the commands.
Free from typing errors, because the user does not have to type the commands
We have come to the end of Lesson 15 in our series of CSEC information technology
lectures. See you next week when we will conclude looking at user interfaces and the topic
'system and application software'. Remember, if you fail to prepare, you prepare to fail.
Application and system software (pt 2)
Natalee A. Johnson, Contributor
Good day students. In today's lesson, I will continue to look at system and application
software.
SYSTEM SOFTWARE
Many systems are supplied by the computer manufacturer since, to write them, a
programmer needs in-depth knowledge of the hardware details of the specific computer. On
the other hand, many applications can be written with very little knowledge of the hardware
details of a specific computer, and can run on several different computers, with little or no
modifications.
The most important systems programme is the 'operating system'. This actually consists of
a number of designs to ensure the smooth running of the computer system. Other common
system programmes (from the user's viewpoint) are:
1) The editor - this programme enables users to create files for storing their programmes
and data. It also provides facilities for making changes (such as adding or deleting lines) to
files.
2) Language translators - people normally write programmes in what are called high level
languages (such as Basic, Pascal, Fortran or Cobol). Before the computer can run these
programmes, they have to be translated into the binary codes known as the machine
language. Each language needs its own translator. Language translators can be divided into
three broad classes: compilers, interpreters and assemblers.
3) Diagnostic programmes - these provide facilities which help users to debug (remove
errors from) their programmes more easily.
4) Utility programmes - on a typical computer system, there are many routine functions
and operations which users may wish to perform. Utility programmess are usually provided
to perform these functions and operations. One of the most common of these is the sorting
of data into desired sequence.
OPERATING SYSTEM
An operating system may be seen as a suite of programmes that has taken many functions
once performed by human operators. The sophistication and speeds of modern computers is
beyond the capability of human operators to control without the aid of an operating system.
The role of the operating system is, therefore, one of resource management. The primary
resources it manages are:
Processors
Storage
I/O devices
Data
Programmes
It is quite evident that the operating system controls the way software uses hardware. This
control ensures that the computer not only operates in the way it's intended by the user, but that it
does so in a systematic, reliable and efficient manner. This 'view' of the operating system is
shown :
Part of the operating system remains in main storage permanently during the running of the
computer. This part is called the Kernel (or Supervisor or Executive) and, as the name
suggests, it is the controlling part of the operating system. It controls the running of all
other programmes. The remainder of the operating system programmes is stored on a
direct access storage device from which any particular one will be 'called' into main storage
by the kernel when required.
On many, very small microcomputers, the kernel is stored permanently in ROM and starts
execution the moment the computer is switched on. A message is usually displayed by the
kernel to signify it is ready to accept commands from the user. On most modern computers,
the kernel is not in main storage when the machine is switched on. The system must be
'booted up'. This sometimes involves pressing special 'boot buttons', keys or switches,
which cause the hardware to load the kernel into main storage from a predetermined
position on a disk.
In multitasking, where multiple programmes can be running at the same time, the
operating system determines which application should run, in what order, and how
much time should be allocated for each application before giving another application
a turn.
It manages the sharing of internal memory among multiple applications.
It handles input and output to and from attached hardware devices such as hard
disks, printers and dial-up ports.
On computers that can provide parallel processing, an operating system can decide
how to divide a programme so that it runs on more than one processor at a time.
The applications for which a computer is needed largely determine the choice of hardware
and accompanying software. The operating system supplier will need to consider these
factors:
The method of communication with the computer, for example, many or few
peripherals
Examples of operating systems include: Windows 1.5 to Windows 2007, UNIX, LINUX, DOS,
MAC OS, and so on.
The choice of O/S is also dependent on the processing environment required by the user.
This includes:
Batch processing
Time sharing multi-processing
Batch systems
These are systems that provide multi-programming of batch programmes but have few
facilities for interaction or multi-access. Commands, or jobs, are collected in groups and
processed in the order in which they are placed; that is, in a 'first in, first out' sequence.
Each group of commands or jobs is called a batch. The jobs are entered in a batch queue
and then run one or more at a time, under the control of the operating system. A job may
wait in a batch queue for minutes or hours, depending on the workload. No amendments
are possible during processing.
We have come to the end of lesson 14. See you next week when will conclude looking at
operating systems and begin to look at user interfaces. Remember, if you fail to prepare,
prepare to fail.
Binary representation
Natalee A. Johnson, Contributor
Good day students. In today's lesson, I will begin to look at binary representation and
manipulation. How are you with figures? This week's lesson, and other lessons to come, will
require you to do some calculations.
Computers store and manipulate data numerically, using the binary system (referred to as
the machine language) which is comprised of '1' or '0' and, of course, we will be working
with base 2 in our calculations.
To convert decimal numbers to binary you are simply going to be dividing the number by 2
and subsequently making a note of the remainder. You will stop dividing when you arrive at
zero. The binary answer is written from the bottom up. Let us now look at an example.
Example 1
When converting binary numbers to decimal, for each of the binary digits (bit) you are going
to have base 2 raised from 0 to the corresponding number of bits you have. So, if you have
four bits, then base 2 will be raised from 0 to 3, for example, 20 - 23. Then the value you
get when two is raised to the corresponding number is multiplied by its corresponding bit,
starting from right to left. You then add the corresponding decimal numbers together to get
the decimal equivalent of 10112. Let us now look at an example.
Example 2
Binary Addition
When adding numbers in binary, there are five rules you should apply:
0+0=0
0+1=1
1+0=1
1 + 1 = 10 (This is the binary equivalent of 2, which is read as 'one zero' and not 10)
1 + 1 + 1 = 11(This is the binary equivalent of 3, which is read as 'one one' and not 11)
Example 3
Subtracting in binary
When subtracting numbers in binary, there are four rules you should apply:
Please ensure that you include base 2 in your answers as shown above.
PRACTICE QUESTIONS
1. For questions a and b, convert the decimal numbers to binary and for c and d, convert
the binary digits to decimal numbers.
(a) 90
(b) 25
(c) 1010002
(d) 110002
We have come to the end of lesson eight in our series of lessons. See you next week when
we will continue to look at binary representation and manipulation. Remember, if you fail to
prepare, you prepare to fail.
For future use
Natalee A. Johnson, Contributor
Good day students. This is lesson three of our series of lessons. Today we will be looking at
secondary storage media.
Secondary storage media became necessary out of the fact that primary storage devices
such as RAM and ROM are limited in size and are temporary or volatile, while secondary
storage is permanent and can be used for backup purposes and future use. A comparison
can be made among the variety of secondary storage devices in respect to their portability,
speed and capacity.
Storage capacity - This is referring to the amount of information that a particular storage
medium can hold. Large capacity storage devices are more appreciated and preferred for
many sophisticated programmes and large databases.
Access speed - This refers to the average time needed to locate data on a secondary
storage device. Access time is measured in milliseconds.
Portability - This refers to the ease and accessibility of a device to transfer information
from one computer to another.
Every secondary storage device or medium requires its own drive. Media (singular:
medium) are the physical hardware on which a computer keeps data, instructions and
information for future use. Examples are diskettes, hard disk, compact disc and tapes.
Storage devices record and retrieve data, instructions and information to and from storage
media. Examples are floppy disk drive, Hard disk drive, compact disc drive.
Direct access storage - This is where any data can be accessed without reading any other
data items first (randomly). Examples: floppy diskette, flash drive, hard disk drive, etc.
Serial access storage - This is where all data between the read/write head and the
required data have to be passed over before the data can be accessed.
Read/write head - A device that reads data from and writes data on to a storage media.
Floppy diskettes
Hard disks
Magnetic tape
Flash memory
Floppy disk
This is a removable disk that has a small storage capacity; it is typically used to store
documents so it can be used on more than one computer. Diskettes are normally used to
store backup copies of important information (in case original copy becomes damaged or
lost) and to transfer information from one computer to another. Diskettes are available in
two sizes: 5 and 3 .
This is normally permanently installed and fixed into the computer. However, there are
external hard drives available. A hard drive can access data much more quickly than floppy
disk drive; most importantly, it can store much more data.
Magnetic tape
A magnetic tape is a tape coated with a magnetic material on which data can be stored. This
is a sequential access storage device that is usually used for backup purposes. Types of
magnetic tapes include cassette, cartridge and reel.
A USB flash drive is a very small, portable flash memory that plugs into a computer USB
port and functions as a portable hard drive. USB flash drives are easy to use as they are
small enough to be carried in a pocket and plug into any computer with a USB drive.
CD-ROM
CD-ROM is an optical disc capable of storing large amounts of data (up to 1 GB). The CD-
ROM has replaced the floppy disk as the media for software distribution, as it has the
storage capacity to hold as much data as 700 floppy disks. Data on this medium can be
read but, unlike magnetic disks and tapes, they cannot be changed (read only).
WORM
WORM discs are non-erasable discs that can offer up to 20GB of storage capacity on a single
disc. While WORM discs are very portable, their inability to erase data written to the disc
makes this removable storage a favourite for archival purposes, that is, for storage of
historical information.
Compact Disc Recordable and Compact Disc Rewritable are types of CDs that allow data to
be written to (stored on) discs. CD-R drives allow users to record information to a CD,
providing an easy way to archive data or share files. CD-RW discs allow you to write data to
the CD multiple times.
DVD
A DVD is a type of optical disc technology similar to the CD-ROM. A DVD holds a minimum
of 4.7 GB of data, enough for a full-length movie. It is commonly used as a medium for
digital representation of movies and other multi-media presentations that combine sound
with graphics. It is becoming increasingly popular, as it can store much more data than CD-
ROMs; up to 17 GB of data.
FLASH MEMORY
Flash memory is a non-volatile computer memory that can be electrically erased and
reprogrammed. It is a technology that is primarily used in memory cards and USB flash
drives for general storage and transfer of data.
To review last week and this week's lesson, complete this past paper question:
1.(a) Give ONE similarity and ONE difference between EACH of the following pairs:
We have come to the end of our third lesson. See you next week and remember, if you fail
to prepare, prepare to fail.
It's time for memory storage
Natalee A. Johnson, Contributor
MEMORY STORAGE
¯ Cache
¯ Buffer
A memory chip is one that holds programmes and data either temporarily or permanently.
Let us now look at each of these categories.
RAM
RAM or primary storage is the chip located next to the CPU and is referred to as being
volatile. It is considered so because its content is erased whenever the flow of electricity to
the processor is terminated. This is why your teacher will often remind you to save your
work frequently. RAM performs three main functions:
ROM
A ROM chip stores data permanently or is often times referred to as being non-volatile. The
information on a ROM chip is stored on it by the manufacturers and cannot be modified or
erased by the user. The processor can read and retrieve the instructions and data from the
ROM chip, but its content cannot be changed. Whenever you turn on your computer and it is
booting up, messages are made possible by the information in ROM.
EPROM is a reusable PROM-chip that can be erased by a special ultraviolet light. EPROM
holds its content until erased and new instructions can be written on it. To reprogramme an
EPROM chip it has to be removed from the computer.
The EEPROM chip is similar to an EPROM chip except that it is erased by applying electrical
pulses to the chip, making it possible to reprogramme the chip without removing it from the
computer.
CACHE MEMORY
Cache memory is a special high-speed memory designed to supply the processor with the
most frequently requested instructions and data. Instructions and data located in cache
memory can be accessed many times faster than instructions and data located in main
memory. The more instructions and data the processor can access directly from cache
memory, the faster the computer runs as a whole.
BUFFERS
A buffer is an internal memory area used for temporary storage of data records during input
or output operations. For example, most modern printers are equipped with buffers that
store information or data to be printed.
UNIT OF STORAGE
Bit - a unit of storage that has two possible values 0 and 1. It is the smallest unit.
Word - the size of the data (or instruction) that the CPU can handle in a single cycle.
Address - the identification of a particular location in the memory where a data item or an
instruction is stored.
Bistable device - a device that can exist in one of two possible states. It can be compared to an
on/off switch
Total - 8 mark
The computer system
Natalee A. Johnson, Contributor
Good day, students. Welcome to a new school year. I trust you had a restful summer for the
work that lies ahead.
Remember that your examination in 2010 will be based on the new syllabus and there will
be no practical examination for Paper 02. It is also imperative at this time that you
complete your school-based assessment (SBA), which is now 30 per cent of your final
grade. The SBA components are: Word Processing, Spreadsheet, Database Management
and Problem Solving and Programming.
This is lesson one of our series. Today, we will be looking at the computer system.
A computer may be defined as an electronic device which accepts input, processes the input
and produces results (output) from the processing and store data and results for future use.
Even though we tend to use the words data and information interchangeably, there is a
difference between the two. Data is a set of raw facts and figures while information is
processed data.
The main components of a computer system are hardware, software and the user.
Hardware - This is the name given to the physical parts of a computer that you can
see and touch. There are five general categories:
Input devices - They get data into a computer. A mouse, keyboard and a scanner
are all input devices.
Central processing unit (CPU) - This is the brain of a computer and controls how
the rest of the computer works. It is assisted by the control unit (CU) and the
arithmetic logic unit (ALU). The CU carries out instructions in the software and
directs the flow of data through the computer; the ALU performs the calculations and
logic operations.
Output devices - They get processed information out of a computer, for example,
to a printer, monitor or even speakers.
Storage devices - Include floppy drives, hard disk drives, flash drives, CD ROM
drives, and so on, that are used for storing information permanently.
Software - This is the name given to the computer programmes that tell the
hardware how to work. Without software the computer hardware would do nothing
as there would be no instructions.
Computer programmes - These are instructions (programmes) produced by
programmers to create system and application software.
We have come to the end of our first lesson in our series of information technology lectures.
See you next week. Remember, if you fail to prepare, you prepare to fail.
Answers for last week's past-paper questions
Nadine S. Simms, Contributor
Good day students. In today's lesson we will be looking at the answers to last weeks past-
paper questions for the theory examination. The example used for the purposes of this and
the previous lesson was the May 2008 theory exam.
Answers
1. a. 1) The black-ink cartridge was installed incorrectly. 2) The ink level is low in the black-
ink cartridge.
2. General purpose application packages are designed to cover a single, but broad
application scope, while a specialised application package gives the user different tools for a
narrow application scope.
3. a. Electronic eavesdropping refers to the use of electro- nic devices to monitor electronic
communications between two or more communicating parties without permission from any
of those involved.
b. ONE physical access restriction that would help to ensure that ONLY authorised members
in a department have access to important computer equipment is fingerprint recognition to
gain access to the room.
c. ONE security measure that would ensure that ONLY authorised members in a department
have access to a document is password.
d. A sharing restriction can be used when one person is accessing a document that can be
accessed by others because this would prevent duplicates of the document as well as the
document containing outdated or incorrect information.
a. One similarity between the two is that they both require the use of the telephone/
modem to be completed.
b. Teleconferencing refers to the use of the computer, Webcam and modem to communicate
by way of a conference with more than one person located in different places while
telemarketing is the use of the telephone to sell goods and services.
http://www.youthalive.org/index.html
a. www.youthalive.org would be considered the website.
e. A URL (uniform resource locator) is the address of a Webpage on the World Wide Web.
f. www.risingsun.org
6. A consultant has encouraged the administration of the bank where you work to install an
MICR system.
b. MICR can be used to create special characters on checks for security purposes.
c. Before agreeing to install the MICR system, the systems analyst and the network
manager must determine:
ii. The network manager - locations of servers and other devices to support the MICR.
(Refer to your previous lessons if you are not confident in answering the following
question.)
Line 1 A = 3
Line 2 B = 5
Line 3 Sum = 1
Line 5
Line 6 ... B = B + A
A B Sum
3 5 1
3 8 9
3 11 20
c. State the result of the algorithm - the result of the algorithm is 20.
b. = - equal to
We have come to the end of another interesting lesson. See you next week where we will
complete this year's lessons with some general examination tips. Remember, work not hard,
but very smart.
Theory past papers
Nadine S. Simms, Contributor
Good day, students. In today's lesson we will be looking at some past paper questions for
the theory examination. This accounts for 30 per cent of your final grade.
The example that will be used for the purposes of this lesson is the May 2008 theory exam.
Instructions
1. The paper has four sections and all sections are to be completed.
Questions
1.
a. Give two reasons why a colour inkjet printer may print colour, but not black.
3.
b. Identify ONE physical access restriction that would help to ensure that ONLY authorised
members in a department have access to important computer equipment.
c. Identify ONE security measure that would ensure that ONLY authorised members in a
department have access to a document.
d. Explain why a sharing restriction can be used when one person is accessing a document
that can be accessed by others as well.
http://www.youthalive.org/index.html
e. What is a 'URL'?
6. A consultant has encouraged the administration of the bank where you work to install a
MICR system.
c. Before agreeing to install the MICR system the systems analyst and the network manager
must determine:
The benefits this new feature will bring to the bank and
(Refer to your previous lessons if you are not confident in answering following question)
Line 1 A = 3
Line 2 B = 5
Line 3 Sum = 1
Line 6 B = B + A
i. An assignment statement
ii. A loop
A B Sum
3 5 1
a. >=
b. =
c. <
d. < >
e. <=
f. >
We have come to the end of another lesson. See you next week when we will review the
answers. Remember to work not hard, but very smart.
Layout of a practical paper
Nadine S. Simms, Contributor
Good day students. In today's lesson we will be looking at the layout of a practical paper
and how to approach it. The practical examination is worth 50 per cent of your final grade.
It is, therefore, very important that you get the highest grade possible on this paper.
Practical examination
The example that will be used for the purposes of this lesson is the June 2007 practical
exam.
Instructions
1. The time allotted for the examination is two hours as well as extra time for printing.
2. There are three questions on the examination with subsequent sub-questions: one for
word processing, spreadsheet and the other for database management.
3. It is advised to perform the instructions in the order given. Failure to do so may result in
the incorrect information being presented for grading. This can vary on what the question
requires of you.
(d) Insert title Rows in the first two cells of the spreadsheet.
(g) Format the headings of numeric columns to be justified as requested (right, left or
centre).
(i) Italicise the content of certain cells, in this case the names of countries.
(j) Format fonts in the spreadsheet based on size, boldness, justify as requested (right, left
or centre), merge and centre across the columns used by the spreadsheet.
(k) Insert a footer with your candidate number. This will have to be done in the page set-up
area of the spreadsheet, refer to the previous lessons on spreadsheet tips.
(m) Insert a formula to computer percentage based on the layout given. (It is practical to
use cell referencing when creating formulas, refer to previous lessons on spreadsheet tips.)
(n) Insert a function to display the date. You can then format the cell to what was specified
in the question.
(o) Sort the spreadsheet in either ascending or descending order. This option can be found
in the toolbar at the top of the page.
(p) Filter data based on a specific criteria and save elsewhere in the spreadsheet.
(q) Create a chart based on certain information given. Remember, to select more than once,
hold down the CTRL key and use your mouse to select multiple cells.
(c) Create a form based on a specified table so that all the information for the table may be
entered through the form. (Refer to previous lesson on database management tips.)
(d) Using the form created in (c) above, enter the information given.
(h) Perform a query to increase a specified field for each record by five. (This is an action
query, the update query. To prevent mistakes, you should first make a copy of the table
and then perform the update. If the update is correct, you may delete your copy of the
table and work with the newly updated one.)
(In these, one would ensure the totals area in the design view of your query is present so
that the total and maximum can be used as criteria).
A calculated field takes information from one or more other fields and performs
mathematical operations to provide new information. It is written in this format:
Commission represents the name you are giving to the field. Sale amount is the name of a
field already in the database and must be in square brackets. Other examples include:
(n) This question asks you to create a report. Based on the information required you should
be able to tell what tables or queries one should use to create the report.
Question 3 - Word processing (refer to the previous lessons on word processing tips)
(a) Combine two word files and save under a new name on your diskette. (Copy the
information from both files to a new document and save as the name given).
(b) Underline some text within the newly saved document. (Highlight the text and select
underline).
(c) Indent two areas in the document. (This can be done by placing the cursor in front of
these areas and pressing tab)
(d) Insert the information given as a table and place as the last paragraph in the document.
(e) Insert specified text as the title of the document; it should be two lines above the
content of the document. It should be formatted to be bold, centred, and of Arial font size
20.
(g) Set the line spacing of the second paragraph to be 1.5" (Highlight the entire paragraph
then select 1.5" for line spacing). Remove underline from a specified text in this paragraph.
(h) Place the text of the document into two newspaper columns. According to what should
be in the first and second columns. Make use of column breaks to achieve this. The title of
the document should not be affected.
(i) Insert a footer to the right of the document with your candidate number.
(k) Replace all occurrences of a certain word with another. (The find and replace tool can be
used to do this. Press CTRL+ f and the window will pop up giving you the option to find and
replace)
(l) Change the case of a specified text to uppercase. (You may highlight the text, right click
it then click font-> from there click the check box with uppercase)
(m) Interchange two paragraphs and save the file on your diskette as the name specified.
(o) Insert the column chart created in the Spreadsheet question. (Simply copy the chart and
paste it into this word document.) Insert a footer, your candidate number at the centre.
(p) Use your spreadsheet as your data source and insert the correct merge fields as
depicted in the document.
(q) Merge the data source with the original document and save as directed.
The questions previously presented, as well as suggestions for some, can be completed
correctly with practice. Also, review the previous lessons on word processing, spreadsheet
and database management tips.
We have come to the end of another interesting lesson. See you next week and remember
to work not hard, but very smart.
Information technology
Nadine S. Simms, Contributor
Good day students. In today's lesson we will be exploring a database management tool, the
query, which is one of the most important in the practical aspect of the examination.
Queries are used to extract data from a database. Queries ask a question of data stored in a
table. For example, a query could display only students who checked out biology books in a
database.
Lastly, practising before the exams by way of your SBAs or past papers can help you to gain full
marks. See you next week and remember to work not hard, but very smart.
Creating charts in a spreadsheet
Nadine S. Simms, Contributor
Good day students. In today's lesson we will be going through some spreadsheet tips for
the practical aspect of the examination.
Chart
Altering this data will subsequently alter the data on the chart. Excel has 14 different chart
types, but not all data are appropriate for every chart.
1. Create a worksheet that has rows and columns of information that can be used in a chart.
2. Select the range of cells containing the data you want plotted in the chart. If the data is not
next to the text you want to use as chart labels, use the Ctrl key to select the separate ranges.
3. Click on Insert>Chart, or click on the Chart Wizard button. Select a chart type in the Chart
Wizard. Select a chart sub-type. Click on Next.
4. The chart source data dialog box will appear. This dialog box shows a preview of the
chart and demonstrates what data are being used to create the chart. Click on Next.
6. Click on the Legend tab. This section lets you decide whether or not you want to display
your chart's legend. If you chose to display the legend, it also allows you to choose where
you want the legend displayed.
7. Click on the Data Labels tab. This section allows you to choose how you want to have your
data labelled. Click on Next.
8. Select where you want to place your sheet.
9. Click on Finish.
AutoFill
The AutoFill facility of Microsoft Excel saves on time when creating a spreadsheet. If our
spreadsheet involves the months of the year, we could type Jan for January in the first cell.
Put the cursor at the bottom right hand corner of this cell and a + will appear. Click and
drag this button 11 cells over and these cells are filled with the remaining 11 months. This
same principle can be used to fill cells with numbers that increase by a constant figure. For
example, if 0 is placed in the first cell and 5 in the second, the drag and routine of the + will
produce 10, 15, 20 in the other cells.
What is a database?
Database basics
When you open an Access file, whether existing or new, you will see the Database window.
This contains many objects, but in this lesson we will discuss only four: Tables, Queries,
Forms and Reports.
Tables - Used to enter, store, organise, and view data. For example, one table could store
a list of students and their IDs, while another table could store books the students borrow.
Queries - Used to extract data from a database. Queries ask a question of data
stored in a table. For example, a query could display only students who checked out
biology books.
Reports - Used to display and print select information from a table in a visually
appealing customised way.
Creating a database
Open Microsoft Access, Click File>New (the new file pane will open). In this pane, click Blank
Database (a dialog box will open). Enter the name of your database and select where you want to
save, in this case your 3 1/2-inch Floppy Disk, click Create.
Tables
Creating a table - in the database window select Tables> (look in the pane to the right and
double- click>Create Table in Design View. This will now open a new window with three
columns [similar to the one shown here]. The field name represents the column headings
for your table, data type - the type of data that will be stored - and description (optional) of
the information that is stored.
Having entered your column heading information, click the datasheet view button to view
your table and enter the information.
Primary key - a unique identifier of a table, usually a number, such as a student ID,
or a product asset tag, etc.
Queries
Queries are used to extract information from the database based on criteria that you define.
Click the Queries icon. Double-click on Create Query in Design View. The Show Table dialog
box then appears listing all of the tables in the database. Click the name of the table that
contains the fields you want to use in the query. Click the Add button. Repeat for each table
you want to add. Click Close when you finish adding tables. The Query Design view window
then opens. The tables you selected appear in the top pane of the Query Design view. Click
Close when you finish adding tables. The Query Design view window then opens. The tables
you selected appear in the top pane of the Query Design view. You can then add the fields
you need by double-clicking on the field in the table in the top pane. You can specify the
information you want in your queries and complete simple calculations in the criteria fields
that appear below the fields you have selected.
Relationships
Relationships are very important in Microsoft Access. Many times, students will run queries
and they are incorrect as they contain duplicate information. This is so because they did not
create a relationship between their tables. When you create a relationship between tables,
the common fields are not required to have the same names; rather, the common fields
must have the same data type and the same Field Size (you would have selected this when
you created your tables). Click the relationships button on the Design tab in the
Relationships group, click Show Table. The Show Table dialog box displays all of the tables
and queries in the database. To see only tables, click Tables. To see only queries, click
Queries. To see both, click Both. Select one or more tables or queries and then click Add.
Drag a field (typically the primary key) from one table to the common field (the foreign key)
in the other table. The Edit Relationships dialog box appears. Click Create. Microsoft
Access© will then draw a relationship line between the two tables.
Forms
Forms are an easy way to enter, edit and view data (Figure
1). Any table or query can be converted into a form. Forms
can include fill-in-the-blank fields, check boxes, lists of
options, etc.
Creating a form
Click the Forms icon in the Objects bar. You will see two
options in the Database window: Create form in Design
view and Create form by using wizard. Double-click Create
form by using wizard. The Form Wizard dialog box will open. In the Form Wizard dialog box,
select your table from the Tables/Queries dropdown menu. Double-click or use single arrows
to choose fields from the Available Fields list. Having selected your fields, click Next. Choose
a design for your form (for example Columnar, Tabular and Justified) by clicking one of the
radio buttons. You can preview the design as you click the buttons. Choose a style for your
form by clicking one of the styles from the list. Type in a name for your form in the dialog
box and click Finish.
Reports
Double-click Create report by using wizard. The Report Wizard dialog box will open. In the
Report Wizard dialog box, select your table from the Tables/Queries dropdown menu.
Double-click or use single arrows to choose fields from the Available Fields list. Once you
have all the necessary fields, click Next. In the next step you can add grouping to your
report by selecting one of the fields (see picture). Choose a sorting order for the data in
your report. Select fields from the dropdown boxes and assign either Ascending or
Descending sorting order by clicking the appropriate buttons.
Click Next. Choose a layout and orientation for your report by clicking the radio buttons.
Click Next. Choose a style for your report by clicking on a title form the list. Click Next. Type
in a name for your report in the dialog box (don't use spaces or special characters) and click
Finish. You will see the print layout of your report.
For more information on the 'how tos' of Microsoft Access©, visit the website at
office.microsoft.com or use a search engine to find how to do a specific task. Lastly,
practising before the exams by way of your SBAs or past papers can help you to gain full
marks.
We have come to the end of another interesting lesson. See you next week and remember
to work not hard, but very smart.
Spreadsheet tips for practical exams
Nadine S. Simms, Contributor
Good day students. In today's lesson we will be going through some spreadsheet tips for
the practical aspect of the examination.
Spreadsheet tips
A spreadsheet refers to a programme used for accounting, budgeting and other types of
number-crunching tasks. A spreadsheet helps you manage, analyse and present
information. It also refers to a document that stores data in a grid of rows and columns.
Rows are labelled using numerals (1, 2, 3, etc) while columns are labelled with letters (A, B,
C, etc). Two popular spreadsheet programmes are Lotus 1-2-3 and Microsoft Excel.
Spreadsheet basics
Worksheets: Add a worksheet to a workbook by selecting Insert > Worksheet from the
menu bar.
Row: To add a row to a worksheet, select Insert > Rows from the menu bar or highlight the
row by clicking on the row label, right-click with the mouse and choose Insert.
Column: Add a column by selecting Insert > Columns from the menu bar, or highlight the
column by clicking on the column label, right click with the mouse and choose Insert.
Cells: Add a cell by selecting the cells where you want to insert the new cells,
Click Insert > Cells > click an option to shift the surrounding cells to the right or down to
make room for the new cells.
Click the row or column label and select Format > Row > Height or Format > Column >
Width from the menu bar to enter a numerical value for the height of the row or width of
the column.
Selecting cells
Cluster of cells drag mouse over the cells or hold down the SHIFT key while using the arrow
keys.
Formulas
Formula bars
Calling cells by just their column and row labels (such as "A1") is referred to as relative
referencing. When a formula contains relative referencing and it is copied from one cell to
another, Excel does not create an exact copy of the formula. It will change cell addresses
relative to the row and column they are moved to. For example, if a simple addition formula
in cell C1 "= (A1+B1)" is copied to cell C2, the formula would change to "= (A2+B2)" to
reflect the new row. To prevent this change, cells must be called by absolute referencing
and this is accomplished by placing dollar signs "$" within the cell addresses in the formula.
Continuing the previous example, the formula in cell C1 would read
"= ($A$1+$B$1)" if the value of cell C2 should be the sum of cells A1 and B1. Both the
column and row of both cells are absolute and will not change when copied. Mixed
referencing can also be used where only the row or column is fixed. For example, in the
formula "= (A$1+$B2)", the row of cell A1 is fixed and the column of cell B2 is fixed ($
appears before row number, however, it doesn't appear before column name; row is fixed
and column isn't).
Basic functions
Functions can be a more efficient way of performing mathematical operations than formulas. For
example, if you wanted to add the values of cells D1 through D10, you would type the formula
"=D1+D2+D3+D4+D5+D6+D7+D8+D9+D10". A shorter way would be to use the SUM
function and simply type "=SUM (D1:D10)". Several other functions and examples are given in
the table below.
Page setup
The page set-up allows you to format the page, set margins and add headers and footers.
To view the Page Setup, select File > Page Setup from the menu bar. Select the Orientation
under the page tab in the Page Setup dialog box to make the page Landscape or Portrait.
The size of the worksheet on the page can also be formatted under the Scaling title. To
force a worksheet to be printed on one page, select Fit to 1 page(s).
Margins
Change the top, bottom, left and right margins under the Margins tab. Enter values in the
Header/Footer fields to indicate how far from the edge of the page this text should appear.
Check the boxes for centering Horizontally or Vertically to centre the page.
Header/Footer
Add preset Headers and Footers to the page by clicking the drop-down menus under the
Header/Footer tab. To modify a preset Header or Footer, or to make your own, click the
Custom Header or Custom Footer buttons. A new window will open allowing you to enter
text in the left, centre or right on the page.
The information provided here, along with practice questions, should give you maximum
marks on your practical examinations
Good day students. In today's lesson, we will be going through a word processing feature
for the practical aspect of the examination, mail merge.
1. The process of combining a list (usually of addresses) into another document (usually a
letter or envelope).
2. A word processing feature that permits personalising a form letter by merging the letter
document and a name-and-address file before printing.
The mail merge feature is used mostly in businesses where a company may want to send a
standard letter to its customers. Instead of editing each letter individually to input different
personal information, the mail merge feature is used. This is done by having two
documents, one with a listing of the customers' personal details and the other, the standard
letter. These two documents are then 'merged' to create personalised final letters for each
customer.
Once you have selected Create, a window will appear in the middle of the screen asking you to
start typing in the details of your customers. (Image 4)
You will notice that the addresses are set out in an American format, as most big software
companies are American. A bit of tweaking is necessary to Customise the database.
Click OK and enter the details of the customers. After completing entering the data
for each customer, select New Entry until you are finished. Close the dialog box.
When you have added details of all your customers, a window will appear and here is
where you give a name to your database.
NB: You can save the database to anywhere you choose; it doesn't have to be My
data sources as in the window.
A window will appear where you may sort your data. If no sorting is necessary just
click OK.
At the bottom of the right-hand side of the screen, you should be on step three of
six.
Now it is time to put in the details of your customers. On the right-hand side, you should
see something that looks like (Image 6)
Select More items and a window similar to (Image 7) will appear. Before you start entering
the details, make sure that your cursor is in the desired spot in your letter.
You will need to close the Insert merge field window to move your merge fields around on
the page.
To show the merge fields again, select More items on the right of the screen.
Repeat this process until you have entered all your merge fields in their correct places.
Note (Image 8)
Note that there are spaces between the Title, First name and Last name fields. If you
don't leave the spaces then names will all run together, for example: MrDowJones.
The letter that appears should contain the details of one of your addressees.
This new (scrollable) document should contain completed letters to each of the people in
your database. Make sure you save all the documents.
The window on the right changes to step two of the mail merge process and gives options to
Use the current document; start from a template or start from an existing document.
The database of addressees is still to be created and the window on the right is asking us to
select recipients (customers).
We have come to the end of another interesting lesson. See you next week and remember to work
not hard, but very smart.
Answers to practice programming questions
Nadine S. Simms, Contributor
Good day students. In today's lesson we will complete programming by giving the answers to
last week's questions.
1. a. Logical errors are those errors caused by a mistake in programming instructions. They
cause a programme to operate wrong or to produce incorrect results but don't stop the
programme from working while syntax errors are those that result from not obeying the rules
of the programming language.
c. Compiling is the process whereby a compiler translates the entire source code (all
statements) to its object code before execution takes place while execution is simply the
process by which the instructions are carried out so as to obtain useful information.
e. The while loop is a type of construct in which the loop is repeated for an unspecified
number of times until a condition is met while the For loop is a type of looping in which the
loop instructions are repeated for a definite number of times, such as 10, 20 or 30 times.
b. = ? equal to
3. Numcount = 0
Sum =0
Largest = 0
Smallest = 0
Read Num
While Num < > -1do
Sum = Sum + Num
Numcount = Numcount +1
If Num> Largest
Largest =Num
Endif
If Num<Smallest
Smallest = Num
Endif
Read Num
Endwhile
Print Sum, Largest, Smallest
4. Read N
Count = 0
Nonzero = 0
Zerocount = 0
FOR Count = 1 to N DO
Read X
If X=0
Zero = Zerocount +1
ENDIF
IF X ? 0
Nonzero = Nonzero + 1
ENDIF
Count = Count +1
ENDFOR
PRINT= Nonzero, Zerocount
5. YOUNGAGE = 0
For j = 1 to 5
Read NAME, AGE
If AGE< YOUNGAGE then
YOUNGAGE = AGE
YOUNGPERSON= NAME
Endif
Endfor
Print = "The youngest person is ", YOUNGPERSON
Print = "Their age is ", YOUNGAGE
6. Read SCORE
If SCORE >= 85 then
Print = A
Else if SCORE >= 65 then
Print = B
Else if SCORE >= 50 then
Print = C
Else
Print = F
Endif
7.
N SUM Print N Print SUM
20 20 20 20
23 43 23 43
26 69 26 69
29 98 29 98
32
i. John
ii. 21
We have come to the end of another interesting topic in our series of lessons. See you next
week and remember to work not hard, but very smart.
Some programming questions
Nadine S. Simms, Contributor
Good day students. In today's lesson we will be practising some programming questions.
Programming questions
Practise the following programming questions, then keep your answers close by and check
them against those that will be given in next week's lesson.
a. >=
b. =
c. <=
d. < >
3. Write a pseudocode algorithm to read a set of positive integer (terminated by -1) and
print their average as well as the largest and smallest of the set.
5. Write an algorithm to read the names and ages of five people and print the name and
age of the youngest person. Assume that there are no persons of the same age. Data are
supplied in the following form name, age, name, age, etc.
6. Write an algorithm to read an integer value for SCORE and print the appropriate grade based
on the following.
SCORE Grade
85 or more A
Less than 85 but 65 or more B
Less than 65 but 50 or more C
Less than 50 F
7. What is printed by the following algorithm? * (Hint: use a trace table to answer)
SUM = 0
N = 20
WHILE N< 30 DO
SUM = SUM = N
PRINT N, SUM
N= N + 3
ENDWHILE
8.Consider the following two samples of programming code (see diagrams 1 and 2).
The result of executing the code is shown either on the right side or below the arrow.
c. State the example which converts the code one line at a time.
d. Using example 1, state which side of the ? arrow represents the source code.
e. Compiling translates all of the lines of the entire programme into another programme at
one time. State which example represents the compilation process.
Good day students. In today's lesson we will be going through some word-processing tips
for the practical aspect of the examination.
Word-processing tips
Word processing refers to the use of a computer to create, edit and print documents. Of all
computer applications, word processing is the most common. To perform word processing,
you need a computer, a special programme called a word processor (for example Microsoft
Word ©) and a printer. A word processor enables you to create a document, store it
electronically, display it on a screen, modify it by entering commands and characters from
the keyboard and print it on a printer.
Document Operations
Open - This is used to open an existing document that was saved to the computer or
external device.
New - This is used to open a new blank document in a new window while keeping the
existing document open.
Save - This is used to save a document that you are currently working on, replacing the
older version.
Save As - This allows you to give the document a new file name or save to a new location.
Both versions of the document will exist.
When you first open Microsoft Word© , the picture above shows what you will see
General tips
You can convert text to table by selecting the text and Click on the table TAB, then
click Convert text to table
In Mail Merge, be sure to place your fields in the correct location with appropriate
spaces.
For more information on the HOW TOs of Microsoft Word©, visit the office.microsoft.com
website or use a search engine to find how to do a specific task. Lastly, practising before the
exams, by way of your SBAs or past papers, can help you to gain full marks.
Writing a programme
Nadine S. Simms, Contributor
Good day students, in today's lesson we will focus on writing and running a programme. The
last few lessons have concentrated on writing pseudocodes. Today, we look at translating
those pseudocodes into an actual programming language. This is called the source code.
Having selected the programming language that is suitable to solve your problem, you may
start writing the programme. Note, however, that most programming languages have
different syntax and semantics that you must follow.
Syntax: the way in which the statements in a programme must be written so that it
can be understood; the set of rules that must be followed which guides how the
different structures of the programming language must be used.
Semantics: the meaning associated with words used or reserved by the
programming language, for example in C, the symbols && means AND.
Programme structure
Running a programme
The process of running a programme consists of a few steps. First, we prepare our
algorithms and then we write the programme code using a text editor [source code]. A
compiler will then compile the source code to get an executable file or object code. We will
then run the object file to obtain the output.
To get the object code from the source code, we use a translator programme. Three types
of such programmes are interpreters, compilers and assemblers.
Interpreter
Translates the source code, line by line. If an error is detected, translation is stopped. This
process is repeated for every instruction in the programme and until an error-free
translation presents the object code.
Compiler
Translates all instructions at once and produces a stand-alone object code that can be
executed. It also checks for errors and produces an error summary if any is found.
Assembler
Programming errors
There are different types of programming errors that may be generated when a programme
is executed. These include syntax, logic and run-time errors.
Syntax errors
These occur when a mistake is made in the language rules or sentence structure of the
programming language. Eg - In the C programming language, typing 'print' when it should
be 'printf'.
Logic errors
These occur when the programmer makes a mistake in programme sequence. The
programme will run but produce incorrect results. Eg - Using > when < is what was
required.
Run-time errors
These occur when the programme is being run. They are normally due to unexpected events
that cannot be completed by the compiler. Eg. - dividing by zero (0).
Debugging refers to the process of error detection in the source code of our programme. We then
try to understand why the error occurred and make corrections. Tools and processes available to
a programmer to debug a source code include:
Tools/process
These are programmes that help programmers to detect errors.
Debuggers
Traces These are printouts that show the flow of programme statements,
step by step.
Variable checks These convey the value of variables at various points in the
programme.
Failure point A printout of the values in memory at the time the programme
failed.
The programmer halts execution to check what is happening in
Break point
memory.
Step mode Run a programme one line at a time to identify errors.
Having translated your programme, the final step is to execute it. Two commonly associated
terms with programme execution are:
Programme loading: Copying of a programme from the hard disk of the computer
to memory so it can be used.
Linking: Combining various parts of a programme to produce a single executable
file.
Testing an algorithm
Nadine S. Simms, Contributor
Good day students. In today's lesson we will be exploring the various methods of testing an
algorithm.
Desk checking is a way in which programmers test the logic of an algorithm. This is done by
executing the statements of the algorithm on a sample data sheet. Logic is very important
as it determines whether the problem posed is solved or not. One way in which
programmers do this testing is through the use of a trace table.
Trace tables
A trace table is one that is completed by tracing the instruction in the algorithm with
appropriate data to arrive at solutions. It is also useful in testing one's skills in
understanding how the IF, WHILE and FOR constructs operate.
For each algorithm that is being traced, a table is created since it enables better
organisation of data. It contains columns drawn for each variable used in the algorithm and
enough rows to store the values created.
Points to note:
When completing the trace table, start from the top of the algorithm by writing the
appropriate value in the first vacant cell for the variable which is currently being
assigned a value.
When calculating values, a variable can only store one item of data at a given time
and that the current value is the value to be entered in the vacant cell.
When the values of the variable are to be printed, write these answers on the answer
sheet as soon as the values are obtained, rather than upon completion of the entire
table.
When printing is required within the loop, several values for the same variable may
have to be printed for the same variable, dependent on the number of times the
print instruction was carried out.
If printing is only required outside a loop, all of the values within the loop of the
variable to be printed may not have to be printed.
Example 1
X=1
Y= 2
Z =3
While Z< 45 DO
X= X + Y
Y = Y +X
Z=Z+Y
ENDWHLE
Solution 1
Step 1 Enter the variable in the top row and insert the initial value for each the variable in the
second.
X Y Z
1 2 3
X Y Z
1 2 3
3 5 6
6 11 17
17 28 45
45 73 118
Example 2
M =1
FOR N = 1TO 5 DO
M= M +2
ENDFOR
Print M,N.
Solution #2
M N
1 1
3 2
5 3
7 4
9 5
NB FOR is a loop statement, hence we have to repeat the instructions between the FOR and
ENDFOR five times.
Practice questions
Do the following questions and then check your answers with those given in the box.
FOR N= 6 TO 10 DO
PRINT N
ENDFOR
Answers
#1. 6, 7, 8, 9, 10
#2.
f g j h Print h
1 1 1 2 2
1 2 2 3 3
2 3 3 5 5
3 5
h = 2 f = 3, 5 g = 3, 5
We have come to the end of another interesting lesson. See you next week when we will
continue exploring programming, and remember, work not hard but very smart.
Programming
Nadine S. Simms, Contributor
Good day students. In today's lesson we will continue our exploration of programming by
focusing on the iteration programme construct, as well as on some other programming-
related content.
Iteration
Loops/Iteration: These are statements that are used when it is useful to repeat parts of a
programme. The programme will, therefore, continually execute a part of that block of
programme code until a stated condition is met. When the condition is met, it is said that the
loop is terminated. Upon termination, control will be returned to the first sentence after the
block that the loop is contained in.
Initialise a variable to a star value (usually determines whether or not the loop is executed)
1. Indefinite: This refers to when you do not know beforehand how many times to repeat
the loop. (WHILE and REPEAT loops)
WHILE LOOP
Age = 16
WHILE (age <21) DO
BEGIN
Output "You cannot drink"
Age = age + 1
END
Output "The loop has ended"
REPEAT LOOP
General Form of the REPEAT-UNTIL loop
REPEAT
Statement
UNTIL (condition)
Statement - False
Example.
Age = 16
REPEAT
Output "You cannot drink"
Age = age + 1
UNTIL (age <21)
Output "The loop had ended"
2. Definite: This refers to when you know beforehand how many times to repeat the loop. (FOR
loop)
Note:
iv. Loop variable is increased every time the loop goes around.
v. The loop will terminate/end when the counter reaches the value of the final expression
The assignment statement is used to store a value in a variable after the operation (i.e.
+,-,*, or /) has been performed. The syntax of the assignment statement is as follows:
2. SUM = NUM1 + 50 (i.e. Add 50 to the value stored in NUM1 then store the total in the
variable name sum)
The output statement is used to show the value of the variable or a constant, this is usual
achieved by using a screen or printer.
The output statement most often used by pseudocode developers is:
PRINT = VARIABLE
Solution:
PRINT = SUM
solution:
print =product
Please note that the content of the variable is printed or outputted and not the name of the
variable. For example, 1 the value of the sum which would have been 50 would have been
outputted and not the word SUM.
We have come to the end interesting lesson. See you next week where we will continue
exploring programming and remember, work not hard, but very smart.
Programme development
Nadine S. Simms, Contributor
Good day students. In today's lesson we will continue to explore programming by picking up
with the phases of programme development.
Algorithm design
General terms
Variables: A name that represents data and can hold many possible values. Variables can
be global (used in the entire programme) or local (used in one specific part of the
programme). A variable whose value does not change is called a constant.
IF is a keyword, ENDIF tells the computer that the structure is finished. IF the condition is
false the statement will be skipped.
Examples
1. IF mark = 90
THEN output "EXCELLENT"
ENDIF
2. Is Janet an adult?
Input thisyear
Input birthyear
3. Add two numbers, if the total is greater than 80 print close to 100
IF the condition is TRUE then statement T should be executed and statement F should not.
IF condition is FALSE then statement F should be executed and statement T should not.
Examples
READ A
READ B
IF A < B
Print A
ELSE
Print B
ENDIF
2. Is Janet an adult?
Input thisyear
Input birthyear
Age = this year - birthyear
IF age >= 18 THEN
Output "Janet is an adult"
ELSE
Output "Janet is not an adult"
ENDIF
Exploring programming
Nadine S. Simms, Contributor
Good day, students. In today's lesson we will continue our exploration of programming. Last
week, we looked at the difference between a programme and a programming language, as
well as the four broad categories of programming languages. They can also be classified
according to the generations in which they fall.
Low-level languages
These are languages which are machine dependent; that is, when a code is written on a
particular machine, it can only be understood by that machine.
First-generation language
These are also called machine languages and are characterised by ones and zeros which
make up a binary code. A sample instruction might be 10111000 01100110.
Second-generation language
These are also called assembly languages and are characterised by abbreviated words,
called mnemonics. A sample code might be 'ADD 12,8'.
High-level languages
These are languages that are machine independent; that is, when a code is written on a
particular machine, it is not limited to execution on that machine only, but can also run on
other similar machines.
These are designed so that it is easier for the programmer to understand. In this, a compiler
converts the statements of a specific language into machine language.
These are designed to be closer to natural language than a 3GL. Languages for accessing
databases are often described as 4GLs. A sample instruction might be EXTRACT ALL
CUSTOMERS WHERE 'PREVIOUS PURCHASES' TOTAL MORE THAN $1000.
Programming that uses a visual or graphical development interface to create the source
code. They are often described as very high level languages.
Solving the Problem and the Programme Development Process
The first part of a programmer's job is solving the problem. In doing this, there is a process
which most programmers follow, called the programme development process. It is divided
into two phases and consists of several steps.
Algorithm Phase
3. Test the algorithm on paper using techniques such as a trace table (this will be explored
later).
Implementation Phase
4. Translate the algorithm into a programming language, such as Pascal, BASIC, C or C++.
A correct and precise algorithm should give an easy line-by-line translation into the
programming language. This will also suggest that that the translation will be free of:
i. Syntax errors - Errors that result from the programmer not obeying the rules or syntax
of the programming language.
ii. Logic errors - Errors that result from mistakes made by the programmer, such as
dividing by 0.
5. Test the programme to ensure the expected results are produced. If these results are not
produced, the programme should be debugged (the process of finding errors in the source
code and understanding why they occurred and finding ways to correct them).
Problem definition
In defining a problem, you need first to analyse it, and this includes the specification of
input, processing, output and storage. Having completed your analysis, you can write down
your results using an IPO (Input-output-processing) Chart.
Example 1
Example 2
Problem: Accept number, add 20 per cent and show the result
Good day students. In today's lesson we will be exploring a new topic, programming, which,
I must say, accounts for a substantial percentage of marks for the technical proficiency
theory examination. An excellent grasp of this topic is important for passing this exam.
PROGRAMMING CONCEPTS
1. Machine languages
2. Assembly languages
3. High-level languages
4. Natural languages
Machine language
This is the lowest level of programming language. It consists of a string of ones (1s) and
zeroes (0s) called binary digits. It is the only language that needs no interpretation for the
computer to understand it.
Assembly language
This is another low-level language. However, it uses mnemonics (letter codes to each
machine language instruction). A special programmer called an assembler converts each of
the mnemonic codes and translates it into its machine-language equivalent.
High-level languages
These are languages that closely resemble human language and need to first be converted
to machine language before the computer can carry out the instructions.
Natural language
These are the languages normally spoken by humans and comprehensible to humans.
However, it is very difficult for computers to understand it, due to vastness of vocabulary,
as the languages vary.
Sources codes are programmes written in a particular programming language which might
be converted to machine language so that the computer can understand it. Object codes are
machine codes which have been converted to machine language by the compiler.
Compilers
A compiler is a computer programme which translates source codes to machine language. It does
so, first, by converting the codes of the high-level language and storing it as object codes.
However, it is done before run time, which makes the execution time faster than that of an
interpreter.
Interpreters
These are a set of codes or a programme that is used by some programming language to translate
source codes to machine language. They do so while the programme is being executed, and
translated codes are not saved, therefore, making it necessary for translation to take place each
time the programme is executed.
Good day students. In today's lesson, we will be exploring trends in technology and jobs in
information technology.
Artificial intelligence
This is the branch of computer science that deals with making computers behave like
humans. It includes:
Neural networks: computers are programmed to simulate the actions of the brain.
CADD: Computer Assisted design and Drafting software is used to aid in the design
and drafting of a product. It is used to create two- and three-dimensional
engineering and architectural drawings.
CAM: Computer Assisted/Aided Manufacturing software assists engineers and
machinists in manufacturing or prototyping product components. It is a programming
tool that makes it possible to manufacture physical models of a product.
Business
Computers in business are quite extensive. They range from the desktop the receptionist
uses to the mainframe used as a server. There is also teleconferencing and telemarketing.
The former enables video and voice transmission over long distances and can be done
between branches and continents, while the latter refers to individuals calling potential
customers to market goods and services. In telemarketing, the phone calls are sometimes
made by computers.
Desktop publishing
This is also known as DTP and refers to the combination of a personal computer and
WYSIWYG [pron. Wizziwig] (What You See Is What You Get) page layout software to create
publication documents for either large or small-scale publishing.
Database administrator
Responsible for the administration and management of a company's database. This involves
the effective and efficient storage, retrieval, customisation and archiving of data. Also
responsible for developing procedures to ensure the security and integrity of the system.
Programmers
These can be classified into applications programmers (write software to meet user
requirements) and system programmers (write software for the system such as ones that
monitors and controls peripheral devices). Duties include writing, testing, debugging
programmes and updating and modifying existing ones.
System analyst
Network administrator
Computer consultant
Screens, edits and validates the input and output for a data-processing unit. Duties include
regulating workflow in accordance with operating schedules, being in charge of the receipt,
safekeeping and retrieval of data, hardware, software and security items.
Enters data into a system in a form that is suitable for processing. Duties include: keeping
records on the data transcribed and verifying the data entered.
Computer engineer
Found at all levels of the computer industry, they design components for use in or with a
computer. Responsible for the maintaining and repairing of computer hardware sold to
clients.
Information technology and information in organisations
Nadine S. Simms, Contributor
Good day students. In today's lesson, we will be exploring information systems and
information in the organisation.
Information Systems
Computer information systems can be chosen to suit different users and tasks.
Single-user: Only one person can use the computer system at any given time, while
having access to all the computer's resources.
Multi-user: Many users can use the computer system at any given time, while having
different access permissions and sharing the computer's resources.
Single-tasking: Only one programme can be used at any one time. This programme, while
being run, controls all systems resources, even if it does not need all.
Types of computer
Different types of computers are also associated with information systems. These include
personal computers, portable computers, mainframe, network computers and
supercomputers. These were discussed earlier in the series.
Commerce
In commerce, computers are used in researching the sales potential of new products and to
automate the communication between customers and a company. They are also used in
checking stock levels and reordering when necessary.
Manufacturing
Education
In education, information systems can be seen in the classrooms with computer- aided
instruction and also for administrative purposes in keeping students' records.
Law enforcement
Computer systems are used in law enforcement to keep databases of felons and fingerprints
of same. They are also used in forensic computing, where samples of chemicals can be
compared, as well as voices and call logs. A database of driver's licences is also available.
In this, computers are used to edit music, photos and videos. They are also used to watch
movies and for high-performance game playing.
Information in organisations
Information as a commodity simply means that it can be bought or sold. As such, organisations
must take great care in selecting the type of information they require for business transactions.
They must also demonstrate the same diligence in protecting this information. Information is also
used in the decision-making arena for an organisation. As a result, information must be relevant,
accurate, timely, complete, in an appropriate medium and cost-effective.
These are the strategic, tactical and operational as seen in Figure 18.1.
Good day students. In today's lesson we will continue our exploration of unit three. Today's
lesson focuses on data privacy and information misuse.
Data privacy refers to the protection of data from computer crimes and ways in which the
integrity of data can be maintained.
Computer Crimes
These are illegal acts committed by using the computers and Internet. These crimes
include:
Unauthorised Access
Another name for this is hacking or cracking. It involves someone trying to electronically
break into a system to which the individual does not have authorised access. The purpose of
each individual hacker varies. Some hack as a means of game playing; to them, hacking is
solely to gain access to a system. Others hack for destructive purposes, in that they commit
acts of electronic vandalism, such as changing critical data.
Electronic eavesdropping
This is the use of electronic devices to monitor electronic communications between two or
more communicating parties without permission from any of those involved. It is good for
all parties involved if communication is encrypted. Most companies use encryption when
communicating.
Industrial espionage
This is when an organisation tries to gain an advantage over competitors by illicitly gaining
access to information about that competitor's strategies. In the past, this would be done by
break-ins and photographing of important documents. With the dawn of the Computer Age,
however, these companies are now hiring persons extremely competent in computers to
hack into their competitors' servers to gain information. It is done more easily if the
company has an accomplice in its competitors' organisation.
Surveillance
This refers to the use of computers and related technology to observe something or
someone with close scrutiny without permission. Implications include loss of privacy, lack of
security and the potential misuse of information. (We will explore this concept soon.)
Surveillance can be done through monitoring messages being sent, monitoring the use of
computer through the monitor's radiation emission and by the use of a bug to monitor
keyboard keystrokes.
Information misuse
Organisations, in completing their jobs, collect a wide variety of information from a wide
variety of sources such as employees, customers, suppliers and competitors. This
information is normally provided for a special purpose that is in keeping with the mission
and objectives of the organisation. It is, therefore, important to put in place measures that
will ensure that information is not misused.
It is also quite common for information to be used for purposes which were not explicitly
stated when it was being gathered. For example, some websites may provide mailing lists to
other companies who then send items they think you may be interested in. Though you may
not mind, one should be able to choose whether one wants personal information to be made
available for others' use.
Some countries have legislation in place to help fight against information misuse.
For example: Information should only be used for the purpose for which it was provided.
Proprietary data: This refers to data and software developed and used exclusively by the
organisation. It is the software that must be often used by employees for day-to-day
operations.
Propaganda: This is the use of computer systems, more specifically the Internet, to
distribute harmful information that may be used to tarnish the image of an individual or, in
some countries, to sway public support in favour of one party, group or another in an
attempt to discredit the opposing group(s).
Computer fraud
Good day, students. In today's lesson, we will be exploring data security and protection.
Data security
As we continue into the technological age, the need for computer security increases
drastically. A computer security risk is any event, action or situation that could lead to loss
or destruction of computer systems or data. These risks may be accidental or deliberate,
internal or external, and may result in an individual or organisation losing hardware and/or
software. To prevent this from happening, computers need to be protected or secured.
(Computer security refers to the protection of hardware and software resources against
their accidental or deliberate damage, theft or corruption.)
External sources
Deliberate damage
Computer users attempt to protect their centres physically by using locks, but still are
victims when memory chips, hard drives, CD and DVD drives, printers and inks are stolen.
Accidental damage
Natural disasters such as fires, storms, dust and humidity can damage data as well. Though
this is not deliberate, measures should be taken to prevent same. Such measures include
the use of fireproof cabinets and safes.
There is also the possibility of total system failure, which may be caused by a sudden loss in
electricity. In trying to prevent this, users and businesses should utilise surge protectors
and UPSes (uninterruptible power supply).
Internal sources
Deliberate damage
Users within the business environment can represent the greatest threat to a system's
security. This occurs when there is a planned attempt to access a system or data illegally.
Software access restrictions can be used to try and stem these attempts. Such restrictions
include passwords and access logs. Hacking is the unauthorised access and use of
networked or standalone computer systems to steal or damage data and programmes.
Accidental damage
This occurs through genuine mistakes made by users when accessing a system. This
includes overwriting recent data or entering incorrect commands, and forgetting user
passwords. Damage can occur if a virus is contained on an external storage device or the
Internet, which affects the system when accessed.
A computer virus is a programme that infects a computer negatively by altering the way the
computer works without the users' knowledge or permission. It may damage files and any
type of software that is on the computer.
Macro viruses which are written in a macro language associated with an application.
Preventing viruses
Do not click on website links sent through instant-messaging programmes unless you
are expecting the link.
Data protection
Data protection concerns the way in which computer users can protect their data against
loss or damage, and it also concerns protection laws which set down rules about what
information can be kept by others about an individual. Below is a list of measures that users
may take to perform computer protection.
This includes making regular and recent copies of files and storing them on an external
storage device. By doing this, a user will always have a recent copy of his data, regardless
of what happens to the original.
Virus protection
This can be used to protect a computer from and intercept harmful viruses attempting to
infect a system, as well as scan for same.
The user may use fireproof cabinets and safes to store CDs, DVDs and other devices. Discs
can be locked by covering the write-protection hole. This prevents the changing, deletion or
infection of files contained on these devices.
The Internet
Nadine S. Simms, Contributor
Good day students. In today's lesson we will begin our exploration of unit three. The focus
is on the Internet and some networking-related terms.
The INTERNET
We connect to the Internet through a local Internet service provider (ISP). ISPs are
companies with direct connection to the Internet that grants access to subscribers, for
example Lime or Flow. These ISPs offer various technologies to users so they can connect to
the Internet. These vary in speed and cost. Such technologies include:
Dial-up connection
Broadband cable
World Wide Web (www) - one of the components of the Internet consisting of a
collection of text and media documents called web pages.
Web pages - a group of one or more related electronic documents. Multiple pages are
grouped to create a company's, individual's or group's website. Web pages are usually
encoded in a special language called Hypertext Mark-up Language (HTML) that allows one
web page to provide links to several others.
Web browsers - special software that allows users to view web pages, for example
Netscape and Internet Explorer.
Search Engine - the name given to a software or website that allows a user to find
information quickly by typing in keywords or phrases.
Hypertext Transfer Protocol (HTTP) - governs the transmission of web pages over the
Internet.
File Transfer Protocol (FTP) - the set of rules used to govern the sending and receiving
of files on the Internet. It enables us to find an electronic file stored on the computer
somewhere else and download it. It also enables us to upload (add information to the web).
These files are stored on what are termed FTP sites and are maintained by universities,
government agencies and large organisations.
Uniform Resource Locator (URL) - a unique address attached to each web page or
Internet file. For example www. informationtechnology.com
Electronic mail - permits the transmission of documents from one terminal or computer tof
another, via the Internet. The mail is stored in the recipient's mailbox and can be retrieved
at the recipient's convenience, using a password. The concept is similar to that of a postal
system.
Advantages of email
Disadvantages of email
News group - this may be one of several online discussion groups covering a parti-cular
subject or interest.
Internet relay chat (IRC) - this feature allows two or more persons from anywhere in the
world to participate in live discussions. Instant messaging programmes include ICQ, MSN
and Yahoo messenger.
Telnet - is one of the ways that a person can access a remote computer over a network
such as the Internet. It is often used by individuals or companies that seek to limit the
privileges of people who are logging on to their computer(s) via telnet.
E-commerce.
DISADVANTAGES
Good day students. In today's lesson we will be exploring data communication, the last
topic that we will be covering from unit one of your syllabus.
Data Communication
As our world transforms from manual to digital, we must find new ways of transmitting data
and information to coincide with this transformation. Data communication is the process of
transmitting data, information and or instructions between two or more computers for direct
use or further processing over a communication channel.
A network is two or more computers linked in order to share resources (such as printers and
CD-ROMs), exchange files or allow electronic communication.
Network Configuration
This refers to the size of the network, as they come in different sizes.
1. A Local Area Network (LAN) is confined to a relatively small area. It is generally limited to
a geographic area, such as a writing lab, school or building.
2. A Metropolitan Area Network (MAN) connects LANs in a metropolitan area and controls
data transmission in that area.
3. Wide Area Networks (WANs) connect larger geographic areas, such as a city, a country or
the world.
Network Layout
This refers to the physical layout of a network, that is, how the computers are connected
physically. Network layout is also known as the network topology. There are three main
types of network layouts: star, bus and ring.
Network type
Star layout - all the nodes are connected to a central hub Star
Advantages
A break in a cable will not affect other computers
Fastest
Disadvantages
Advantages Bus
Disadvantages
If the main cable breaks, network is split into two unconnected parts
Slower than Star
Ring layout - there is no end to the connection because the first node is
connected to the last, forming a ring.
Ring
Advantages
Disadvantages
Difficult to install
Transmission mode refers to the number of characters that can be transmitted in one
second. Two transmission modes are:
Bandwidth: Refers to the width of the range of frequencies (the amount of data that can
be carried form one point to another) that data can travel on a given transmission medium.
Voiceband: Transmits data at a rate of 300 bps to 9600 bps. Cable commonly used is Unshielded
Twisted Pair (UTP).
Broadband: Transmits data at a rate of up to 1000s of characters per second. Cables commonly
used are coaxial and fibre optic.
Direction of data flow refers to whether data can be transmitted in only one direction or
more. Three types:
Transmission speed refers to the amount of information that a channel can contentedly
handle at any one time. Transmission speed is usually measured in bits per second (bps) or
character per second (cps).
Understanding user interface
Nadine S. Simms, Contributor
How you interact with a computer and use it is referred to as the computer-user interface.
After the computer is booted up and the operating system loaded into memory, the user will
then see the user interface. The user interface enables the user to communicate with the
computer. There are generally three main types of user interfaces:
Command-line interface
Menu-driven interface
Pop-down menu: one that opens immediately below the position of your mouse (or other
pointing device). You move the cursor downward to go through the items in the menu list.
Pop-up menu: any menu list that pops up on the screen, on demand, to offer you a choice
of commands.
Command-line interface - a type of user interface characterised by the user typing, using a
keyboard, commands directly for the computer to do.
Restricts the user to using only the keyboard as the interface devices, while with
other interfaces a wide variety of input devices can be used.
Commands must be entered at a special location on the screen and in a set format.
MS-DOS
Menu-driven interface
This type of user interface is dominated by menus or lists that pop up or drop down
on the screen, and you are given a choice of items on the menu list.
The user is presented with a list of options to choose from, without needing to
remember commands.
Free from typing error, because the user does not have to type commands.
Once user has learned the menu system, it is bothersome to have to wait on the
package to present the questions before commands can be entered. Application
Software such as Microsoft Word, Excel, Access.
Graphical interface
This interface makes use of pictorial representations (icons) and lists of menu items
on a screen, which enable the user to choose commands by pointing to the icons and
or the list of menu items on the screen using a keyboard, mouse or any other
pointing device.
Once the icons are understood, very easy to use.
Less demanding on the user as one is not required to remember any commands.
Icons use much more memory space than either command-driven or menu- driven
user interfaces.
The icons might be ambiguous; therefore, one might select an option and is
surprised to see the outcome. Operating Systems such as Windows XP or Vista.
Quiz
State the proper technical terms for EACH of the SIX phrases underlined in the
passage below.
1) John receives computer hardware from a friend who lives in Canada, but the software is
missing. He, therefore, decides to purchase the necessary software. In order for his system
to run, he realises that he would have to purchase software to manage the resources of
the computer as well as software which could provide for his particular needs. For
both types of software, he has a choice of two styles of interface; one which was command
driven or other which provides screen listing from which the user could select
appropriate functions. Some software provide user interfaces which display small,
graphical images that can be selected when the functions of the represented are
required. Since John intends to use the computer in his family business, he has a choice of
acquiring a software written especially for his business or general purpose software.
He notes, however, that if he purchases the general-purpose software, he would have to do
some modification to allow it to meet his specific need.
Understanding types of software
Nadine S. Simms, Contributor
What is software?
Software are simply computer programmes; instructions which cause the hardware
(printers, scanners, drives and so on) to do work. Software can be divided into a number of
categories based on the types of work done by programmes. The primary categories of
software are:
System software
Application software
System software
System software is the name given to the set of programmes that control or maintain the
operations of the computer and its devices. Two types of system software are the operating
system and utility programmes.
Application software
Application software is the name given to software programmes that are designed to make
users more productive and or assist them with personal tasks.
Advantages
Disadvantage
These are programmes designed to give the user a range of different tools for assistance in
completing a specific or narrow kind of task, rather than for a broad application area. An
example of this could be a programme especially designed for preparing and printing DVD
labels.
Advantages
Disadvantage
Custom-written software
This speaks to programmes which have been created specifically to meet the needs of a
particular individual or company. It is very similar to you going to a tailor for him to make a
suit to meet your fashion needs.
Advantages
Disadvantages
Special training is necessary, which can also be expensive and time consuming.
Imagine having an article of clothing which does not quite suit you. You would take this
garment to the tailor and ask him to modify it to suit you. Customisation of general-purpose
software is just like this. A general-purpose software package is changed so that it satisfies
the needs of a specific user or company.
Advantages
Disadvantages
Updates will not be as easily obtainable as with the general- purpose software.
Data representation
Nadine S. Simms, Contributor
The combination of 0s and 1s used to represent characters are defined by patterns called a
coding scheme. Using one type of coding scheme, the number 1 is represented as
00110001.
Two popular coding schemes are American Standard Code for Information Interchange (ASCII)
and Extended Binary Coded Decimal Interchange Code (EBCDIC). ASCII is used mainly on
personal and mini computers, while EBCDIC is used primarily on mainframe computers.
Currently, ASCII is used on most microcomputers, and symbols are represented as a seven- or
eight-bit binary code. For the alphabet and numbers, these codes are sequential, where adding
one to each pattern gives the code for the character that follows, as is seen below.
If the ASCII code for 'A' is 01000001, find the ASCII code for 'K'.
1. Convert the binary code to decimal. (01000001 = 65).
2. Determine how far the required letter is from the given letter. ('K' is 10 letters after 'A').
NB: This method can be used for any question of this type.
Parity
This is an error-checking system where the computer uses an extra bit in the form of 1s and
0s to verify that no errors have crept into a code as data is sent from one computer to
another. This extra bit is called a parity bit.
i) Odd parity
Even parity
If a particular computer uses even parity, the parity bit is represented as a 0 or 1, so that
there is an even number of ones in the whole byte or word.
Odd parity
For odd parity, there must be an odd number of ones, hence the parity bit is represented as
a 0 or 1, so that an odd number of 1s result in the whole byte or word being odd.
Examples
1 1001001
0 110111101101100
Questions
1. (a) Explain the difference between odd parity and even parity.
(i) What is the ASCII representation of the letter 'A'? (Hint: C is three less than D)
After you have tried them for yourself, but not before, check your answers with the ones at
the end of this lesson.
Answers
(a) With odd parity an odd number there is an odd number of ones while with even parity
there is an even number of ones.
(b) i 1000001
(c) ii 1000111
Representing positive and negative numbers
Nadine S. Simms, Contributor
There are three systems used to represent positive and negative numbers. These are:
Two's complement
In BCD a four-bit code is assigned to the positive (+) and negative (-) signs. + = 1110, - =
1111
When converting to BCD, each individual digit in a number is converted to its four-bit binary
equivalent just as seen in the table below.
Example.
-213= 1111 0010 0001 0011 +397= 1110 0011 1001 0111
l l l l l l l l
V V V V V V V V
- 2 1 3 + 3 9 7
In sign and magnitude, the leftmost bit indicates the sign of the number with 1 representing
the negative (-) sign and 0 the positive (+) sign. The remaining bits give the magnitude of
the number.
8910 = 10110012
-89 = 1: 10110012
Two's Complement
One's Complement refers to after the binary number is found and the bits are 'flipped' or
inverted. After having flipped the bits, by adding one to that new number, the two's
complement would have been formed.
14 = 1110 in binary
The number needs to be represented using 4 bits therefore the answer is written: 0011
This topic can be a bit difficult, so re-read the above notes as often as needed.
Questions
a) 45
b) -96
a) 1001001
b) -48
a) 7-6
b) 8-5
After having tried them for yourself, but not before, check your answers with the ones at
the end of this lesson.
We have come to the end of another interesting topic in our series of lessons in the CXC
information technology lectures. See you next week when we will complete our lesson on data
representation, and remember work not hard, but very smart.
Binary to Decimal
1 20110 9 11010
2 7110 10 2310
3 13410 11 24810
4 1710 12 22610
5 13610 13 2910
6 6210 14 11110
7 8510 15 15110
8 7010 16 22910
Decimal to Binary
1 100010012 11 110010002
2 100000002 12 101010112
3 001111112 13 100101102
4 110101012 14 000110112
5 001100012 15 000100112
6 011011112 16 101111012
7 111100102 17 110111102
8 110000002 18 010011112
9 010110012 19 010010012
10 000000102 20 100010002
Data representation
Nadine S. Simms, Contributor
Data Representation
Computers cannot understand everything humans can and vice versa. This has forced
computer personnel to develop a system of representing data. Some words often used by
these persons are:
Human Readable: Data that can be understood by humans. Printers and monitors produce
human- readable copies.
Machine Readable: Data that can be understood by computers. Disc drives and tape
drives produce machine-readable copies.
1) Discrete
2) Continuous
Discrete data can only come from a limited set of values. There may be two possible values
or a million, but the set of values is still limited. What makes continuous data is not how
many numbers are after a decimal point but, rather, the fact that each figure may be one of
a continuous range of values. Digital data is discrete while analogue data is continuous.
1. Analogue
2. Digital
Binary Representation
Computers represent data in the form of electronic pulses (high and low voltages). When
digitised, data is represented numerically by way of the binary system, which consists of 1s
and 0s only. In our normal counting, we use 10 digits (0-9) so our method of counting is
base 10, also known as the decimal system.
A computer, however, uses base 2 (binary) and has digits representing values 0 and 1 only.
Since the digit can only take two values, it is a binary digit (bit). Eight of these digits make
a byte.
Binary addition rules:
Rule #1
0+0 = 0
Rule #2
1+0 = 1
Rule #3
1+1 = 0 carry 1
Rule #4
1+1+1=1 carry 1
N.B. Study these rules because your understanding these is vital to your mastering this topic.
Find the power of 2 and multiply the answer by the corresponding binary digit. As seen below 20
* 1 = 1 and 25 * 0 = 0
Binary to Decimal
Equals this
This binary
1 1 1 1 1 1 1 1 decimal
number ...
number
27 26 25 24 23 22 21 20
128+ 64+ 32+ 16+ 8+ 4+ 2+ 1 = 225
Equals this
This binary
1 0 0 1 0 1 0 1 decimal
number ...
number
27 26 25 24 23 22 21 20
128+ 0+ 0+ 16+ 0+ 4+ 0+ 1 = 149
Figure 9.2
Coverting Decimal numbers to Binary numbers
2 170 Remainder
2 85 0
2 42 1
2 21 0
2 10 1
2 5 0
2 2 1
2 1 0
0 1
Figure 9.3
Try the questions below and see the answers in next week's lesson.
Covert each binary number into a decimal number.
Figure 9.4
Figure 9.5
m. (2 marks)
5. Explain how you would know if a monitor has high resolution. (2 marks)
(c) both or
(d)neither
a. Sound
b. Microfilm
7. For each application listed in the figure below, select the appropriate input device from the list
given.
Answers
1. Hard copy refers to a paper and permanent printout of information displayed on the
screen and soft copy refers to the digital copy of information displayed on a screen or saved
to a storage device.
3. a. A peripheral device is external to the system unit and controlled by the CPU.
4. Primary storage refers to the internal memory locations that store data, instructions and
information while the computer is in the 'on' electronic state, while secondary storage refers
to the memory external to the main body of the computer (CPU) where programmes and
data can be stored for future use.
5. A user can identify if a monitor is high resolution based on the size (dimension) of the
monitor the resolution (1 dot = 1pixel. The more pixels per inch, the clearer the image) and
the colour specification (number of colours displayed).
6. a. Sound - (D)
b. Microfilm - (C)
7. Answer (BELOW)
Output is data that has been processed into a useful form called information. There are four
types of output: text, graphics, audio and video.
Output device
An output device is any component of the computer that is able to convey human-readable
information to a user. This device can be divided into two categories: soft copy output and
hard copy output.
Devices produce what is referred to as temporary output, including output from the
computer monitor and audio from speakers.
Monitors are output devices that visually convey text, graphics and video information.
Information exists electronically and is displayed for a temporary period of time.
Features of monitors
Resolution: How clear or detailed the screen's output can be. Output is made up of tiny
dots, where one dot equals one pixel. The more pixels per inch, the clearer the image.
Colour: The number of colours displayed varies from 6-256 to 64 thousand-16.7M. The
more colours, the smoother the graphic.
Cursor/Pointer: The symbol that shows where on the screen the user is working.
Printers are output devices that produce text and graphics on a physical medium such as
paper or transparency film.
Impact Printers form characters and graphics on paper by striking a mechanism against
an inked ribbon that physically contacts the paper. The most commonly used impact
printers are:
Printer Advantage Disadvantage
Non- Impact Printers form characters and graphics without actually striking the paper. Some
spray ink while others use heat and pressure to create the images. The most commonly used non-
impact printers are:
Quiet
Thermal Printer forms Print tends to fade over
characters using chemically time.
Inexpensive
treated paper. Two types
include thermal wax transfer
printers and dye sublimation
printer.
CRT - This is short for cathode ray tube monitor which consists of a screen housed in
a plastic or metal case.
LCD - This is short for liquid crystal display which is a lightweight thin screen that
consumes less power and space than a CRT monitor; this is usually found in laptop
computers.
Gas plasma - This is a type of monitor technology that works by creating a matrix
of red, green and blue pixels from plasma bubbles that are turned on or off by
selectively powering them.
Microfilm and microfiche - where output is printed on a roll of film and a sheet of
film, respectively. This method is faster and saves on space by condensing large
amounts of information, but takes a special device to print.
Speakers are devices that produce audio output, such as music, speech and other
sounds.
Good day students. Today's lesson will focus on input devices. An input
device allows a user to enter data/programmes and commands into the
memory of a computer. They can be classified into two groups manual
input devices and direct data entry devices.
Data is transferred automatically into the computer, for example from an electronic form or
barcode. Information is, therefore, not entered manually.
Light pen - handheld, pen-shaped device connected by a cable to a computer with special
software that contains a light source to detect the presence or absence of light.
Digital camera and camcorder - devices used to enter a full motion recording into a
computer and store on a hard disc or some other medium.
This marks the end of today's lesson. In the next lesson we'll look at output devices. Until then,
keep up the good work and remember, work not hard, but very smart.
Good day, students. In today's lesson, we will be completing last week's topic of storage
and media:
Magnetic tapes
Optical discs
An optical disc is an electronic data-storage medium that can be written to and read using a
low-powered laser beam. It can generally store much more than magnetic media and is a
flat, round, portable metal storage medium (4.75 ins) that is used to store large amounts of
pre-recorded information. A high-powered laser light creates the pits in a single track,
divided into evenly spaced sectors that spiral from the centre of the disc by reflecting light
through the bottom of the disc surface. The reflected light is converted into a series of bits
that the computer can process.
Magnetic tapes
This is a magnetically coated ribbon of plastic capable of storing large amounts of data and
information at a low cost. Tape storage requires sequential access which refers to reading
and writing data consecutively. Magnetic tapes are used for long-term storage and as a
backup.
Flash drives
Flash drives are data-storage devices integrated with a USB (universal serial bus) interface.
They are generally 7mm in length and weigh less than two ounces, making them the perfect
portable storage device. Storage ranges from 64MB to 64 GB.
NB - Storage devices may also be categorised based on the way in which the information
saved on the device is accessed.
Fig 5.1 Categorisation of storage devices
What is storage?
Storage refers to the holding of data, instructions and information for future use. There are
two types of storage; primary and secondary storage.
Primary storage
Also known as main memory, this term is used to describe internal memory locations that
store data, instructions and information while the computer is 'on'. The two types of primary
storage are RAM (random access memory) and ROM (read only memory).
(See below)
PRIMARY STORAGE
DEFINITION FUNCTIONS VARIATIONS
TYPE
Stores data
to be
processed.
Stores
instructions SRAM - (Static RAM)
for faster, more reliable than
processing DRAM; name derived from
Contains temporary data. the fact that it doesn't
or volatile memory
need to be refreshed like
Random access which is lost (erased)
Stores dynamic RAM.
memory (RAM) whent he computer's
processed
power supply is
data DRAM - (Dynamic RAM)
turned off.
(information popular in PCs, needs to be
) that is refreshed; slower than
waiting to be SRAM.
sent to an
output or
secondary
storage
device.
PROM - (Programmable
Stores data, ROM) once programmed,
A memory chip that
information cannot be erased.
stores instruction and
or EPROM - (Erasable PROM)
data permanently.
Read only memory instructions erased by exposure to
Contents are non-
(ROM) necessary ultra-violet lights.
volatile (not lost
for the EEPROM - (Electrically
when the computer's
operation of EPROM) erased by
power supply is lost).
the system. exposure to electrical
charge.
Secondary storage
Also known as auxiliary storage, this is memory external to the main body of the computer
(CPU) where programmes and data can be stored for future use. When using secondary
storage, there are two objects involved, the storage device and the storage medium.
Storage devices are the mechanism used to record information to and retrieve items from a
storage medium, while the storage medium is the physical material on which data and
information is kept.
Magnetic discs
Optical discs
Magnetic tapes
Magnetic discs
A magnetic disc stores magnetically encoded data in concentric circles or tracks. Tracks are
usually divided into pie-shape sectors. Most magnetic discs are read/write storage media.
Hard discs
Floppy discs
Hard discs
A hard disc usually consists of several inflexible, circular discs called platters on which items
are used electronically. It is the major storage medium of mainframes and minicomputers
and it may be fixed or removable.
Advantages
Disadvantages
Floppy discs
A floppy disc is a portable, inexpensive storage medium that consists of a thin, circular,
flexible disc with a plastic coating enclosed in a square plastic shell. It may be single or
double sided and is available in high and low density.
Advantages
Very popular
Cheap
Portable
Disadvantages
Good day, students. Today, we will be learning about the various types of computers.
Categories of Computers
Computers are typically classified into four categories. It should be noted, however, that
today's experts in the field of information technology have computers classified into more
groups. However, the Caribbean Secondary Education Certificate syllabus confines us to
four: microcomputer/personal computer (PC), minicomputer, mainframe and
supercomputer. These classifications are made based on physical size, number of users
simultaneously and the general price at which these computers are sold.
Personal computer
Characteristics
Minicomputer
A minicomputer is a class of multi-user computers that lies in the middle of the categories of
computers. It is fairly difficult to make a clear-cut distinction between the minicomputer and
the mainframe (see below) and the minicomputer and the PC. The minicomputer is a more
powerful but still compatible version of the PC that facilitates more users, while it is also a
smaller version of the mainframe, running the same applications with fewer users.
Characteristics
Mainframe
A mainframe computer is a big, high-priced, powerful computer that can handle hundreds or
thousands of uses concurrently. It contains huge amounts of data, instructions and
information and is mostly used by large businesses in the form of servers in a network
environment. Mainframe computers can be found in banks, high schools, universities,
hospitals and government agencies.
Supercomputer
A supercomputer is the largest, fastest, most expensive and most powerful computer of the
four.
Characteristics
Storage capacity of more than 20,000 times the average desktop computer
There are several factors affecting power that must be considered when attempting to
choose a computer to perform a given task or function. These include:
Speed
Accuracy
Storage capacity
Good day students. This is lesson two of our series of information technology lessons.
Today, we will be learning about the computer and its basic components.
What is a computer?
This is an electronic device that operates under the control of instructions stored in its
memory, which can accept data, process this data and give results, with the option to store
them for future use.
A computer processes data and outputs information. Data refers to a collection of raw,
unprocessed items, including text, numbers, images, audio, video, etc, that is not useful.
Information refers to processed items, useful to people, which communicate meaning.
Components of a computer
The computer, as it stands physically, comprises what is referred to as hardware. These are
the electric, electronic and mechanical components of the computer. These can be divided
into various categories which can be seen, along with examples, in Figure 2.2.
System Unit
The system unit is a very necessary component of a computer that doesn't fit comfortably in
the categories listed above. It is a metal case that houses the electronic circuits of the
computer. These circuits are used to process data and, all in all, operate the computer. It
consists of the power supply, internal disk drives, cooling fans and the motherboard or
system board that houses the CPU (central processing unit).
Central Processing
The CPU is also known as the brain of the computer. It is a microprocessor chip responsible
for the processing of data keyed into a computer. The CPU's task is no easy one and, in
order to complete this effectively and efficiently, the CPU has three subunits; arithmetic and
logic unit, control unit and registers.
Control Unit (CU) - This is the part of the CPU responsible for the fetching and
executing of (carrying out) the programmed instructions used to operate the
computer. It generally controls the transfer of data to and from the CPU. It can also
send a command for data to be transferred from the main memory to the printer.
Hence, the CU, by sending information to different devices in the system, controls
the flow of data in the computer on the whole.
Arithmetic and Logic Unit (ALU) - A major part of the CPU, this receives all
instructions containing arithmetic or involved with checking the value of an item of
data. It deals with the processing of these items of data. The ALU is also responsible
for instances where logic, drawing comparisons between items of data, is required.
The ALU has a set of internal locations for storing data for immediate operation.
Registers - A set of special internal storage locations, found within the ALU, which are
responsible for storing data for immediate operation.
This marks the end of today's lesson. Next, we'll be exploring the various categories of
computers. Until then, keep up the good work and remember to work, not hard, but very
smart.
Data Information
(down arrow) (up arrow)
Input Output
Process
(up and down arrows)
Storage
Figure 2.1 - The process from data to information.
Applications of info technology
Nadine S. Simms, Contributor
Good day students, I trust that your studies have been going well. Today we will be starting
our discussion on the applications and implications of information technology.
This is a broad topic which deals with how information technology has been applied
(application) in aspects of our daily life to aid us in accomplishing tasks more accurately and
efficiently. While the implications aspect of the topic deals with the changes in aspects of
our daily lives that arise with the creation of new technology and applied knowledge.
Information technology is applied to several aspects of our lives, some of which include
communication, recreation, research, completing transactions, etc.
Banking
Science and technology
Education
Manufacturing
Law enforcement
We will be exploring how the application of information technology to the areas listed above
has influenced the way operations within the given area are conducted.
Banking
Line printers that are used for printing reports and customer statements
Character printers which print transactions in bankbooks
Magnet ink character read for reading numbers at the bottom of cheques.
Accounting software for managing customers' accounts and financial records of the
bank
Education
PCs
Voice synthesis for teaching people with speech and hearing disability
Database software - to keep track of each student's personal and academic records
Computer Aided Engineering (CAE) - for the simulation of conditions to test the
practicality of a newly designed machinery or implement.
Some of the hardware accompanying the Computer Aided Design and engineering software
are:
Good day students I trust that your studies have been going well. Today we will be
practising some programming questions.
Practice the following programming questions then check your answers with those given in
the answer to the practice questions provided.
4. Write an algorithm to read the names and ages of 10 people and print the name of the
oldest person. Assume that there are no persons of the same age. Data is supplied in the
following form name, age, name, age etc.
5. Write an algorithm to read an integer value for SCORE and print the appropriate grade based
on the following.
SCORE GRADE
85 or more A
Less than 85 but 65 or more B
Less than 65 but 50 or more C
Less than 50 F
6. What is printed by the following algorithm? *(hint: use a trace table to answer).
SUM = 0
N = 20
WHILE N< 30 DO
SUM = SUM = N
PRINT N, SUM
N= N + 3
ENDWHILE
Remember these are pseudo-code. Algorithms are not written in a structured programming
language.
c. Compiling is the process where by a compiler translates the entire source code (all
statements) to its object code before execution takes place, while execution is simply the
process by which the instructions are carried out so as to obtain useful information.
e. The while loop is a type of construct, in which the loop is repeated for an unspecified
number of times until a condition is met while the For loop is a type of looping in which the
loop instructions are repeated for a definite number of times such as 10, 20 or 30 times.
2. Numcount = 0
Sum =0
Largest = 0
Read Num
While Num ? 0 do
Sum = Sum + Num
Numcount = Numcount +1
If Num> Largest
Largest =Num
Endif
Read Num
Endwhile
Print Sum, Largest
3. Read N
Count = 0
Nonzero = 0
Zerocount = 0
FOR Count = 1 to N DO
Read Num
If Num=0
Zero = Zerocount +1
ENDIF
IF Num ? 0
Nonzero = Nonzero + 1
ENDIF
Count = Count +1
ENDFOR
PRINT= Nonzero, Zerocount
4. OLDAGE = 0
For j = 1 to 10
Read NAME, AGE
If AGE> OLDAGE then
OLDAGE = AGE
OLDPERSON= NAME
Endif
Endfor
Print = "The old person is", OLDPERSON
5. Read SCORE
If SCORE >= 85 then
Print = A
Else if SCORE >= 65 then
Print = B
Else if SCORE >= 50 then
Print = C
Else
Print = F
Endif
6.
Good day students. Today we will be looking at another aspect of programming called trace
tables.
A trace table is one that is completed by tracing the instruction in a given algorithm with
appropriate data to arrive at solutions.
It is most useful in testing one's skills in understanding how the IF, WHILE and FOR
constructs operate, as well as when testing in the debugging stage of creating one's
programmes.
For each algorithm that is being traced, a table is created since it enables better
organisation of data. The table contains columns drawn for each variable used in the
algorithm and enough rows to store the values that are created.
Points to note
When completing the trace table, we start from the top of the algorithm by writing
the appropriate value in the first vacant cell for the variable, which is currently being
assigned a value.
When calculating values, a variable can only store one item of data at a given time
and the current value is the value to be entered in the vacant cell.
When the values of the variables are to be printed, write the answers on your answer
sheet as soon as they are obtained rather than upon completion of the entire table.
When printing is required within the loop, several values for the same variable may
have to be printed for the same variable, dependent on the number of times the
print instruction was carried out.
If printing is only required outside a loop, all the values within the loop of the
variable to be printed may not have to be printed.
Example #1:
Step 1 Enter the variable int he top row and insert the initial value for each the variable in the
second.
X Y Z
1 2 3
X Y Z
1 2 3
3 5 8
X Y Z
1 2 3
3 5 6
6 11 17
17 28 45
45 73 118
Example #2
Solution #2
M N
1 1
3 2
5 3
7 4
9 5
Therefore that which is printed is:
M= 9, N=5
N.B. FOR is a loop statement, hence we have to repeeat the instructions between
the FOR and ENDFOR five times.
Example #3
A=1
B=3
WHILE B< 29 DO
A = A*B
B=B+A
Print A,B
B=B+1
ENDWHILE
Print B
Solution #3
A B Print A Print B
1 3 3 6
3 6 21 28
21 7 29
28
29
This is the end of this lesson. In the next lesson, we will be looking at some past
programming questions. See you next week!
Creating and using the loop statement
Nadine S. Simms, Contributor
Good day, students, I trust that your studies have been going well. In today's lesson, we
will be completing the topic, programming.
In order to arrive at the solution to some problems, it may be required that some of the
instructions be performed more than once.
This will be necessary if the same activity is to be done more than once, for e.g., when
calculating the gross income of a number of employees.
In the named example, each employee's gross income is calculated using the same method,
thus, the same instructions that are used for the first employee can be repeated for all other
employees. The instructions that are repeated are called loops.
In this construct, the loop is repeated for an unspecified number of times such that the user
of the programme has to signal the computer when to stop. The computer can also be
programmed so that when a certain condition is met, the repetition stops. It usually takes
the form:
The initial value may be a read variable or a value assigned to the variable, for e.g.: READ
NUM or NUM =1
This initial value is important as it enables comparison for the condition to be made when
the WHILE instruction is executed for the first time.
The condition is made up of the variable storing the initial value and is called the loop
variable, a rational operator >, <, = etc and a termination constant, also known as the
dummy value. The dummy value is not real for the problem being solved; for example, 999
may be the termination value of the entry of students' age in a class, as the age of a
student 999 is not real.
NB: The instructions before the WHILE construct are carried out once. Those written
between the WHILE and ENDWHILE may be repeated and those written after the ENDWHILE
are done once after the loop is terminated.
Important within the WHILE-ENDWHILE when using the WHILE construct is an instruction
that changes the value of the loop variable. It allows for termination of the loop, otherwise,
the instructions in the loop would be repeated forever.
The algorithm is written based on the fact that a WHILE statement generally follows a read
statement and a read statement generally precedes the ENDWHILE statement.
Example: Write an algorithm to calculate and print the average age of three students
terminated by 999
Answer
Read A, B, C
SUM = A+B+C
AVERAGE = SUM/3
READ A, B, C
ENDWHILE
2. Place a WHILE statement immediately following the READ statement and set the
condition for the WHILE statement based on the dummy value given
4. Close the loop with the ENDWHILE statement (ensure a READ statement is placed just
before the ENDWHILE statement)
5. Write remaining statements not to be repeated (for this example, there is none)
The for construct
This is the type of looping in which the loop instructions are repeated for a definite number
of times such as 10, 20 or 30 times.
'FOR' marks the beginning and 'ENDFOR' the end of the loop. The loop variable is used to
count the number of times the loop is executed. The step clause dictates by how much the
loop must be increased or decreased each time the loop is executed.
Example: Write an algorithm to calculate and print the average test score for each student
in an IT class of 30. Each student was given three tests.
Answer
For S= 1 TO 30 DO
Read A, B, C
SUM= A+B+C
AVERAGE= SUM/3
ENDFOR
Steps
5. Write the remaining instructions that are not to be repeated (for this example, there is
none)
Programming (continued)
Nadine S. Simms, Contributor
Good day, students. I trust that your studies have been going well. In today's lesson, we
will be continuing with the topic, programming.
The assignment statement is used to store a value in a variable after the operation (i.e.
+,-,*, or /) has been performed. The syntax of the assignment statement is as follows:
2. SUM = NUM1 + 50 (i.e. Add 50 to the value stored in NUM1, then store the total in the
variable name sum)
Pseudocode 1
Solution
SUM =20 + 30 (i.e. An assignment statement that adds two numbers 20 and 30 and stores
the results in a variable name SUM)
Pseudocode 2
Solution
Read NUM1, NUM2 (i.e. Input statement that accepts a value and stores the result in
variable name NUM1 after which NUM2 is accepted and stored in variable name NUM2)
PRODUCT = NUM1 + NUM2 (i.e. An assignment statement that multiplies the contents of
NUM1 by the contents of NUM2 and stores the result in the variable PRODUCT)
The question above could also be worded:
Write a pseudocode that prompts the user to enter two numbers, then find their
sum.
OR
Write a pseudocode that accepts two numbers and find their sum.
The output statement is used to show the value of the variable or a constant. This is usually
achieved by using a screen or printer.
PRINT = VARIABLE
PRINT = SUM
PRINT = PRODUCT
N.B. The content of the variable is printed or outputted, and not the name of the
variable. For example, the value of the sum which would have been 50 would have
been outputted, and not the word SUM.
Practice questions
2. Write a pseudocode that prompts the user to enter two numbers, finding the sum and
outputting the value obtained.
We have come to the end of this lesson. In the next, we will be looking at the condition
statement. See you next week and remember, work not hard, but very smart.
Programming
Nadine S. Simms, Contributor
Good day, students. I trust that your studies have been going well. In today's lesson, we
will be continuing with the topic, programming.
The input statement is used to fetch data from some external source and store the data in a
variable. The data stored in the variable can then be manipulated by the pseudocode.
Read NUM1
Input NUM1
Fetch NUM1
Get NUM1
All the statements above perform the same function in a pseudocode; they instruct the
computer to request input and to store the request input in the variable, NUM1. For our
lessons, we will use the first stated example for the input statement, that is, read variable
name:
Solution
Read A
Read B
Write a pseudocode to read the name and score for three persons.
For this question, we need to store six pieces of data, three names and three test grades,
respectively. Hence, six variables are needed. Our variable will be called:
NAME1, NAME2, NAME3, GRADE1, GRADE2 and GRADE3.
The solution to this problem could be written in any one of three forms shown in Table 1.
The same function is performed by all three psuedocodes. However, solution 1 accepts the
name of all the persons followed immediately by their grades; in solution 2, all the names
then all the grades are accepted; while solution 3 is inputted just as solution 2, except that
the input statements are written in the same line and each is separated by a comma.
If we were to carry out the instruction above using the following data:
Bill 73
Sally 85
Mark 60
For solution 1, the data would be entered in the order above, while for solution 2, the data
would be entered in the following order:
Bill
Sally
Mark
73
85
60
73 , 85 , 60
After the instructions are carried out, the statement of our variables could be illustrated as
shown in Table 2.
Candy 55
Joseph 90
Andy 79
We have come to the end of this lesson. In the next lesson, we will be looking at the
assignment statement. See you next week and remember, work not hard, but very smart.
Understanding programming concepts
Nadine S. Simms, Contributor
Good day, students, I trust that your studies have been going well. In today's lesson, we
will be commencing a new topic, programming, which I must say accounts for 30% of your
marks for the CXC Technical Proficiency Theory Examination. An excellent grasp of this topic
is important for passing this exam.
PROGRAMMING CONCEPTS
1. Machine languages
2. Assembly languages
3. High-level languages
4. Natural languages
Machine Language
This is the lowest level of programming language; it consists of a string of ones and zeroes
called binary digits. It is the only language that needs no interpretation for the computer to
understand.
Assembly Language
This is another low-level language; however, it uses mnemonics (letter codes to each
machine language instruction). A special programmer, called an assembler, converts each of
the mnemonic code and translates it into its machine language equivalent.
High-Level Languages
These are languages that closely resemble human language and need to first be converted
to machine language before the computer can carry out the instructions.
Natural Language
These are the languages normally spoken by humans which make it comprehensible to
humans. However, it is very difficult for computers to understand it due to vastness of
vocabulary as the languages vary.
Source Codes and Object Codes, the difference between the two
Source codes are programmes written in a particular programming language which may be
converted to machine language so that the computer can understand it, while object codes
are machine codes which have been converted to machine language by the compiler.
Compilers
Interpreters
These are a set of codes or a programme that are used by some programming language to
translate source codes to machine language. They do so while the programme is being
executed and translated. Codes are not saved, therefore, making it necessary for translation
to take place each time the programme is executed.
Good day, students. I trust that your studies have been going well. In today's lesson, we
will be looking at the topic in our syllabus called Internet.
Checking email, chatting with friends, downloading files, searching for information,
advertising, listening to music, conducting business transactions and viewing video clips are
some of the many ways we use the world's largest network, the Internet, on a daily basis.
However, to carryout the activities mentioned, we would first have to be connected to the
Internet.
To do so, we need to first become apart of the network it comprises. The most common way
of doing this is through the local Internet service providers (ISP), companies with direct
connection to the Internet that grant subscribers access, e.g., Cable and Wireless or Flow.
In addition to specialised software, subscribers connect using one of two things:
World Wide Web (www) - is just one of the components of the Internet consisting of a
collection of text and media documents called web pages.
Web pages - are a group of one or more related electronic documents. Multiple pages are
grouped to create a company's, individual's or group's website. Web pages are usually
encoded in a special language called Hypertext Mark-up Language (HTML) that allows one
web page to provide links to several others.
Web browsers - are special software that allow users to view web pages, e.g., Netscape,
Internet Explorer and Mozilla Firefox.
Search engine - is the name given to a software or website that allows a user to find
information quickly by typing in key words or phrases.
Hypertext Transfer Protocol (HTTP) - governs the transmission of web pages over the
Internet.
File Transfer Protocol (FTP) - this is the set of rules used to govern the sending and
receiving of files on the Internet. It enables us to find an electronic file stored on the
computer somewhere else and download it. It also enables us to upload (add information to
the web). These files are stored on what are termed FTP sites and are maintained by
universities, government agencies and large organisations.
Uniform Resource Locator (URL) - this is a unique address attached to each web page or
Internet file, e.g. www.Informationtechnology.com.
Electronic mail - permits the transmission of documents from one terminal or computer of
another via the Internet. The mail is stored in the recipient's mail box' and can be retrieved
at the recipient's convenience using a password. The concept is similar to that of a postal
system.
Advantages of email
Disadvantages of email
News group - this may be one of several online discussion groups covering a particular
subject or interest.
Internet Relay Chat (IRC) - this feature allows two or more persons from anywhere in
the world to participate in live discussions. Instant messaging programmes include ICQ,
MSN messenger and Yahoo messenger.
Telnet - this is one of the ways that a person can access a remote computer over a network
such as the Internet. It is often used by individuals or companies that seek to limit the
privileges of people who are logging onto their computer(s) via telnet.
Good day, students. I trust that your studies have been going well. In today's lesson, we
will learn about data communication.
Data Communication
As globalisation increases, the need for countries, companies and institutions to get fast and
up-to-date information to maintain their success and competitiveness also increases. To
achieve this goal, an efficient data communication system must exist.
Data communication, in its broadest sense, is described as the transmission of data from
one location to another for direct use or for further processing. Its system is made up of
hardware, software and communication facilities. In order to carry data from one location to
another, data transmission channels are needed.
Data Transmission
Data transmission channels carrying data from one location to another can be classified
according to bandwidth, which measures the volume of data that can be transmitted at a
given time. The wider the bandwidth, the greater the data that it can transmit. There are
three classes of bandwidths, namely:
Narrow-band - This channel can transmit data at slow speeds of between 10-30 characters
per second (30 cps) and is made use of in the telegram system.
Voice-band - this channel can transmit data at the rate of 1000 to 8000 cps. A telephone
line is voice-band.
NB - A standard telephone transmits only in analogue signal, whereas signals emitted from
a computer are in digital form. So that signals from a computer can be transmitted over the
telephone line, a device called modem (modulator/ demodulator) is used to convert the
digital signals from the computer to analogue and to digital when it needs to be reconverted
after transmission has been completed.
Broad-band - This channel can transmit large volumes of data at very high speeds; over
100 000 cps. Coaxial cables, fibre optic cables, microwave links and communication
satellites are commonly used to provide these channels.
Apart from the amount of data being transmitted via transmission lines, the direction in
which the data is flowing through the lines can also be used to classify them.
Simplex line - Allows data to flow in one direction only, ie, one may send or receive data,
but not at the same time. This transmission style is employed in the beeper technology.
Half-duplex line - Enables one to alternate the action being carried out. At one point, one
may be able to send data but not receive it and at another, receive it but not send. This
style is used in the walkie-talkie technology.
Full-duplex line - Enables user to both send an receive data at the same time, eg,
telephone
Network
In order for data to be transmitted from one computer to another, the computer must be
linked via thus creating a network. Computer networks fall in one of the following groups:
The Internet
Intranets
Advantages
Software and data files can be shared by many users. It is usually cheaper to buy one copy
of a software application and pay a licence fee for several machines, than to buy individual
packages for each computer:
Disadvantages
There is greater risk from virus, since they are spread much more easily between
computers, forming part of LAN.
Good day, students. I trust that your studies have been going well. In today's lesson, we
will be learning about software - what it is, along with its categories and functions.
Software
Software is simply computer programmes; instructions which cause the hardware (printers,
scanners, drives, etc.) to do work. Software as a whole can be divided into a number of
categories based on the types of work done by programmes. The primary categories of
software are:
System software
Application software
System software
The system software is the set of programmes which controls the working of the computer.
It is responsible for:
Storing the information used in the starting of the computer (boot-up process).
System programmes do not solve end-user problems. Rather, they enable users to make
efficient use of the computing facilities for solving their problems.
These programmes manage the resources of a computer system, automate its operation,
make the writing easier, and does the testing and debugging of users' programmes. A type
of system software is the operating system.
Operating system
An operating system may be seen as a suite of programmes that has taken many functions
once performed by human operators.
It can be seen from what is said that the operating system controls the way software uses
hardware. This control ensures that the computer not only operates in the way intended by the
user, but does so in a systematic, reliable and efficient manner. This 'view' of the operating
system is shown below.
Application software
Application software are programmes that address the tasks you want to carry out.
Application software include:
Word processing - used in the preparation of typed documents which may consist
of words, symbols and/or pictures or a combination of these elements.
Spread sheet - is a simulated account worksheet, comprising rows and columns in
which numeric data can be entered. There is also a set of hidden formulae capable of
performing calculations on the entered data.
General purpose software - Programmes which are designed to cover a single but
broad application scope. Prime examples of this are programmes such as Microsoft
Word, spreadsheet operations or database management.
Advantages
Disadvantage
Advantage
Disadvantage
Advantages
Disadvantage
Special training is necessary which can also be expensive and time consuming.
Customisation of general purpose software is just like this; where a general purpose
software package is changed so that it satisfies the needs of a specific user or
company.
Advantages
Disadvantages
Good day students. I trust that your studies have been going well. In today's lesson, we will be
continuing the topic of data representation.
The digits 0-9 can be represented in binary. If this method of coding is used on each digit of a
decimal number separately, the binary coded produced is called BCD. BCD is a very convenient
code for converting to and from base 10.
Digit 8 4 2 1
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
Table 7.1 showing binary representation of numbers 0-9.
There is a pattern! Can you figure it out? N.B. Each digit is represented by 4
Examples:
1. 82
From table eight in BCD is 1000 and two is 0010, therefore the answer should be: 1000
0010
2. 104
From the table one in BCD is 0001, zero is 0000 and four is 0100 therefore, the answer
should be: 0001 0000 0100.
Negative BCD
To represent a negative number in BCD, 1011 is added just before the number and 1010 is
added for a positive number. Therefore, answer for example one should read: 1010 1000
0010, but if it were, negative, it would have read: 1011 1000 0010.
Coding Schemes
The combination of zeros and ones used to represent characters are defined by patterns
called a coding scheme. Using one type of coding scheme, the number one is represented
as 00110001. Two popular coding schemes are American Standard Code for
Information Interchange (ASCII) and Extended Binary Coded Decimal Interchange
Code (EBCDIC).
ASCII is used mainly on personal and mini computers, while EBCDIC is used primarily on
main- frame computers. (See table below)
Table 7.1 Showing ASCII and EBCDIC representation of numbers and some letters
of the alphabet.
Parity
One bit in a byte or word is sometimes used for checking purposes. It is called a Parity Bit.
i) Odd parity
ii) Even parity
Even parity
If a particular computer uses even parity, the parity bit is represented as a zero or one, so
that there is an even number of ones in the whole byte or word.
Odd Parity
For odd parity, there must be an odd number of ones, hence, the parity bit is represented
as a zero or one, so that an odd number of ones results in the whole byte or word.
Examples:
1 1001001
0 110111101101100
When an even parity, word or byte is copied from one computer to another, or from one
part of the computer to another, the number of ones in the word or byte are checked. If
there is no longer an even number of ones, then a bit has been copied wrongly. Note that
the parity bit does not affect the value being stored or transmitted. It just acts as a check to
see that the bit value does not carry an error. The check is similar for an odd parity.
BCD, coding schemes and parity can be difficult, so re-read the previous notes as often as
needed. When you think you have got a good grasp of the concepts, try answering the
following questions:
Questions
a) 82
b) 104
2) (a) Explain the difference between odd parity and even parity.
After having tried them for yourself, but not before, check your answers with the ones at the end
of this lesson.
ANSWERS
2). (a) With odd parity there is an odd number of ones while
with even parity, there is an even number of ones.
One's complement
Two's complement
In this coding, one bit represents the sign and the other bit represents the magnitude of the
number. The convention for the sign bit is that the number one (1) represents negative and
the number zero (0) represents positive.
Examples:
1. nine
To convert this number to sign and magnitude one must first change the number into
binary (discussed in lesson #12).
910= 10012
9 = 0(sign): 1001(magnitude)
2. -89
Changing the positive number into binary
8910 = 10110012
The main reason for using two's complement and one's complement for the negative
numbers is that they enable subtraction to be performed through a modified form of
addition and thereby simplifies the processing circuit in the chips which do arithmetic in the
computer.
One's complement
In finding one's complement the bits are flipped (i.e. 0 replaces 1 and vice versa)
Example:
Two's Complement
The two's complement is found by flipping the bits (as in one's complement) and then
adding one to the result.
Examples:
+1
00100112 (Two's Complement)
The number needs to be represented using 4 bits therefore the answer is written: 0011
This topic can be a bit difficult, so re-read the above notes as often as needed. When you
think you have a good grasp of the concept try answering the following questions:
Questions:
a) 45
b) -96
a) 1001001
b) -48
a) 7-6
b) 8-5
After having tried them for yourself, but not before, check your answers with the ones at the end
of this lesson.
ANSWERS
1) a. 0:1011012
2) a. 01101112
3).a.00012