SS 2 Second Term Data Processing Note PPT
SS 2 Second Term Data Processing Note PPT
Register
This is a special high-speed storage area within the
CPU. All data must be represented in a register before it
can be processed, for example, if two numbers are to be
multiplied, both numbers must be in registers, and the
result must be placed in a register. (The register can
contain the address of a memory location where data is
Address
stored rather than the actual data itself.)
An address is used to
reference a storage
location in the main
memory. You can think
of computer memory
as an array of storage
boxes,
each of them has an
address (a unique
Bu
number) assigned to
it.s
A
col
lec
tio
n
of
wir
Types of registers es
The types of registers are Memory thrdata register
(MDR) and Current instruction Register
ou (CIR)
gh
The types of registers can be explained
wh better by
their functions. ich
MDR dat
: 1 The memory data register is useda is to hold data or the
. memory address tra
that contains either the next piece
ns of data or an
2 instruction that is to be used. mit
. The memory data register actsted as a buffer and
3 holds data that is transferred from
fro the memory
. to the processor. m
The memory data register is used
on whenever data is
CIR:
1. Current instruction register is the register, usually
in the control unit, that contains the instruction that is
being executed by the CPU.
2. The CIR stores the instruction currently being
executed. In simple processors, each instruction to be
executed is loaded into the instruction register which
holds it while it is decoded, prepared and ultimately
executed.
Differences between Register and Main
Memory
Factor considered: storage, speed, storage
capacity and relative
Storage devices Speed
cost. Storage capacity Relative cost
Data-Fetch-Execute
cycle
Fetch execute cycle is
the very basic way a
computer works. All
commands are
executed through the
running of this cycle.
The cycle itself has
very few commands,
however, when linked
up together it is
possible to create a
large program or even an
operating system. The cycle
contains 3 main parts
1. Fetch the
instruction
2. Decode the
instruction
3. Execute the
instruction
Operating procedure of computer data processing
Data processing consists of all activities which are
necessary to transform data into information. Computer
data processing is grouped under five basic categories
as shown
Field
Record
file
Data: a data item is the smallest unit of
information stored
in computer file.
Field: is a collection of
related items.
Record: is a collection of
related fields.
File: the collection of records is
called a file
Types of file organization
method
Serial: A serial file is one which the records have been
stored in the order
in which they have arisen. They have not been sorted
into any particular order. An example of a serial file is
an unsorted transaction file. A
shopping list is an example of a non-computerized
serial file. Serial files can be stored on tape, disc or in
memory. Sequential: in sequential file organization,
records are organized in the sequence by which they
were added. A sequential file contains records
organized in the order they were entered. The order of
Indexed:
the records Anisindexed
fixed. Thefilerecords
organization contains
are stored and reference
numbers, like
sorted in physical, contiguous blocks within each block
employee
the records numbers, that identify
are in sequence. a record
Records in relation
in these files canto
other
only be records.
read orThese
writtenreferences are called the primary
sequentially.
keys that are unique to a particular record. Alternate
keys can also be defined to allow alternate methods of
accessing the record. For example, instead of accessing
an employee’s record using employee numbers, you can
use an alternate key that reference employees by
departments. This allows greater flexibility for users to
Random
randomly file:
search This is the file
through organized
thousands via an index.
of records in a file.
Also calleditaemploys
However, “direct complex programming in order to
file” or “direct access file,’’ it enables quick access to
be implemented.
specific records or other elements within the file rather
than having to read the file sequentially. The index
points to a specific location within the file, and the file is
Methods
read from of that point.
accessing files:
Serial files: To access a serially organized
file is serially.
Sequential files: the method of access used is still
serial but of course the
files are now in sequence, and for this reason the term
sequential is often used in describing serial access of a
sequential tape file. It is important to note that to
process (e.g. update) a sequential master tape file, the
transaction file must also be in the sequence of the
master file. Access is achieved by first reading the
transaction file and then reading master file until the
matching record (using the record keys) is found. Note
therefore that if the record required is the twentieth
Random
record onfiles: Generally
the file, in orderspeaking
to get itthe method
into of to
storage
accessing
process random
it the files iswill first have to read in all
computer
RANDOM.
nineteen The transaction
proceeding record keys will be put
records.
through the same mathematical formula as were the
keys of the master records, thus creating the
appropriate bucket address. The transactions in random
order are then processed against the master file, the
Computer
bucket address filesproviding the address of the record
classification:
required.
Master file: there are files of a fairly permanent nature,
e.g. customer
ledger, payroll, inventory, and so on. A feature to know is
the regular updating of these files to show a current
position. For example, customer’s order will be
processed, increasing the “balance owing “figure on a
customer ledger record. It is seen therefore that master
records will contain both data of a static nature, e.g. a
customer name, address, and data that, by its nature will
Transaction
change each time file: aThis is also known
transaction occurs,ase.g.
movement file.
the” balance”
This
figureis already
made up of
mentioned.
various transactions created from the source documents.
In a sales ledger application the file will contain all the
orders received at a particular time. This file will be
used to update the master file. As soon as it had been
used for this purpose it is no longer required. It will
Reference
therefore have files: A file
a very withlife,
short a reasonable
because itamount
will be of
permanency.
replace by a file containing the next batch of orders.
Examples of data used for reference purposes are price
lists, tables of rates of pay, names and addresses.
Criteria for classifying computer files: Criteria for
classifying computer files
are:
By nature of content: it refers to the nature of file
content.
By organization method: it refers to the way files are
arranged e.g. . Serial, sequential, random and so on.
By storage medium: it refers to storage devices in which
a file’s’ could only
EVALUATIO
be stored such as magnetic or optical disk and magnetic
N
tape and so on.
1 Define the following terms;
. Computer files
2 Record
. Field
3 Data Item
. Explain the classification of
4 computer file. State the criteria for
. classifying computer files.
5 b Draw a sample of file
. structure
6 8. List and explain the different method of
. accessing files.
b List and explain types of file
7
organization method.
.
Week 3: Handling Computer Files
Basic operations of
computer files
1. Create: Creating a file
with a given name.
2. Delete: Deleting an
unwanted file.
3. Retrieve: Retrieving a
stored file or lost file.
4. Copy: Copying a created
file to either an external or
in-built storage device.
5. View: Viewing a created file or granting privilege of
viewing.
6. Open:
Steps Opening a file to use its contents.
in creating
7. Update: Reading
sequential files or updating the contents.
The OPEN statement is used in writing information to a
file. In general,
the open statement follows this pattern;
OPEN file FOR OUTPUT
AS 1
The file determines the
filename to use
The FOR portion indicates how the file will be accessed
or operated; it
may be APPEND, BINARY, INPUT, OUTPUT, and
RANDOM The
The
AS isfollowing opensused
the identifier a file,
forusing mode OUTPUT
the filehandle and
in question.
number 1, and then
saves the text.
1 CLS
0 OPEN "textfile.dat" FOR
2 OUTPUT AS 1
0 PRINT 1, "Hello
3 World" CLOSE 1
0 END
4
CODE
0
The combination of all these records forms a file. Thus, a
5 is a group of related records.
file
0
To facilitate the retrieval of specific records from a file,
at least one field in each record is chosen as a record
key. Usually, the key is unique to every record to avoid
duplication of records in a file.
BASIC File Processing statement to read and
display files
The table below would be used in a BASIC program. The
table would be stored in a file named "EXAMFILE.TXT"
the content would be retrieved from the file and output
to the screen
MATHEMATICS ENGLISH TOTAL
C
01234 50 90 140
01235 70 40 110
01236 80 70 150
Examp
le
1 CLS
0 OPEN "EXAMFILE.TXT" FOR INPUT
2 AS 1
3 PRINT 1 "MATRIC MATH ENG.
0
TOTAL NO. S LANG
SCORE"
40 PRINT 1 000 5 9 140
50 " 1 0 0 "
60 PRINT 1 000 7 4 110
70 " PRINT 2 0 0 "
80 OPEN " 000
1 8
FOR 7
AS 150
90 CLOSE 3
"EXAMFILE.TXT" 0
OUTPUT 10 "
10 1
DO WHILE NOT
0 EOF(1) INPUT 1, test
11 PRINT
0 test
12 LOOP
0 CLOSE 1
Note
13 ENDthat Free-File function is used to determine the
next
0 available
filehandle
14 to be used in the OPEN statement. However,
in
0 a bigger project that uses many files,
Free-file ensures that there are no conflicting File
Handles used. It's a good
practice to use it whenever you're not sure of the
number of files your program might need to open.
OPEN "Examfile.txt" for output AS #File
Number
This is the line that does the physical opening of file
and assigns it
#FileNumber as its filehandle. The 'FOR INPUT' part
Read mode as you'll
tells QuickBasic thatbe reading
you want tothe contents
open ofin
the file the file
later in the example.
Next is the loop indicated by the DO WHILE NOT EOF
(FileNumber)
line. In QuickBASIC EOF () means End Of File. There is
also BOF () for
Since you can't
Beginning goand
of File backwards onLength
LOF () for a sequential
of Filefile, you
won't need BOF () at
all.
The first line Gets a line of data
Describe file insecurity
Computer file insecurity refers to the concept that a
computer system is vulnerable to attack and that this
fact creates a constant battle between
those looking to improve security, and those
looking to circumvent
security.
Effects of insecurity of files
Data loss refers to the unforeseen loss of data or
information. An occurrence of data loss can be called
Data Loss Event and there are several possible root
causes. Backup and recovery schemes are developed to
restore lost data.
Overwriting is a process of writing a binary set of data
on memory.
Overwriting generally occurs when unused file system
clusters are written upon with new data. In simple
terms, it writes over the previous data.
Methods for file
security
Backup:
Backup or the process of backing up a file refers to
making copies of files so that these additional copies may
be used to restore the original after the data loss event.
Backup has two distinct purposes. The primary purpose
is to recover data as a reaction to data loss, be it by data
deletion or corrupted data. The secondary purpose of
backups it is to recover data from a historical period of
time within the constraints of a user-defined data
Antivirus:
retention policy.
An anti-virus program protects a computer file from
malicious virus attack, detects and heals files that have
been attacked. Usually, it consists of a firewall, a virus
scanner and remover and sometimes other tools as well.
Password:
It is a chosen secret string of characters that allows
access to a computer, interface, files etc. The use of a
password is at the user's discretion and caution must
be exercised by the user to remember the password
always.
Differences between computer files and manual
files
Manual is using the old method without the help of the
technology or maybe less to perform a certain task or
are more effective when compared with a manual
system in terms of the
productivity and time usage.
Week 4: Word
Processing
What is word
processing?
Word processing is
the use of computer
software to create,
edit. View, store,
retrieve and print
text documents. A
text document is a
written
communication like
letters reports,
memo and so on.
The software that is
used for word
Examples of word processing is called
processors a word processor.
1. Microsoft word
2. WordStar
3. WordPerfect
4. Word pro
5. Corel WordPerfect
6. Lotus notes
7. Perfect writer
8. MultiMate advantage
9. Professional
write
Word processors are used in place of typewriters
because of the quality of
outputs, ability to replicate copies without having to
Application areas of word
retype or photocopies.
processing
Word processing is used in the following
areas:
1. In offices
2. In publishing
3. In journalism
4. In education
5. For writing articles
Version:
Microsoft Word Versions: MS office 2000,
2003, 2007,
Features of 2010.
word processors
1. Typing document
2. Editing document
3. Storing or saving documents
4. Move, copy and paste
5. Insert, remove words, sentences,
paragraph etc.
6. Type, using different fonts types
and sizes.
7. Editing features of a word
processor
8. Editing features in MS word
include:
9. Copy, cut and paste
10. Format painter
11. Find and replace
12. Go to
13. Spelling
Copy, cut andandpaste
grammar
14. Thesaurus
You can use word's cut feature to remove information
15.
fromWord count
a document. You can use the Paste feature to place
the information you cut anywhere in the same or another
document. In other words, you can move information
from one place in a document to another in the same or
different
document by using the Cut and Paste features. The office
clipboard is a temporary storage area where copied and
paste the information that is stored on the Clipboard as
often as you like.
When you copy/cut a document, the copied/cut data can
be pasted into a new location.
Copying a document
Copying a document or portion of a document means
duplicating the document. The original document will
remain while the duplicate of it will be found in a new
location. To copy a document five major methods are
involved and they are:
1. Shortcut method
2. Keyboard method
3. Drag and drop method
4. Ribbon bar method
5. Right-click mouse method
Shortcut method
1. Highlight the portion of a document to be copied
2. Right-click on the highlighted text
3. Select Copy
4. Position the insertion point in a new location
5. Right-click in an empty space
6. Select paste
Keyboard method
1. Highlight the document to be copied.
2. Press the keys CTRL + C to copy.
3. Position the cursor on the insertion point
4. Press the keys CTRL + V to paste.
Drag and drop method
1. Highlight the document to be copied.
2. Hold down the CTRL key as you drag the highlight
to a new location.
3. Release the mouse button.
Right-click mouse method
1. Highlight the document to cut.
2. Right-click on the highlights and select cut
3. Position the insertion point in a new location
4. Right-click on an empty space.
5. Click on paste.
Find and
Replace
When a mistake is made all over a document, for
example, you mistakenly
typed Fred instead of fried, the find and replace feature
helps to locate the errors and quickly replace them with
the expected text. To apply the find and replace feature
in a document:
1. Click on Home Ribbon
2. Click on the Find icon and drop-down arrow and click
find
3. Click on the Replace Tab
4. Type the error text in the FIND WHAT text box and
Spelling
the and in
corrected Grammar
the REPLACE if you want it one after
5. Click cancel buttona to
They check whether document
abort theisoperations
error-free both in
spelling and grammar. To confirm if a document is
error- free using the spelling and grammar tool:
1. Click on Review ribbon
2. Click on the Spelling & Grammar icon
3. It selects a sentence and asks you to ignore or click on
its suggestion and click change. Select the one that
applies.
4. Click Next Sentence to move to the next error.
5. Click close if you don't want to continue.
6. When a spelling and grammar action is completed a
dialog box as shown is displayed,
7. Click ok
Formatting a document
Formatting a document makes the document
presentable. Formatting entails the following:
Font
Font Face: the text outlook format of a document:
Microsoft has embedded the following font face: Arial,
Times New Romans, Tahoma, Elephant, Freestyle
Script, Imprint MT, Shadow, and so on.
To set a the
1. Type fonttext
face for your text, do the following
2. Highlight the text
3. From the Home Ribbon click on the font face
(ctrl + shift + F)
4. Click the drop-down arrow and select a font face
of your choice.
Font Size: This displays text sizes of your choice:
Microsoft has embedded
font sizes ranging from 8-72.
To select a font size for your text, do the following:
1. Type the text
2. Highlight the text
3. From the Home Ribbon, click on the Font size
(ctrl + shift + F)
4. Click the drop-down arrow and select a font size
Font
of your style: This displays effects on text such as bold,
choice.
italic, regular, bold
italic.
BOLD
To select a bold font style for your text, do
the following:
1. Type the text
2. Highlight the text
3. From the Home Ribbon, click on the B
ITALIC
To select a bold font style for your text, do
the following:
1. Type the text
2. Highlight the text
3. From the Home Ribbon, click on the I
Underline
To select an underline font style for your text, do
the following:
1. Type the text
2. Highlight the text
3. From the Home Ribbon, click on the U
4. To select the different underline font style for
your text, do the following:
5. From the Home Ribbon, click on the drop-down
arrow
6. Click
Font on the
Color: desired
This underline
display's colourstyle.
for your text, do
the following:
1. Type the text
2. Highlight the text
3. From the Home Ribbon, click on the A icon
drop-down arrow.
4. Click on the desired colour of your choice.
Font Effect: This displays other effects on your
text such as strike-
through, subscript, superscript
Strikethrough
To apply the Strikethrough effect on your text, do the
following:
1. Type the text
2. Highlight the text
3. From the Home Ribbon, click on the" Abc" icon
Double Strikethrough
drop-down arrow.
Type the text
1. Highlight the text
2. From the Home Ribbon, click on the icon
beside the font.
Subscript
1. Type the text
2. Highlight the text
3. From the Home Ribbon, click on
the" X2" icon.
Superscript
1. Type the text
2. Highlight the text
3. From the Home Ribbon, click on the
"X2" icon.
Change case
1. Type the text
2. Highlight the text
Character
3. From thespacing: This displays
Home Ribbon, click on different
the
characteristics
"Aa" icon. of spacing that
can be applied to a text they include: Expanded or
condensed, kerning, and so on
Paragraph:
Indent and spacing: This feature creates a text with
spacing before and after. The effects here are
alignment, indentation, spacing, tabs.
Alignment
1. Right-click the white space on a document and
select paragraph.
2. Click on the indent and spacing tab. In the
general options in the alignment drop down menu,
Indentation
1. Type the text
2. Highlight the text
3. Right-click on the text and select paragraph
4. Click on indent and spacing tab. In the indentation
options, select your desired choice as shown in the
dialog box.
5. Click ok to apply to the document.
Features of word processing
1. A good word processor should have the ability to
create, save and retrieve documents.
2. It should have the ability to find and replace words
in a document.
3. It should be capable of wrapping your text.
4. Generate multiple copies of a document with the
aid of the printer.
5. Every word processor should have the ability to
manage files on the computer.
6. Ability to display graphics
7. A good word processor should have the ability to
spell check your document.
8. Ability to mail merge documents
General evaluation
9. To format a document and apply headers and
1. Define Word Processing and Word Processor
footers
2. List five (5) examples of Word Processor
3. Write out the steps to carry out the following; (ii
(i) Change
Subscr Case
(iii) Superscript (iv) (v) )
ipt Strikethrough
Strikethrough Double
4. List and explain the different methods in
copying a document