Shun Lee Catholic Secondary School
AS Computer Applications (2003-2005)
(A) What is a computer?
A computer is an electronic device, operating under the control of instructions,
that can accept data, process data arithmetically and logically, produce output
from the processing.
Information processing cycle: INPUT - PROCESS - OUTPUT
(1) How does a computer know what to do?
The computer must be given a detailed set of instructions that tell it exactly
what to do. These instructions are called a computer program, program
instructions or software.
(2) What makes a computer powerful?
Speed A computer can do billions of actions per second.
Reliability Electronic components have very low failure rate.
Accuracy Failures are usually due to human error, one way or
Storage A computer can keep huge amounts of data.
Connectivity A computer is able to share input, process, output and
storage with other computers.
(B) Components of a computer system
(C) The Central Processing Unit (CPU)
The CPU is built on a single chip called a
microprocessor. The main function of the CPU
is to accept and execute the instructions stored in
the computer’s main memory.
The CPU consists of two major components:
(1) The control unit (CU)
The control unit controls the overall operations of the computer. Some major
functions of the control unit are:
(a) To control access to the main store
(b) To control the sequence in which instructions are executed.
(c) To regulate the timing of all operations carried out within the CPU.
(d) To send and receive control signals to and from peripheral devices.
(2) The arithmetic and logic unit (ALU)
ALU performs arithmetic operations and logical operations on data.
Large computer systems, as well as newer workstations and network servers,
frequently contain more than one central processing unit. Multiple CPUs
enable the computer to execute more than one instruction or process more
than one program, at the same time. This capability is known as
Note: The control unit controls the computer by repeating 4 operations,
called the machine cycle. The 4 operations are: fetching program
instructions from memory; decoding the instructions into commands that
the computer can process; executing the commands; and storing the results
(D) The Main Memory
The main memory can be thought of as a series of storage locations. Each
location has a unique address. The main memory is connected to the CPU by
They are electrical pathways that carry signal (bits) between a CPU’s
components and outside devices. Typically, there are two kinds of buses:
The address bus carries the location of data in the memory.
The data bus transfers the data between components
(2) Data Representation
Computers can operate in only two states: on and off. The on state is
represented by 1; the off state, by 0. Computers work with data that has
been encoded using nothing but the binary digits 0 and 1.
Bit short term for binary digit (1 or 0).
Byte a group of eight bits - - a unique code can
therefore be assigned to 256 different data
possibilities. (e.g. 01000001 represents the
There are two competing 8-bit coding standards: Most supercomputers and
mainframe computers use a code called Extended Binary Coded Decimal
Interchange Code (EBCDIC). Almost all smaller computers, including
minicomputers and personal computers, use the American Standard Code
for Information Interchange (ASCII).
Character ASCII EBCDIC Character ASCII EBCDIC
A 01000001 11000001 0 00110000 11110000
B 01000010 11000010 1 00110001 11110001
C 01000011 11000011 2 00110010 11110010
D 01000100 11000100 3 00110011 11110011
There is also a 16-bit coding scheme called Unicode. It can represent more
than 65,000 characters and symbols and be used to represent almost all of
the world’s languages.
(3) Memory sizes
1 byte = 8 bits
1 KB = ___________ bytes
1 MB= __________ KB = ____________ bytes
1 GB = __________ MB= _____________ KB = ______________ bytes
(4) Types of memory
There are two main types of semiconductor memory chips.
Random Access Memory (RAM) Read Only Memory (ROM)
Data can be read from and written Data can only read from the ROM.
onto in the RAM. The contents cannot be overwritten.
When the computer is switched off ROM is non-volatile. When the
( or the power is cut), all the data power is switched off, the contents of
held in the RAM are lost. RAM is the ROM remain unchanged.
When a program is run, the ROM is used by the computer
instructions and the working data manufacturer to store the systems
are temporarily stored in the RAM. programs. These programs control
the fundamental operations.
(E) The Motherboard
In a microcomputer, all the components previously discussed in this lesson are
located on the motherboard, which is a large circuit board. (Some people prefer
to use the term mainboard.)
In addition to housing the CPU, memory, and coprocessor chips, the motherboard
also has expansion slots designed for expansion cards. An expansion card, also
called an adapter, is a circuit board that provides additional capabilities for the
computer. Expansion cards are available for many different purposes. One type of
expansion card controls a monitor, another expansion card controls a mouse, and
still another provides an internal fax modem.
Also found on the motherboard are one or more ports, which enable the computer
to communicate with peripheral devices, such as printers, modems, and scanners.
Most personal computers have parallel ports (commonly used for printers) and
serial ports (commonly used for modems). A modem is an accessory that enables
your computer to communicate with another computer through a telephone.
How microprocessor works
Introduction to PC (http://www.pcguide.com/intro/index.htm)
Computer Hardware (http://www.ied.edu.hk/has/comp/compnent/index.htm)
Tom’s Hardware Guide (http://www.tomshardware.com/guides/cpu.html)
(F) Peripheral devices
(1) Input devices
Input devices Process of Input Applications
Keyboard Keyboard computer ---
Mouse images on screen mouse computer ---
Punched card reader Punched card Punched card reader ---
Optical character Optical character Optical character gas bill
Magnetic ink Magnetic ink character Magnetic ink bank cheque
character character recognition reader computer
Bar code Bar code Bar code reader/scanner supermarket
Optical mark reader Pen/Pencil mark Optical mark reader MC questions、
computer Mark Six
Magnetic card magnetic stripes Magnetic card reader ATM card、stored
reader computer value ticket
Light pen images on screen light sensitive screen Designer’s
Graphic tablet a special pen and graphic tablet CAD
Image scanner text/graphics Image scanner photo
Chinese writing Chinese words Chinese writing tablet ---
Speech recognition Voices Speech recognition device handicapped
device computer people
Joystick/game images on screen Joystick/game computer game
paddle paddle computer
(2) Output devices
(i) Visual display units(VDU) / Monitors
E.g. Monochrome(black and write), EGA, VGA, SVGA(high
resolution 1024x768 dots).
(a) Impact printers
(1) Dot-matrix printer
The dot-matrix printer arranges printed dots to form characters and
images. One or several vertical columns of print hammers,
referred to as pins, are contained in a rectangular print head. These
pins are activated independently. They form a character dotted
image as the print head moves horizontally across the page.
(2) Line printer
Line printers can print one line at a time. Atypical line printer is
the drum printer. The drum printer consists of a cylinder with
raised characters on its surface. There are a complete set of
characters (usually 64) around the circumference of the drum. The
drum rotates one revolution for each line of print. As the selected
character passes the print position, a hammer strikes the paper and
ribbon against the drum.
(3) Daisy wheel printer
A daisy wheel printer produces letter quality output for word
processors. It works like a type writer. The daisy wheel consists of
a circular fan of spokes’ with alphabetical and numerical
characters at the end of the spokes. Daisy wheel printers cannot
produce graphics and different character styles.
(b) Non-impact printers
(1) Ink/Bubble jet printer
The ink-jet printer uses the dot-matrix principle. Droplets of
electrically charged ink are injected through a nozzle towards the
paper. They are deflected to the proper position when they pass
through an electric field.
(2) Laser printer
A laser printer uses laser beams and photocopying techniques for
printing. The laser beam forms an electrostatic image on a drum.
The drum is then processed to attract carbon powder and form the
The above printers are capable of producing graphic output but usually
limited by size andquality. Pen plotters, however, can convert
computer-generated graphics into high-precision, hard-copy output.
The pen of the plotter moves(which may change ink colour) moves to
and fro across the page while the paper is moved up and down by a
roller. By combining these movements of the pen and the paper,
straight lines and curves can be drawn anywhere on the paper.
(iv) Sound synthesizer
A sound synthesizer combines the basic sound units that makes up
speech. When the computer has to say something, the appropriate
codes are processed and a sound is formed. They are used in automatic
telephone answering machines, phone banking systems and ‘speaking’
(3) Backing storage devices
(i) Why we need backing storage devices?
(a) Data in the main memory(except in the ROM) are lost when the
power is off.
(b) Main memory is more expensive.
(c) A large amount of data must not be stored in the main memory
because the storage space of the main memory is limited.
(ii) Comparison between Main memory and Backing storage device.
Main memory Backing storage device
Function Provides a working Holds data or programs
area for processing permanently
Storage capacity Limited Large storage capacity
Cost More costly Cheaper
Access mode Supports both Some devices(tapes)
sequential and direct support only sequential
Access time Fast Slower
Permanence User memory is Non-volatile
(iii) Comparison between Different types of storage devices.
Magnetic Hard disk Floppy Optical
tape disk disk
Cost of drive high high low high
Cost of media relatively low high low medium
Access sequential direct direct direct
Access time slow fast slow medium
Capacity 10-320 MB 4GB-60G 1.44 MB 600MB-65
(G) Communication devices
When two computers communicate to each other over a telephone line, the
digital signals must first be converted to analogue signals. This process is
called modulation. At the receiving end, the analogue signals must be
converted back to digital signals. This process is called demodulation. The
device required for the task of modulation-demodulation is known as a
(2) Network devices
(i) Twisted-pair wire
Twisted-pair wire is typically used for telephone lines. It is cheap but has
the lowest capacity.
(ii) Coaxial cable
Coaxial cable is more expensive than twisted-pair wire but has a greater
capacity to transmit data. It is also more reliable as it is better insulated
and better protected. It is commonly used for LAN applications.
(iii) Optical fibre
Optical fibre can carry many signals simultaneously. Also, both voice
and data signals can be carried on the same line. As optical fibre operates
using the principle of light, data travel very fast.
Data can be transmitted via microwave radio signals. The radio signal
travels in a direct line from one relay station to the next. Because the
earth is curved, the relay stations are usually on tops of hills and towers.
They are usually at intervals of 48 km.
Satellites are launched into space to relay data communication. The big
advantage of satellite is that data can be transmitted from one location to
any number of locations on Earth.
(3) Local Area Network (LAN)
A LAN links independent computers and other peripheral devices over short
distances. Typically, the LAN is within the same building, for example, a
school or small business. The hardware is connected by coaxial cable, which
runs around the building with many connection points. In a typical LAN,
peripheral equipment may be shared among the computers connected.
(H) System software
(1) Operating system
Operating System (OS) is an integrated set of systems programs that
manages the resources, controls the overall operations of a computer, and
functions as an interface between the computer and the users.
(i) Examples of Operating Systems.
For Mini or mainframe computers: ___________________________
For PC: _________________________________________________
(ii) The functions of an Operating System
(1) To control the scheduling, loading and running of jobs.
(2) To allocate memory space to programs and data.
(3) To keep a log of programs that have been run and actions taken.
(4) To maintain security by checking passwords.
(5) To deal with errors when they occur and to keep the system running
(6) To control the selection and operation of peripherals efficiently.
(2) Utility programs
Utility programs are used to aid or make the users in using the computer
more convenient and powerful.
Examples : PC tools , Norton Utility.
(I) Applications software
(1) Custom-made software
Custom-made software are programs for specific task.
Examples: Photoshop for editing photo or graph.
PageMaker for desktop publishing
AutoCAD for computer aid design
(2) Packaged software
Packaged software consists of a set of application software such as word
processing, spreadsheet, graphics and database.
Examples: MS office 97.
Appendix I - Input Devices
Input devices, such as keyboards or scanners, are hardware components that capture,
collect, and transmit data and programs to the computer in a form that computer can
understand. Input devices transmit the input to the computer in a series of electronic
pulses representing bits, or digits, of the binary code.
A keyboard is an electronic device used to enter alphanumeric data (letters, numbers,
and special characters) into the computer.
Function Keys, labeled from F1 to F12, allow user to quickly access commands and
functions, such as saving a document or calling up a program’s Help feature.
Cursor-control Keys govern the movement of the cursor on the screen. They
include Up Arrow, Down Arrow, Left Arrow and Right Arrow key on the keyboard.
Special Purpose Keys are used in conjunction with other keys to enter commands
into a computer. Control (Ctrl), Alternate (Alt) and Shift keys are example of special
Toggle Keys are keys that, when pressed, activates a certain mode or condition, and
when pressed again, deactivates the condition. The Num Lock key, Cap Lock key
and the Scroll Lock key are examples of toggle keys. (For example, pressing the Cap
Lock key will cause all the alphanumeric characters to appear in capitals without
holding down the Shift key.)
Numeric Keypad, located in the far right portion of the keyboard, is used for
entering numbers quickly and for performing the same operations as a calculator.
Not all keyboards have the same layout. Most keyboards have adopted the so-called
QWERTY layout for the alphanumeric keys.
Internet Reference: http://www.jegsworks.com/Lessons/lesson3/lesson3-2.htm
Po i n t i n g D ev i c e s
Many people use pointing devices instead of keyboards whenever possible. Pointing
devices minimize the amount of typing (and the number of errors). The many
pointing devices available include the mouse, trackball, light pen, digitizing tablet,
touch screen, and pen-based system.
The mouse is a palm-size device with a ball built into
the bottom. The mouse is usually connected to the
computer by a cable (computer wires are frequently
called cables) and may have from one to four buttons
(but usually two). The mouse may be mechanical or
When you move the mouse over a smooth surface, the
ball rolls, and the pointer on the display screen moves
in the same direction. With the mouse, you can draw,
select options from a menu, and modify or move text.
You issue commands by pointing with the pointer and clicking a mouse button. In
addition to minimizing typing errors, a mouse makes operating a microcomputer
easier for beginning users.
A trackball is like an upside-down mouse. Used
similarly to the mouse, the trackball is frequently
attached to or built into the keyboard. The main
advantage of a trackball is that it requires less desk
space than a mouse.
Note: The mouse is not practical for people using a notebook computer in a small
space. Track Point or Touch pad is therefore used instead to control the
Perhaps the easiest way to enter data is with the touch of a finger. Touch screens
enable the user to select an option by pressing a specific part of the screen. Touch
screens are commonly used in grocery stores, fast-food restaurants, and information
A light pen, resembling a writing pen, is used to write on,
draw on, or select menu items on a computer screen. The tip
of a light pen contains a highly sensitive photoelectric cell.
When the light pen is pointed close to the screen, the
photoelectric cell detects the light emitted from the exact spot
the pen is touching. This accuracy makes light pens very
popular among engineers and draftsmen who use
computer-aided design (CAD) software to create blueprints
and drawings of products or construction projects.
Another tool used in CAD applications and other
graphics applications is a digitizing tablet. A
digitizing tablet consists of a grid on which
designs and drawings can be entered. Most
tablets are pressure-sensitive, and the user draws
directly on the tablet using a special pen called a
stylus, or a puck. Digitizing tablets are used to
design cars, buildings, medical devices, and
A joystick is a pointing device often used for playing games. The joystick has a
gearshift-like lever that is used to move the pointer on the screen. On most joysticks,
a button on the top is used to select options. In industry and manufacturing, joysticks
are used to control robots. Flight simulators and other training simulators also use
A scanner is a device that converts photographs, drawings, forms, text, or any
combination of these items into digital form. The scanned image can be edited,
printed, enlarged, or reduced.
There are two types of image scanner: Hand-held Scanner and Page Scanner
(Flatbed Scanner). Hand-held scanners are used for scanning small or curved areas.
Page Scanner looks similar to tabletop copying machines. Pages are either laid face
down on the scanner’s glass surface or fed through the scanner by means of a
side-feed device. The automated mechanisms of page scanners make them more
steady and accurate in their recording of images than hand-held scanner.
Bar codes are a series of vertical lines manufacturers print on their products to
represent alphanumeric data. Bar-code Reader is a device used by many retail and
grocery stores to determine the item being sold and to retrieve the item price from a
There are a variety of bar code schemes. The scheme developed by the supermarket
industry for identifying products and manufacturers uses a ten-digit system called the
Universal Product Code (UPC). The publishing industry uses another coding
scheme for the International Standard Book Number (ISBN).
Magnetic Ink Character Recognition
A group of unique characters are printed along the bottom edge of personal checks.
These characters are printed with a special magnetic ink that is read using a process
know as magnetic ink character recognition (MICR). MICR is used by the
banking industry as a means of processing checks it receives in every day.
Optical Character Recognition
Optical character recognition (OCR) is a system of producing machine-readable
code on a data source item and reading that code by means of optical scanning
OCR software can be installed in a computer to perform
character recognition. It takes a scanned image and converts
the characters in the image into computer characters. The
document can now be edited with a word processor. This is a
very tricky process. Documents must be carefully checked for
wrong conversions. If the original print was not very crisp
and clean, errors are very likely. Manually checking for
proper translation is necessary.
Optical Mark Recognition
If you have ever taken the HKCEE multiple-choice examination, you are already
familiar with optical marks. The answer sheets on which you made your marks are
called scan sheets. Optical marks are the filled-in shape, usually ovals or rectangles,
on scan sheets. The data collected on the scan sheets are translated into binary form
by an optical mark reader (OMR). The OMR contains a light beam that passes over
the scan sheet and detects the fill-in ovals. In the test example, an answer sheet is also
fed into the OMR and the answer sheet are compared and marked by the computer.
Use lead pencil to mark on scan sheet Feed the scan sheets into the OMR.
A smart card, often the size of a credit card, contains a built-in microprocessor and
memory that identify the card (and its owner) and assists in financial and other
transactions. Its primary advantage is increased security: the information can only be
read by an authorized user with appropriated password.
Multimedia Input Devices
Voice Input Device
A voice input device has two functions: First, it can simply record and play back the
voice inputted by the user. Secondly, it can record a human voice, then with
appropriate voice recognition software, convert the voice input to ASCII
Voice Recognition systems make it possible for a user to speak to a computer
through a microphone. A voice recognition system contains an audio digitizer that
converts sounds, including spoken words into ASCII characters. Nowadays,
Chinese words can also be converted into Chinese characters in a computer system.
Chinese Handwriting Recognition Device
A Chinese handwriting recognition device consists
of a handwriting board or a digitizing tablet, and the
software to control the devices.
The Chinese word written on the tablet will be
converted into a digital data and matched with data
on character already stored in the computer’s
dictionary. The recognized item will then be
converted into the matched Chinese character.
Nowadays, sophisticated Chinese handwriting recognition system also contains
voice recognition function.
Digital camera record images in a form that can be stored by a
computer. Some digital cameras resemble traditional cameras and are
portable. Some are connected directly to a computer.
Video digitizers can capture input from virtually any
type of video device, such as VCRs, televisions, and
camcorders. Audio digitizers can digitize music or
voice from a microphone. It is fairly easy to capture a
portion of a television show, add some music that
complements the picture, and play back the result on a
microcomputer to create a multimedia presentation.
Appendix II - BIOS
Together, the operating system and the ROM BIOS program routines form the layer on
which the user programs "rest." When the PC has to work, an operating system has to be
read from a disk. There are many different operating systems to choose from. However,
the BIOS is always placed firmly and centrally in the PC hardware.
BIOS - firmware
One of the fundamental techniques in the PC design is the BIOS program layer. BIOS
(Basic Input Output System) is a group of small programs, furnished by the PC
manufacturer - also called firmware .
The BIOS routines are placed in the hardware - in a ROM chip - and are always
available. Being stored in the hardware, they are functional regardless of which
operating system they have to work with. So, in designing an operating system, one
must pay close attention to the BIOS. The operating system must be able to work closely
with the BIOS.
BIOS contains some very basic program routines, which handle data transfer between
different hardware components. During PC start-up, the BIOS programs are the only
accessible software. Later in the start-up process, the operating system is read. It will
then take control of the PC. The operating system has to provide a user interface , on
which the user programs can rest.
Thus, the operating system has two "faces": One pointing up towards the user and
his/hers programs and one pointing down towards the system and hardware:
As computers have become more and more powerful, the user interface has become
more graphic and user friendly. In a few years we will be able to address our commands
directly to the operating system (you can do it already today with IBM's OS/2).
Thus, the "upwards" face of the operating system will change greatly - supported by
technological development. The "downwards" face - the operating system's interface
with hardware - will change less. At least, the fundamental principles are the same as in
the childhood of the PC.
BIOS or drive programs
The operating system must be able to communicate with hardware. As we are going to
see, this can be done in two ways:
The operating system communicates directly with hardware through drive
The operating system utilizes the BIOS programs.
While BIOS is hardware specific program code, stored in hardware, the drive programs
are small hardware specific program elements read from the disk together with the
Depending on which operating system is installed, both principles are used in various
degrees. Since the BIOS programs consist of 16 bit code, it is typically DOS (a 16 bit
operating system) which utilizes BIOS to a large degree. In the newer 32 bit operating
systems, it is not efficient to use BIOS any more than necessary.
Here is a model, which shows the operating system with BIOS and drive programs
(usually just called drivers):
As you can see, the driver/BIOS functions are closely associated with the operating
system. So let us look at that on the following page.
Appendix III – File Fragmentation
According to the definition found on Webopedia (http://www.webopedia.com):
Fragmentation refers to the condition of a disk in which files are divided into pieces
scattered around the disk. Fragmentation occurs naturally when you use a disk
frequently, creating, deleting, and modifying files. At some point, the operating system
needs to store parts of a file in noncontiguous clusters. This is entirely invisible to users,
but it can slow down the speed at which data is accessed because the disk drive must
search through different parts of the disk to put together a single file.
When we work with FAT formatted disks, file fragmentation will occur all the time.
One file can be several megabytes, thereby occupying more than one cluster. Maybe it
requires 17 clusters. Ideally, the 17 clusters should be located next to each other. They
can then be read at optimum speed, since that allows minimal movement of the read
head. However, that is not the way it works.
In actual operation, the individual files are broken up in multiple blocks, which are
scattered across the disk. The problem increases with time. The more files you have on
the hard disk, the more fragmentation you will experience. To begin with, vacant
spaces appear between the files:
When you first write to a new hard disk, the file might occupy 17 clusters in sequence.
The same will happen to file number 2, 3, etc., until there are no more vacant clusters
on the disk. Then the file system must re-use clusters. That is done by finding empty
clusters, where the contents have been erased. Thus, the file could be scattered in 17
clusters, none of which are in sequence. Here you see a file split in four disconnected
In the first DOS versions, when a new file had to be written, the file system always
returned to the first vacant cluster to start a new file. That was done, to get optimum
utilization of the disk. It also resulted in immediate and total file fragmentation. Since
DOS version 3.0 the system was changed to fill the disk, before any vacant clusters
were re-used. That delays fragmentation, but sooner or later it will occur anyway.
You can use the program DEFRAG to defragment the files on the disk. If you are a
heavy PC user, it needs to be done often. I usually run SCANDISK first. That checks
the file system for logical errors and repairs them. Scandisk will often find errors, so it
does a good job.
Next defragment the disks with defrag /all. Both programs can be started with the
command Start --> Run. Type in the command on the window: defrag /all
Here you see the defragmentation:
Run defrag weekly - that will keep your hard disks in good shape. Don't
make the intervals too long. That can cause the disk to get messed up,
especially if it is nearly full.
Data Source: http://www.karbosguide.com