Computer Studies Book

Page 1

COMPUTER STUDIES NOTES

1. THE COMPUTER SYSTEM WHAT IS A COMPUTER? A computer is an electronic machine which accepts INPUT (DATA), process that input and OUTPUTS the relevant information. This is done by means of a program – a group of instructions. By definition a computer is an electronic machine under the control of a program

THE BASIS FEATURES OF A COMPUTER • • • •

Processing speed – Computers are faster than us infact they Execute millions of instrustions per second. (Mhs) Storage & Process large volumes of data – Computers can process large Volumes of stored data to give results. Accuracy-Once computers are correctly instructed we expect them to give accurate Consistency – Always and everywhere the same – on every computer

MAIN FUNCTIONS OF A COMPUTER SYSTEM: There are 7 BASIC functions of a computer. These are: INPUT – PROCESS – OUTPUT – STORE – RETRIEVE – SEND - RECEIVE

data

Input

Processing

Output

information

Storage

ADVANTAGES AND DISADVANTAGES OF A COMPUTER SYSTEM: Accurate Advantages

Fast – less time consuming Prices are always going down – becoming cheaper It works with electricity – without electricity you cannot use a

Disadvantages: computer Dependency – what happens if the computer system fails?

MR NOEL ATTARD

PAGE: 1


COMPUTER STUDIES NOTES

DATA VS INFORMATION: A Computer is basically a Processor of Information. Information that has been processed and shaped forms the basis of knowledge it self. It can therefore be seen that a computer is a truly remarkable machine.

Information = Data + Structure That means that after structure has been applied to data it has a meaning, i.e. it has now become information.

DATA 04052000

+

STRUCTURE

=

A DATE

INFORMATION 04/05/2000

WHAT IS PROCESS CONTROL? In some case the computer does not only do INPUT – PROCESS – OUTPUT, but the OUTPUT is taken again by the computer as a new input. This is called PROCESS CONTROL.

[INPUT (DATA)] ===> [PROCESS] ===> [OUTPUT]

PROCESS CONTROL Example: The ABS (Anti Braking System) of a car. -

where the output is taken again as input

If computer system is given the wrong data as input the computer in return will give the wrong information as output. This is called GIGO – Garbage IN Garbage OUT.

A computer is an electronic machine, which works under the control of a stored program, automatically accepting and processing data to produce information.

A program is a complete set of instructions, which instruct the computer to perform a particular task.

So the computer is an information-processing machine. It’s tasks are: handling information; inputting; processing; outputting; storing; retrieving; sending and receiving information.

MR NOEL ATTARD

PAGE: 2


COMPUTER STUDIES NOTES

Hardware Hardware is the physical part of the computer system. The processor, input, output, storage drives and peripherals make up the hardware of the computer. ALL you can touch is computer hardware. Software Computer software, or just software is a general term used to describe the role that computer programs, procedures and documentation play in a computer system. It's the intangible part of the computer system. On the other hand unlike hardware software cannot be touched. Imagine software as being a layer between the hardware and the user. This layer is divided into two main parts the layer nearest to the hardware is called the system software or the operating system, while the layer facing the user is called application software. - System Software – we need only ONE version installed into the computer and it take care of all the hardware and the user needs. It is also called the Operating System. Example: Windows. - Application Software – are all the other programs installed into the computer in order for the computer to do something. Example: Ms Word, Ms Excel, Games …. Peripheral Is a piece of equipment (hardware) which can be connected to the central processing unit. They are used to provide input, output and backing storage for the computer system. Input device Is a peripheral unit that can accept data, presented in the appropriate machine readable form, decode it and transmit it as electrical pulses to the central processing unit. Examples of input devices are keyboard, mouse, scanner etc… Output device Is a peripheral unit that translates signals from the computer into a human-readable form or into a form suitable for re-processing by the computer at a later stage. Example of output device are monitor, printer, speaker etc…

MR NOEL ATTARD

PAGE: 3


COMPUTER STUDIES NOTES

Storage device Is a peripheral unit that allows the user to store data in an electronic form for a longer period of time and when the computer is switched off. The data can only be read by the computer and is not in humanreadable form. Example of storage device are floppy disk, hard disk, CD, etc…

TYPES OF COMPUTERS: The two principal characteristics of a computer are: It responds to a specific set of instructions in a well-defined manner. It can execute a prerecorded list of instructions (a program). Modern computers are electronic and digital. The actual machinery -- wires, transistors, and circuits -- is called hardware; the instructions and data are called software. Computers can be divided into two categories: -

General Purpose Computer: Designed to solve more than one task – like Home Personal Computer. Special Purpose Computers: Designed to solve ONLY a particular task – like Autopilot or washing machine or play station

All general-purpose computers require: •

Input device : Usually a keyboard and mouse, the input device is the conduit through which data and instructions enter a computer.

Output device : A display screen, printer, or other device that lets you see what the computer has accomplished.

Central processing unit (CPU): The heart of the computer, this is the component that actually executes instructions.

Memory : Enables a computer to store, at least temporarily, data and programs.

Storage device : Allows a computer to permanently retain large amounts of data. Common mass storage devices include disk drives and tape drives.

MR NOEL ATTARD

PAGE: 4


COMPUTER STUDIES NOTES

COMPUTERS CAN BE CLASSIFIED AS FOLLOWS: -

PDA - A personal digital assistant (PDA) is a mobile device, also known as a palmtop computer. Newer PDA’s commonly have color screens and audio capabilities, enabling them to be used as mobile phones (smart phones), web browsers, or portable media players.

-

Personal computer : A small, single-user computer based on a microprocessor. In addition to the microprocessor, a personal computer has a keyboard for entering data, a monitor for displaying information, and a storage device for saving data.

-

Workstation : A powerful, single-user computer. A workstation is like a personal computer, but it has a more powerful microprocessor and a higher-quality monitor.

-

Minicomputer : A multi-user computer capable of supporting from 10 to hundreds of users simultaneously.

-

Mainframe : A powerful multi-user computer capable of supporting many hundreds or thousands of users simultaneously.

-

Supercomputer : An extremely fast computer that can perform hundreds of millions of instructions per second.

HOW DOES DATA MOVE INSIDE THE COMPUTER? The DATA BUS is a set of parallel copper strips acting as wires along which data travels between the CPU, memory and peripherals. In fact all that requires data transfer is connected to the data bus. The width of the data bus determines the word length, that is, the maximum number of bits a computer can pass at once along the bus. It can be of 8 bits, 16bits, 32 bits…..

The address bus is similar to the data bus – a set of parallel copper strips. But the ADDRESS BUS carries along the location (CPU, peripheral or memory) where the data will be read from or written to.

MR NOEL ATTARD

PAGE: 5


COMPUTER STUDIES NOTES

2. ANALOGUE AND DIGITAL ANALOGUE - Continuous Data: Sometimes we are unable to count exactly. For example if water is coming out of a tap in a continuous stream we would be unable to count the number of drops per minute. Such data is called continuous/analogue data and must be obtained by measurement. Examples of continuous data: ♦ Some watches have an analogue display, where hands move continuously round a dial. The time is represented by the positions of the hands on the dial. ♦ A dimmer switch - this can (theoretically) assume any position between the on and off states ♦ An electric motor - this can rotate at any number (including fractional) of revolutions per unit time depending on the current supplied. An analogue device is one in which data is represented by some quantity which is continuously changing. The value of a data item at a given time is represented by the size of the quantity on a fixed scale. In analogue data any value can be represented because the quantity can take any value in the range used

DIGITAL - Discrete Data : Consider a dropping water tap. Since small drops are falling one at a time we can count the number of drops falling per minute. Data obtained by a set of pulses that can be counted is called discrete data. Discrete data can take one of a fixed number of states. Examples of discrete data: ♦ The display of an electronic calculator is digital with the numbers in decimal. Each digit can have any of ten separate states (0, 1, 2, 3, 4, 5, 6, 7, 8, or 9). Therefore the calculator can only display 10 varieties when it comes to characters. ♦ A switch can be either on or off (1 or 0) - this is a digital device – Also called BI STABLE ( 2 conditions) A device that can be set to a number of different separate values or states is called a digital device. In practice the quantity used is often 2 states (binary) and data is represented as a succession of 1s and 0s. Data is therefore held as a code.

MR NOEL ATTARD

PAGE: 6


COMPUTER STUDIES NOTES

GRAPHICAL REPRESENTATION ANALOGUE DATA

OF

DIGITAL

AND

A digital signal has 2 different

An analogue signal showing continuous variation

values: either maximum or minimum.

in the value, hence the graph has an infinite

There are no in between values.

number of possible values.

Digital signal

Analogue signal

DATA REPRESENTATION Data can be represented using either analogue or digital devices. Consider a stop watch which is used to find the time of fall of an object in a Physics experiment. Consider an analogue stopwatch which can show a time anywhere between 0 and 5 minutes. It would be difficult on such a watch to distinguish 0.05 seconds from 0.06 seconds. On the other hand we may prefer to use a discrete device (eg. A digital stop watch) which can be set to 0s all the way up to 9 seconds. Take a voltmeter (a device that measures voltage) that may be set to0V all the way up to 9V in steps of 1V. We can use such a device to represent the digits 0 to 9 by setting the device to 0V to represent the digit 0, 1V to represent the digit 1... Minor imprecision will not affect the system since a reading of 3.2V will still be interpreted as representing the digit 3. The system is more accurate.

Analog variation of voltage

1.5

Discrete Representation 1

0.5

-1

MR NOEL ATTARD

64

55

0.6 0.4 0.2

PAGE: 7

29

25

Time

21

17

13

9

Time

5

0 1

-1.5

46

37

28

19

-0.5

10

0

Voltage

0.8

1

Voltage

1


COMPUTER STUDIES NOTES

BI-STABLE DEVICE: Much easier to produce are bi-stable devices - electronic devices which can be in one of two states. We usually think of these two states as being the ON and the OFF states, so the device can be considered to be an electronic switch. However, these two states can represent anything which can take on one of two possible values, such as in voltage 0V and 5 V or the binary digits (bits) 0 and I. Computers represent and store data in binary form using sets of bits to represent any value.

CONVERTING FROM ANALOGUE TO DIGITAL DATA The output from a microphone is analogue since sound can take various frequencies. Such data has to be digitized before it can be stored or processed by a computer. An analogue-to-digital converter is an interface to convert an analogue signal to a digital one. Digital signals Processor

Analogue signal Controlled device

A-D converter

CONVERTING FROM DIGITAL TO ANALOGUE DATA The digital data for a computer display has to be converted into analog signals it if is to be used as input to a television. A digital-to-analogue (D-A) converter is an interface to convert a digital signal to an analogue one. It converts a set of binary signals to one single varying voltage. Digital control signals Processor

MR NOEL ATTARD

Analogue signal D-A converter

Controlled device

PAGE: 8


COMPUTER STUDIES NOTES

USES OF DIGITAL TO ANALOGUE AND ANALOGUE TO DIGITALCONVERTERS D-A and A-D converters are used for computer communication over telephone lines since most computers work on a digital basis while the telephone line system works on analogue (MODulator / DEModulator) - a device which converts digital signals to analogue and vice-versa. A MODEM is a device which plugs into the computer (or can be external i.e. bought at later stage and hooked up without having to dismantle you PC) and requires a telephone line. This means that while the computer is making use of the modem the telephone line cannot be used for verbal phone calls at the same time. Modems are increasingly becoming popular, cheaper and better. Most computers now house an internal modem - another card installed inside the computer. Modems are regarded as input and output devices at the same time, because they allow communication to and from our computer. Modems differ also in speeds. This is the amount of data transfer that a modem can handle at one time. Typical modem speeds nowadays are 33.6Kbps and 56Kbps (thousand bits per second).

modem

modem

modem

modem

Digital signal

MR NOEL ATTARD

Analog signal

Digital signal

PAGE: 9


COMPUTER STUDIES NOTES

3. INPUT & OUTPUT DEVICES INPUT DEVICES Keyboard - is the typical input device used with all-general purpose computers. Mouse - is a computer input device usually connected with the computer by a thin cable. Using a hand to move the mouse in contact with a flat surface causes a curser or a pointer on the display screen to move. Trackball - is an input device which is used to the same things as a mouse. It is a ball, set into a cup which can be made to roll in any direction by using a finger or a palm of your hand, depending in the size of the ball. Track point - is an input device that is used with your hand. Touch pad - is one of a number of names for touch or pressure operated sensor pads or switches used as input devices for some applications. Light pen - is an input device, which looks like a pen with a wire connecting to the computer. The light pen is used to point at and thus indicate a position on the screen. Touch screen - is a special screen that is able to detect the position on the screen which a user’s finger is touching or pointing at. Graphical tablet - is a device used to input line drawings into a computer. The user draw with a stylus on a flat pad or tablet, either copying a drawing or working free hand. Image scanner - many graphics images begin life as drawings on paper and must be converted into a from that a computer graphics package can use. A digitizer scans a drawing and turns it into a bit map: this captures the image. Digital camera - is a still camera which produces a digital image file of the scene photographed. This colour image can be printed directly or can be downloaded to a computer, by connection the camera or the memory card into the computer.

MR NOEL ATTARD

PAGE: 10


COMPUTER STUDIES NOTES

Bar code reader - is an input device used to read information in bar code form. Sometimes the reader is built into equipment such as a supermarket checkout terminal. OMR - optical marker reader is and input device that reads marks made in predetermined position on special forms by a light sensing method: for example the numbers recorded on a National :Lottery entry form. OCR - optical character recognition is machine recognition of printed characters by light sensing methods. So a typed paper when scanned with OCR will come as an editable typed page and not as an image. MICR - magnetic ink character recognition, is a scanner which scans characters printed with magnetic ink. It is usually used in banks to read numbers form cheque book. Handwriting recognition- some computers can read your writings and turn it into print the user writes in her normal handwriting on a pressure sensitive tablet connected to a computer system. Pen Computing - with this you can choose with a biro instead of your mouse or your finger on a screen to select thing. Hard\Soft copy - hard copy is when you print, and soft copy is when you save your work. Vector and Raster device - A raster image processor (RIP) is a component used in a printing system which produces a raster image also known as a bitmap. Image (CRT\LCD\TFT) - CRT - Cathode Ray Tube, LCD - Liquid Crystal Display, TFT – Thin Film Transistor (LCD technology) I\O buffering memory - is an area in a computer memory allocated to transferring data between the computer and a peripheral. Disk cache - is the part of the main store between the central processor and the rest of the main store. It has extremely fast access. Serial\Parallel data - serial sends the bits one after another along the same data line. Parallel sends the bits for a character simultaneously along separated data lines.

MR NOEL ATTARD

PAGE: 11


COMPUTER STUDIES NOTES

OUTPUT DEVICES Resolution means the number of dots present on the screen. The more dots or pixels the better or sharper the image. That is why we can change the resolution on a monitor. (pity that this cannot be done during the practical lesson because of network restrictions). We refer to horizontal and vertical resolution and that is why we talk of 640x480, 800x600 or 1024x768 when we refer to resolution. When the dots fill the screen they have to start again from top to fill it up again with pixels. This is called Refresh – the more frequent the refresh the better – Refresh Rate.

• •

• • •

Pixel means the smallest area on the screen – a tiny dot. Mono chrome monitor means one colour screen. VGA monitor means 256 colours monitor (8bit) Super VGA Monitor means 16.7 million colours hues Dot Pitch means the space between pixels – the smaller the space the sharper the picture.

MONITORS The monitors use Additive colour or RGB which stands for RED, GREEN and BLUE. These three colours when mixed should give us WHITE but that was not the result of mixing crayons etc. WHY? Because colours on paper use a different model – CMYK (Subtractive). The colour on the paper actually absorbs light and what we actually see is the remaining light that is not absorbed. Then different inks or wax colours act as a sponge for the colours in the rainbow. So the colours of the rainbow that remain are the colours we see.

MR NOEL ATTARD

PAGE: 12


COMPUTER STUDIES NOTES

The monitor is not the same thing – for an example, imagine the theatre or the school hall – there are those coloured spotlights. It is coloured light and not absorbed light!! There are only three disks of colour and they are actually red, green and blue BUT they produce other colours by mixing.

PRINTERS Impact Type printers : They are the cheapest to buy and most cost effective. They use a ribbon (refer to ribbon cartridge image on hand-out) and pins that hammer on the ribbon to produce dots – thus the name. The cheapest but least good printers have nine pins and the best have 24 pins. The more pins the closer the dots are and therefore the better the print quality. They print the dots on a matrix – grid pattern – thus the name dot-matrix. Such printers are capable of double passing to overcome the otherwise poor quality of the print. This method of double passing produces what is called NLQ printing or Near Letter Quality printing. This is better quality than with single pass but obviously takes double the time too! Dot-Matrix printers are usually only Black & White but some are equipped of coloured ribbon too – but the quality of colour printing with such printers is always poor. Because anything can be formed out of dots such printers can produce both graphics and text. They are very cheap to buy – the price varies according to the number of pins and if it can print in colour. They are very easy to maintain and very cost-effective – one needs only to buy a new ribbon cartridge to replace ink – and that costs only around Lm3 or less. Because the pins touch the paper one can easily print a carbon copy along with the original. They are the only kind of printers that can be used on wax duplicating paper (for Gestetner machines in schools etc).

DISADVANTAGES OF IMPACT PRINTERS: • • •

The print quality is poor especially with the 9pin printers. The sound of the pins hitting the ribbon and paper is very loud. The printing speed is very slow – around 300 characters per second.

Ink-jet Printers: Ink-jet is quite similar to a dot-matrix printer in the way that it too uses a matrix to form characters or graphics. There were times when MR NOEL ATTARD

PAGE: 13


COMPUTER STUDIES NOTES

ink-jets were very unpopular because the ink nozzles (produce real ink cartridge to demonstrate) used to become clogged very fast. This was solved by making the print-heads disposable (throw-away) part and parcel with the print cartridge. So after around 500 copies one would need to change the cartridge – which makes printing with such devices quite expensive. Moreover as time passed bye the cartridges became even more expensive while the printers became cheaper – to the extent that it is more worth buying a new inkjet printer with cartridges incorporated than to buy new cartridges!! This is surely the case with HP – the most renowned or inkjet printers – where a colour and black cartridge here in Malta would cost around Lm50 while a new printer with cartridges would cost Lm55! Cannot have come up with a better solution – separate tanks for the CM and Y colours – thus one would not have to buy a new full colour cartridge when just one of these three colours is finished but one can just buy one colour tank for just around Lm6. The HP strategy seems to be one that would make the customer spend more on perishables like cartridges and less on the printer – something one buys once if not damaged. Most inkjet printers support 360 dpi (dots per inch) on standard paper and 720 dpi on special paper (which is very expensive). Even if the printer manual claims that the printer can print at 720dpi you will never see such a resolution on normal paper because the paper would absorb the ink as it dries and would produce larger dots instead!

LINE PRINTERS: These printers print a line at a time; hence they are faster then the character printers ex: Ink jet printers. The 2 line printers are: Barrel printers and chain printers, these are very fast printers and generally used with mainframes. Except that they are very fast their ink is cheap too though, line printers are noisy, they need maintenance and are not able of producing graphics. •

Chain: All alphanumeric characters are imprinted on a chain, then as the chain moves a hammer strikes the character to print against the paper. It works like the daisy-wheel. It is also called as line printer.

MR NOEL ATTARD

PAGE: 14


COMPUTER STUDIES NOTES

Barrel: All alphanumeric characters are imprinted on different concentric disk which rotate on a shaft and a hammer then strikes the character to be printed against the paper. Used in cheques printing

PAGE PRINTERS: Page printers are even faster then line printers and print a page at a time. There are 2 page printers: Laser printers and plotters. Laser printers print very similar to a dot matrix only the output is of a much better quality. •

Laser: Uses the same technology as copy machines. Laser printers produce very high quality text and graphics and very fast. Used for desktop publishing – DTP. There are 2 categories of laser printers: • Personal Laser Printers - which are cheap and mainly used to produce black and white documents. These printers print 4-6 pages a minute. • Shared laser printers - These are more expensive and as the above printer they are mainly used to produce black and white documents even though, unlike the Personal Laser Printers, they are capable of producing colour outputs. These printers print approximately 30 pages per minute! • Plotters: These printers print very large outputs and they are generally used for producing bar charts, maps and architectural drawings. The difference between plotters and other printers is that they draw lines using a pen and x and y co-ordinates sent from the computer. As a result they can produce continues lines, whereas printers can only simulate lines by printing a closely spaced series of dots. There are 2 types of plotters: • Flatbed Plotters - in the flatbed plotter the paper is stationary and the arm draws the lines by moving itself • Drum Plotters - in the drum plotter the paper is not fixed but it moves vertically up and down hence the pen moves only horizontally.

MR NOEL ATTARD

PAGE: 15


COMPUTER STUDIES NOTES

OTHER TYPES OF PRINTERS: Daisy-wheel: Similar to a ball-head typewriter, this type of printer has a plastic or metal wheel on which the shape of each character stands out in relief. A hammer presses the wheel against a ribbon, which in turn makes an ink stain in the shape of the character on the paper. Daisy-wheel printers produce letter-quality print but cannot print graphics.

Dot-matrix: Creates characters by striking pins against an ink ribbon. Each pin makes a dot, and combinations of dots form characters and illustrations.

LCD & LED : Similar to a laser printer, but uses liquid crystals or light-emitting diodes rather than a laser to produce an image on the drum.

Thermal printer: An inexpensive printer that works by pushing heated pins against heat-sensitive paper. Thermal printers are widely used in calculators and fax machines.

PRINTER CHARACTERISTICS •

Quality of type: The output produced by printers is said to be either letter quality (as good as a typewriter), near letter quality, or draft quality. Only daisy-wheel, ink-jet, and laser printers produce letter-quality type. Some dot-matrix printers claim letter-quality print, but if you look closely, you can see the difference.

•

Speed: Measured in characters per second (cps) or pages per minute (ppm), the speed of printers varies widely. Daisy-wheel printers tend to be the slowest, printing about 30 cps. Line

MR NOEL ATTARD

PAGE: 16


COMPUTER STUDIES NOTES

printers are fastest (up to 3,000 lines per minute). Dot-matrix printers can print up to 500 cps, and laser printers range from about 4 to 20 text pages per minute. •

Impact or non-impact: Impact printers include all printers that work by striking an ink ribbon. Daisy-wheel, dot-matrix, and line printers are impact printers. Non-impact printers include laser printers and ink-jet printers. The important difference between impact and non-impact printers is that impact printers are much noisier.

Graphics: Some printers (daisy-wheel and line printers) can print only text. Other printers can print both text and graphics.

Fonts : Some printers, notably dot-matrix printers, are limited to one or a few fonts. In contrast, laser and ink-jet printers are capable of printing an almost unlimited variety of fonts. Daisywheel printers can also print different fonts, but you need to change the daisy wheel, making it difficult to mix fonts in the same document.

PRINTER TERMS: • • • • • • •

On- Line printer – It is when the printer is ready to print and is under control of the CPU. Off-line printer – It is when the printer is NOT ready to print and is NOT under control of the CPU. CPS – Characters Per Second PPM – Pages Per Minute NLQ – Near Letter Quality DPI – Dots per inch – resolution of the print Draft Mode – Lowest printable resolution

RASTER VS VECTOR IMAGING A RASTER IMAGE: In computer graphics, a raster graphics image or bitmap is a data structure representing a generally rectangular grid of pixels, or points of color, viewable via a monitor, paper, or other display medium. Raster images are stored in image files with varying formats. A bitmap corresponds bit-for-bit with an image displayed on a screen, generally MR NOEL ATTARD

PAGE: 17


COMPUTER STUDIES NOTES

in the same format used for storage in the display's video memory, or maybe as a deviceindependent bitmap. A bitmap is technically characterized by the width and height of the image in pixels and by the number of bits per pixel (a color depth, which determines the number of colors it can represent). So in a raster based system displays, locates, and stores graphical data by using a matrix or grid of cells. A unique reference coordinate represents each pixel either at a corner or the centre.

A VECTOR IMAGE: Vector graphics is the use of geometrical primitives such as points, lines, curves, and shapes or polygon(s), which are all based on mathematical equations, to represent images in computer graphics. Cartesian coordinates (i.e., x and y) and computational algorithms of the coordinates define points in a vector system. Lines or arcs are a series of ordered points. Areas or polygons are also stored as ordered lists of points, but by making the beginning and end points the same node the shape is closed and defined. Vector systems are capable of very high resolution and graphical output is similar to hand-drawn maps. Vector data requires less computer storage space and maintaining topological relationships is easier in this system. There are times when both formats (Vector and Raster) come together. An understanding of the advantages and limitations of each technology and the relationship between them is most likely to result in efficient and effective use of tools

MR NOEL ATTARD

PAGE: 18


COMPUTER STUDIES NOTES

4. THE CPU The CPU is short for Central Processing Unit; this is the part of the computer where work gets done. In most computers, there is one processing chip. The CPU is the brains of the computer. Sometimes referred to simply as the processor or central processor, the CPU is where most calculations take place. In terms of computing power, the CPU is the most important element of a computer system. The term processor has generally replaced the term central processing unit (CPU). The processor in a personal computer or that is embedded in small devices is often called a microprocessor. The CPU is that little device located on your motherboard that seems to be the heart of the system. Your CPU has several jobs but only one primary objective, that is take simple tasks and do them FAST! INPUT

When data is passed to the computer in a form that the computer can

DEVICE

use.

OUTPUT

When the user is provided with the information produced by the

DEVICE

computer system. Consists of two types: •

RANDOM ACCESS MEMORY (RAM) - VOLITILE

READ ONLY MEMORY (ROM) – NON VOLITILE

MEMORY

Memory is physically outside the CPU and is placed at different areas

UNIT

on the motherboard. Input data and any results of any calculations are stored within RAM. Bootstrap loader is stored in ROM.

CPU

The CPU is made up of two main parts:

Central

ARITHMETIC LOGIC UNIT (ALU) - performs Maths and Logic

Processing

CONTROL UNIT (CU) - manages all movement to and from all

Unit

peripherals to the CPU. Refers to the computers ability to maintain data or information for use at a later time. A computer has two main means of storage: Main

STORAGE

Memory (Primary Memory or Working Memory) and Secondary Storage (or Backing Storage) – like the hard disk.

MR NOEL ATTARD

PAGE: 19


COMPUTER STUDIES NOTES

CPU Control Unit Arithmetic Logic Unit

Input

data / information control lines

Memory

Output

Backing Storage

CLOCK SPEED: Processors are measured in Mhz (Megahertz) which is an expression of millions, or GHz (Gigahertz) that is thousand millions. A 400 MHz can do 400 million operations a second. A 1.5GHz processor can do 1500 million operations a second. On personal computers and small workstations, the CPU is housed in a single chip called a microprocessor. Three typical components of a CPU are:

ARITHMETIC AND LOGIC UNIT – ALU: This is the part that executes the computer's commands. A command must be either a basic arithmetic operation: + - */ or one of the logical comparisons: > < = not =. Everything else has to be broken down into these few operations. Only one operation is done in each Machine Cycle. The ALU can only do one thing at a time but can work very, very fast. The ALU has two main registers; the accumulator and the shift register. • The accumulator is used for storing the current result of a calculation. • The shift register is capable of shifting its contents one or more positions to the right or to the left, in order to carry out arithmetic operations. This shifting will result in a division by two when shifting to the left.

CONTROL UNIT - CU: it is a typical component of the CPU that implements the microprocessor instruction set. It extracts instructions from memory and decodes and executes them, and

MR NOEL ATTARD

PAGE: 20


COMPUTER STUDIES NOTES

sends the necessary signals to the ALU to perform the operation needed. Control Units are either hardwired (instruction register is hardwired to rest of the microprocessor) or micro-programmed. Two registers which are found in the CU are the Instruction Register and the Program Counter. • The Instruction Register stores a copy of the current instruction being processed. • The Program Counter stores the Address of the next instruction, in the program, to be executed The MAIN MEMORY is divided into two parts; the RAM, short for Random Access Memory and ROM short for Read Only Memory. •

The Random Access Memory is used for the temporary storage of data and programs. The time taken to fetch data is called the Access time. RAM is volatile, this means that everything stored in the RAM is lost when the computer is switched off. It is mainly for this reason that backing stores are an essential part of a computer system. The Read Only Memory is part of the central memory and is used to store data of a permanent nature. The information is normally put on a storage chip at the manufacturing stage. The contents of ROM cannot be changed. ROM is used primarily for storing the Bootstrap Loader.

Memory Unit

ALU ACCUMULATOR SHIFT REGISTER

RAM

CU PROGRAM COUNTER

ROM INSTRUCTION REGISTER

BACKING STORE MR NOEL ATTARD

PAGE: 21


COMPUTER STUDIES NOTES

5. BITS & BYTES Modern computers are digital that is; all info is stored as a string of zeros or ones - off or on. All the thinking in the computer is done by manipulating these digits. The concept is simple, but working it all out gets complicated.

REPRESENTING DATA USING 1 BIT: A digital signal can be in 1 of 2 possible states. Such a signal is called a BIT (Binary digit). Thus, a bit can represent ONE of TWO POSSIBLE VALUES. Using just one bit, we can represent any data that can only have 2 possible values, (e.g. 1 and 0, True and False, ON and OFF, Male and Female.) All the possible states of a bulb can be represented by the digits 1 and 0

1

0

Bulb on: can be represented as 1

Bulb off: can be represented as 0

Definition: Binary digit (or bit) ~ a 1 or a 0 used to represent data. The term is also used for the smallest unit of storage, which just stores a 1

USING 2 OR MORE BITS: Suppose out data are the seasons. Clearly one bit is not enough, because a single bit can represent only 2 things, but there are 4 seasons. So we must use more than one bit. We can use groups of bits to represent positive whole numbers starting from zero (0). • With 1 bit we can only represent 2 numbers - 0,1 • With 2 bits we can represent 4 numbers - 0,1,2,3 • With 3 bits we can represent 8 numbers - 0,1,2,3,4,5,6,7

MR NOEL ATTARD

PAGE: 22


COMPUTER STUDIES NOTES

So 1 byte can be one of 256 possible combinations of 0 and 1. Numbers written with just 0 and 1 are called binary numbers. Each 1 is a power of 2 so that the digits in the figure represent the number: = 2 7 + 0 + 2 5 + 0 + 2 3 + 2 2 + 0 +0 = 128 +0 +32 + 0 + 8 + 4 + 0 + 0 = 172

Every command and every input is converted into digital data, a string of 0's and 1's

BITS & BYTES TABLE: 1 bit = one on or off position 1 byte = 8 bits 1024 Byte = 1 Kilo Byte 1024 KB = 1 Mega Byte 1024 Mb = 1 Giga byte 1024 Gb = 1 Terra byte

REPRESENTING CHARACTERS IN DIGITAL FORM: A character is one of a set of symbols which can be represented in a computer such as a number, letter, space or punctuation mark. Two other types of character are • •

Graphics characters - shapes can be used to build up pictures and graphs Control characters - characters which send signals to control operating functions rather than data, e.g. instructing a printer to start on a new page.

Character codes are the binary patterns used to represent the character set. Some codes are specific to the manufacturer but there are a number of standard codes which help the exchange of data between systems. So All letters, numbers, and symbols are assigned

MR NOEL ATTARD

PAGE: 23


COMPUTER STUDIES NOTES

code values of 1's and 0's. A number of different digital coding schemes are used by digital devices. Three common code sets are: ASCII EBCDIC Unicode

(used in UNIX and DOS/Windows-based computers) (for IBM System 390 main frames) (for Windows NT and recent browsers)

The ASCII code set uses 7 bits per character, allowing 128 different characters. This is enough for the alphabet in upper case and lower case, the symbols on a regular English typewriter, and some combinations reserved for internal use. An extended ASCII code set uses 8 bits per character, which adds another 128 possible characters. This larger code set allows for foreign languages symbols and several graphical symbols. ASCII has been superseded by other coding schemes in modern computing. It is still used for transferring plain text data between different programs or computers that use different coding schemes. ASCII – AMERICAN STANDARD CODE OF INFORMATION INTERCHANGE Example: ASCII Code for C is 67 or 1000011

UNICODE uses 16 bits per character, so it takes twice the storage space that ASCII coding, for example, would take for the same characters. But Unicode can handle many more characters. The goal of Unicode is to represent every element used in every script for writing every language on the planet. In fact in version 3 of Unicode has 49,194 characters instead of the few hundred for ASCII and EBCDIC. MR NOEL ATTARD

PAGE: 24


COMPUTER STUDIES NOTES

All of the current major languages in the world can be written with Unicode, including their special punctuation and symbols for math and geometry.

PARITY BIT With all these 0's and 1's, it would be easy for the computer to make a mistake! Parity is a clever way to check for errors that might occur during processing. In an even parity system an extra bit (making a total of 9 bits) is assigned to be on or off so as to make the number of on bits even. So in our example above 10101100 there are 4 on bits (the four 1's). So the 9th bit, the parity bit, will be 0 since we already have an even number of on bits. In an odd parity system the number of on bits would have to be odd. For our example number 10101100, there are 4 on bits (the 1's), so the parity bit is set to on, that is 1, to make a total of 5 on bits, an odd number. If the number of on bits is wrong, an error has occurred. You won't know which digit or digits are wrong, but the computer will at least know that a mistake occurred. Memory chips that store your data can be parity chips or non-parity chips. Mixing them together can cause odd failures that are hard to track down.

MR NOEL ATTARD

PAGE: 25


COMPUTER STUDIES NOTES

6. THE NUMBERING SYSTEM Human beings have generally settled on ten as the number to count with. No doubt it has something to do with the number of counting tools available (fingers, which is!). There is nothing magic about ten, however, that makes it the best choice (except for those who count with those handy, dandy fingers). Some cultures have indeed used other numbers to count with. Babylon apparently used sixty, a hexadecimal numbering system, which has some calculating advantages since it divides evenly by two, three, four, five, six, ten, twelve, fifteen, twenty, and thirty. The simplest way of writing numbers is to make one mark for each thing counted. Note that our usual way of marking four vertical strokes and then a crossing stroke forms groups of five. Five fingers on one hand. Any connection, do you think?? Once the number of cattle you own exceeds the number of fingers you have, it becomes clear that you need a short way of writing large numbers. Our modern system uses the position of a number symbol to indicate its real value. So our cattle ranchers don't have to scratch out several feet of little marks to write down the number of cows they have.

DECIMAL - BASE 10 NUMBERING SYSTEM: The decimal numeral system (also called base ten or occasionally denary) has ten as its base. It is the numerical base most widely used by modern civilizations. Decimal system is a way of writing numbers. Any number, from huge quantities to tiny Base 10 fractions, can be written in the decimal system using only the ten basic symbols thousand 10 x 10 x 103 1, 2, 3, 4, 5, 6, 7, 8, 9, and 0. The value = 10= of any of these symbols dep ends on the a hundred 10 x 10= 102 place it occupies in the number. The = symbol 2, for example, has totally ten = 10= 101 different values in the numbers 832 and 238, because the 2 is in different places in one = 1= 100 each of the numbers. Because the value of

MR NOEL ATTARD

PAGE: 26


COMPUTER STUDIES NOTES

a symbol depends on where it is placed wit hin a number, the decimal system is known as a place-value system. The word decimal comes from decem, the Latin word for ten. The decimal system received its name because it is a base-ten system. The value of each place is ten times greater than the va lue of the place just to its right. Thus, the symbols on the left of a number have larger values than symbols farther to the right. For example, the symbol 2 in 238 is worth much more than the symbol 2 in 832, because the 2 in 238 is farther to the left than is the 2 in 832. Each digit is multiplied by a power of 10 to get the complete number. We can use this same kind of notation with any base. We just need to know what the base is and what the symbols are for the numbers smaller than the base.

BINARY - BASE 2 NUMBERING SYSTEM: We can use this same kind of notation with any base. We just need to know what the base is and what the symbols are for the numbers smaller than the base. Computers don't have ten fingers to count with. All they have is on and off. Everything inside a computer must be represented with some combination of on and off. We humans use the digits 1 for on and 0 for off. We call this base 2 since there are only 2 symbols used.

100101101 in Base 2

= in base 10

8

1 x 2 = 1 x 256 256 0 x 27 = 0 x 128 0 0 x 26 = 0 x 64

0

5

32

4

0

3

8

2

4

1 x 2 = 1 x 32 0 x 2 = 0 x 16 1x2 = 1x8 1x2 = 1x4

Everywhere, except for computer- 0 x 2 = 0 x 2 0 0 related operations, the main system of 1 x 2 = 1 x 1 1 mathematical notation today is the Total = 301 decimal system, which is a base-10 in base 10 system. As in other number systems, the position of a symbol in a base-10 number denotes the value of that symbol in terms of exponential values of the base. That is, in the decimal system, the quantity represented by any of the ten symbols used - 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 - depends on its position in the number. 1

Unlike the decimal system, only two digits - 0, 1 - suffice to represent a number in the binary system. The binary system plays a crucial role

MR NOEL ATTARD

PAGE: 27


COMPUTER STUDIES NOTES

in computer science and technology. The first 20 numbers in the binary notation are 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111, 10000, 10001, 10010, 10011, 10100, the origin of which may be better understood if they are re-written in the following way: 1: 2: 3: 4: 5: 6: 7: 8: 9: 10:

00001 00010 00011 00100 00101 00110 00111 01000 01001 01010

11: 12: 13: 14: 15: 16: 17: 18: 19: 20:

01011 01100 01101 01110 01111 10000 10001 10010 10011 10100

A sequence of on off on off on off on is written for the benefit of humans as 100101101. This is only a little bit better but it takes less energy to write down. Such base 2 numbers are called binary numbers. Now the number 100101101 in base 2 uses the same symbols as 100,101,101 in base ten. But the base 10 number is equal to one hundred million one hundred and one thousand one hundred and one. This is a much larger number than the base 2 number. The 1s and 0s must be multiplied by powers of 2 to see how many cows this number represents.

HEXADECIMAL - BASE 16 NUMBERING SYSTEM: Because people have a really hard time keeping straight numbers like those above, computer numbers are often written in yet another base - base 16. Such numbers are called hexadecimal. Hexadecimal numbers look really odd because they have more symbols than we are used to. Letters are used for the numbers from ten through fifteen: Numbers: 0, 1 ,2, 3, 4, 5, 6, 7, 8, 9 Letters:

A = 10; B = 11; C = 12; D = 13; E = 14; F = 15.

To interpret such numbers as base 10 numbers, (for those of us who just can't quit counting on our fingers!) you need to know the powers of 16. MR NOEL ATTARD

PAGE: 28


COMPUTER STUDIES NOTES 163 162 161 160

= = = =

4096 256 16 1

So the number F29 in base 16 is equal to: (F x 162)+ (2 x 161) + (9 x 160) = 15 x 256 = 3840 2 x 16 = 32 9x1 = 9 3881 in base 10

This is certainly not all that easy to do. Few people can multiply 15 by powers of 16 easily. But the really advantage for base 16 is in how easy it is to change from base 2 to base 16 and back. Every hexadecimal digit is broken down into a 4 digit binary number. These digits are just written down in the same order as the hexadecimal number and you've got the equivalent binary (base 2) number. For our number F29: F is equal to 15 which is 8 + 4 + 2 + 1. (These are the powers of 2). That means that F = (1 x 23) + (1 x 22) + (1 x 21) + (1 x 20). So F16 = 11112 Since 216 is (1 x 21), then 216 = 00102 Since 916 is (1 x 23) + (1 x 20), then 916 = 10012 Putting this together makes F2916 = 1111001010012.

MR NOEL ATTARD

PAGE: 29


COMPUTER STUDIES NOTES

7. COMPUTER BUSES WHAT IS A BUS? The bus width is the amount of data the CPU can transmit at a time to main memory and to input and output devices. An 8-bit bus moves 8 bits of data at a time. Bus width can be 8, 16, 32, 64, or 128 so far. Think of it as "How many passengers (bits) can fit on the bus at once to go from one part of the computer to another." There are two buses: an address bus and the data bus. The data bus transfers actual data whereas the address bus transfers information about where the data should go. There is also the Control bus – which controls data transfer. The size of a bus, known as its width, is important because it determines how much data can be transmitted at one time. For example, a 16-bit bus can transmit 16 bits of data, whereas a 32-bit bus can transmit 32 bits of data.

THE ADDRESS BUS:

The address bus is a collection of wires connecting the CPU with the main memory that is used to identify particular locations (addresses) in main memory. The width of the address bus (that is, the number of wires) determines how many unique memory locations can be addressed. Modern PCs and Macintoshes have as many as 36 address lines, which enables them theoretically to access 64 GB (gigabytes) of main memory. However, the actually amount of memory that can be accessed is usually much less than this theoretical limit due to chipset and motherboard limitations. So the larger the address bus the more MEMORY location can be accessed

THE DATA BUS:

The data bus is a set of parallel copper strips acting as wires along which data travels between the CPU, central memory and peripherals. In fact all that requires data transfer is connected to the data bus. The width of the data bus depends also on the type of CPU and determines the word length, that is, the maximum number of bits a computer can pass at once along the bus. The larger the data bus, the faster the computer will perform.

THE CONTROL BUS: It is a bus with 1 wire – True or False, to check is data passed ok.

MR NOEL ATTARD

PAGE: 30


COMPUTER STUDIES NOTES

8. DATABASES WHAT IS A DATABASE? A simple definition of a database is: A structured collection of related data about one or more subjects. In normal daily life we make frequent use of databases, and probably don’t realise it. Here are a number of simple examples: The telephone directory, bus or train timetable, personal address book and filing cabinet

WHAT IS A RELATIONAL DATABASE? A simple relational database, such as Microsoft Access, is a database which is based on tables. Each column within a table defines the fields, while each row defines the records. Different related data can be held in separate tables.

WHAT IS A TABLE? A table holds data about a particular item, such as products or suppliers.

WHAT IS A RECORD? A record is a collection of information which relates to a particular item within your database table. For instance a record in an address book may consist of the first and second name of a person, plus their phone number and address details. Each item within a record is called a field.

WHAT IS A FIELD? Fields are the individual items which make up a record within your database. In the example of an address book database, first and second names of your contacts would both be field names, as would the telephone number.

WHAT IS MEANT BY 'FIELD DATA TYPES'? A field must have a specific data type format. We will see more about this later, but for now the illustration shows you the data types which are available within Microsoft Access, including Text, Number, and Currency.

MR NOEL ATTARD

PAGE: 31


COMPUTER STUDIES NOTES

WHAT IS MEANT BY 'FIELD PROPERTIES'? Each field has a range of field properties associated with it. instance the Field Size (set to 50 in the example shown), means that the field will hold a maximum of 50 characters. Other properties include items such as data validation, which means that the sort of information which is being entered into a field makes sense!

For

WHAT IS A PRIMARY KEY? Primary keys uniquely identify each record in your table and provide the following advantages: • An index is automatically created for the primary key. This speeds up data retrieval and sorting. Also, the primary key is often used in establishing relationships. • Records in a form or Datasheet are displayed in primary key order. • Duplicate records are not allowed. Therefore all records are unique • A primary key can be made up of one or more fields.

WHAT IS AN INDEX? An index allows Microsoft Access to work faster when finding and sorting records. They work in a similar way to the way you would use an index in a traditional book, i.e. Access uses the index to find the location of the required data. Indexes can be created using a single field, or using multiple fields.

RELATED TABLE When using Access you normally set up a number of tables, such as Customers, Products, Orders, and Employees etc. The next stage is to define relationships between these tables so that the information within each table can be linked with the information in the other tables. Once these table relationships are defined we can create queries, forms and reports to display information which is actually spread across several tables.

HOW TO DESIGN AND DOCUMENT YOUR DATABASE! It is extremely important to spend time designing your database as time spent here will often pay dividends later on in the process, as you know where you are going and what you are trying to do.

MR NOEL ATTARD

PAGE: 32


COMPUTER STUDIES NOTES

BASIC DESIGN RULES 1. Make each record unique: Each table should be allocated a primary key. A primary key is simply a field or a combination of fields which makes a record unique. 2. Make each field unique: If you have repeated the same kind of information in a table, you should put it into another table. 3. Make fields functionally dependent: Each field in the record should relate to the subject of the record. If it doesn't, it's either redundant or it belongs in another table! 4. Ensure each field is independent: You should be able to alter any one field in a record without affecting any of the others. 5. Ensure fields don’t contain calculated or derived data: As an example, you need only hold gross pay and deductions on a person's salary record. Net pay can be calculated when it is required, when printing the pay slip for instance. 6. Ensure data is in its smallest logical parts: It might be useful, for instance, to keep customers' postcodes separate from the rest of their addresses so that you can analyze sales based on postal regions.

DATA INTEGRITY TECHNIQUES: When entering data into a database it is very important that all the data enter is 100% correct. This is called data integrity. To ensure that the data is entered correctly there are various Verifications and validation techniques one can do to achieve this. DATA PREPARATION FORM: The data preparation form is the sheet/from from which the user typing into the computer will read and type the data from it. So as a first step to make a data preparation form which looks exactly like the screen of the database, so it would be easier, less difficult and moreover reduce the chance of the user to typing the data incorrectly and not in the correct place. VISUAL CHECKING: This type of verification maybe the most obvious due to its common use. When inputting data a terminal is provided, which apart from an input device such as a keyboard, it also needs an output device such as a monitor. The is there to check what data is being input by the data entry clerk as this showed on the screen. Then the data entry clerk should check for any mistakes by MR NOEL ATTARD

PAGE: 33


COMPUTER STUDIES NOTES

looking again on the screen. This is however the least effective technique. The computer- based system can check the input data against known values by looking up a record in the files to ensure that the input is valid. Before processing a customer record, for example, a check could be made on customer number and catalogue numbers to make sure that they exist. This known as a dependency/presence check. Where applicable, a list of options (e.g. valid quantities of goods ordered) should be displayed so that the user can select from a limited choice, thereby reducing error. By way of confirmation, acceptable customer numbers could result in the customer name being shown on the VDU screen (known as flashback or echo check). Non-valid numbers can be reflected at this early stage and the fault investigated. The outcome should be a valid set of orders which can be passed forward for further processing. VERIFICATION This system is there to minimize errors and involves the inputting of data twice each time by different data entry clerks. Then data is collected and organized in batches. Then data is stored in a temporary transaction file. This is done for several times by different data entry clerks. If both are incorrect, the data entry clerk can re-enter the data correctly. If in the second time the data is found to differ, the program stops the data entry clerk and highlights this difference. Then the data entry clerk will judge whether the previous clerk's entry is correct or not. This used in batch processing. VALIDATION ROUTINES: At the database design stage there are various validations checks that can be done to ensure that all the data is enter correctly and in its place. For example no letters will be accepted in the telephone field. So there are various validation techniques that can be done at the database design stage to ensure data integrity – data is 100% correct These are: RANGE CHECK This is possible to check if data is entered in numbers, it checks if the value falls between a specified range. This is done by setting an upper and lower limit excluding or including all in between as acceptable

MR NOEL ATTARD

PAGE: 34


COMPUTER STUDIES NOTES

whilst the others as errors. For example used to check the age of student – not GREATER then 16 TYPE CHECK It is possible to check whether a particular data input is a numeric or a character ‘type’. For example used to the type – only numbers accepted in telephone. LAYOUT CHECKS Each position within a data item is tested against the item’s picture to ensure that only valid values present. Layout (or picture) checks are commonly applied to code numbers as these often have a complicated layout. For examples, if the picture of a national insurance number is AA 99 99 99 A, where A represents a letter and 9 digit, then the number YT 67 85 C9 A would be rejected as there is a letter in the 7th position instead of a number. It is also possible that a particular position within a data item must have one a limited set of values; if this is so a more stringent check can be made. For instance, days in a date field should be no greater than 31. COMPATIBILITY CHECKS Data items may pass their own limit checks but fail when checked for compatibility. For example, a customer order for 12 units @ £10 each may be acceptable able until it is compared with the customer’s credit limit which is to be only £100. Hence the order would be stopped. MUTUAL CHECK When the entry of the a particular field depend if the other field was fill or not. Example if not married…the user will not be allowed to enter the Wife name. ID CHECK Also called key field check is when a field is declared as a key field, so it is contents must be UNIQUE. So if already entered the system will not let you enter the same number again another time. WHAT IS A CHECK DIGIT? A check digit can be appended to a code number in order to detect errors arising when the number is transcribed manually. A very high percentage of mistakes can be found in this way. The average errorfinding ratio here is 98%. In general, check digits are only worthwhile using if the code number is fairly long, say above five digits, and is transcribed fairly frequently.

MR NOEL ATTARD

PAGE: 35


COMPUTER STUDIES NOTES

WHAT ARE THE PRINCIPLES OF CHECK DIGITS? The principle behind check digits is that an extra digit is generated from the code number itself by applying an algorithm to it. The modulus number is the number used to generate this check digit. Eg: Code number 784535 Number position (start from 2 x number) & total of all. Then divided by module. The remainder = Module number. Check digit 7 So the number entered will be: 7845357. Then the computer will do again the check digit and if the number was enter incorrectly, the check digit will not come 7. This will mean that the number was entered incorrectly. TYPING ERRORS: When typing word one can easily make mistakes. There are 3 types of errors one can do:nFor example the correct word to be typed is: COMPUTER •

OMMISSION – leaving a letter out. Eg - COMUTER

TRANSPOSITION – change the position of a letter. Eg - COMPTUER

SUBSTITUTION – change with another different letter. Eg -COYPUTER

DATA SECURITY: Apart from data integrity we also must have data security. So after that we have all our data entered correctly, we must ensure that the data is stored safe and protected. To do this one must: • •

Backups – so if original data is lost, you will have a backup. Passwords – as many people might access the database, there might be people who are not allowed to see parts or maybe none at all. So in this case different passwords for different levels must be created to that data will be protected from unauthorized users. Archive – delete old and unwanted data from file when new data is entered – database updates – add, edit and delete records

MR NOEL ATTARD

PAGE: 36


COMPUTER STUDIES NOTES

9. RELATIONAL DATABASES IDENTIFYING DATABASE TABLE RELATIONSHIPS: A relationship works by matching data in key fields - usually a field with the same name in both tables. In most cases, these matching fields are the primary key from one table, which provides a unique identifier for each record, and a foreign key in the other table. A foreign key (FK) is a column or combination of columns used to establish and enforce a link between the data in two tables. A link is created between two tables by adding the column or columns that hold one table's primary key values to the other table. This column becomes a foreign key in the second table. One of the huge advantages of a relational database is that, once you have your data held in clearly defined, compact tables, you can connect or relate the data held in different tables. There are three types of relationships between the data you are likely to encounter at this stage in the design: oneto-one, one-to-many, and many-to-many. To be able to identify these relationships, you need to examine the data and have an understanding of what business rules apply to the data and tables. If you're not sure, it can be helpful to meet with someone who does have a thorough knowledge of the data. When analyzing table relationships, you need to look at the relationship from both sides. When creating table relationships you always work with two tables at a time. One table is called the primary or parent table and the other is the related or child table.

ONE-TO-ONE RELATIONSHIP A one-to-one (1:1) relationship means that each record in Table A relates to one, and only one, record in Table B, and each record in Table B relates to one, and only one, record in Table A. Look at the following example of tables from a company's Employees database: TABLE A:

TABLE B:

PERSONAL INFORMATION EMPLOYEE ID EN1-10

NAME Carol

SURNAME Schaaf

ADDRESS

CITY

2306 Palisade Ave.

Union City

PAYROLL STATE NJ

POST CODE

EMPLOYEE ID

PAY RATE

EN1-10

€25.00

07087

EN1-12

Gayle

Murray

1855 Broadway

New York

NY

12390

EN1-15

Steve

Baranco

742 Forrest St.

Kearny

NJ

07032

EN1-12

€27.50

EN1-16

Kristine

Racich

416 Bloomfield St.

Hoboken

NJ

07030

EN1-15

€20.00

EN1-19

Barbara

Zumbo

24 Central Ave.

Ritchfield Park

NJ

07660

EN1-16

€19.00

EN1-20

Daniel

Gordon

2 Angelique St.

Weehawken

NJ

07087

EN1-19

€22.75

EN1-22

Jacqueline Rivet

36 Bergeline Ave.

Union City

NJ

07087

EN1-20

€23.00

EN1-23

Betsy

1800 Boulevard St

Weehawken

NJ

07086

EN1-22

€22.50

EN1-23

€19.50

Rosyln

MR NOEL ATTARD

PAGE: 37


COMPUTER STUDIES NOTES

Above, tables with a one-to-one relationship from a database of information about employees Each record in the Personal table is about one employee. That record relates to one, and only one, record in the Payroll table. Each record in the Payroll table relates to one, and only one, record in the Personal table. (This is what looking at it from both directions means.) In a one-to-one relationship, either table can be considered to be the primary or parent table.

ONE-TO-MANY RELATIONSHIP A one-to-many (1:N) relationship means a record in Table A can relate to zero, one, or many records in Table B. Many records in Table B can relate to one record in Table A. The potential relationship is what's important; for a single record in Table A, there might be no related records in Table B, or there might be only one related record, but there could be many. Look at the following tables about a company's Customers and Orders. TABLE A:

TABLE B: CUSTOMERS

CUST ID

CUSTOMER NAME

ORDERS ADDRESS

CITY

STATE

POST CODE

ORDER NUM

CUSTOMER ID

ORDER DATE

SHIP DATE

76654

20151

2/1/00

2/6/00

USPS

SHIPPER

20151

John White

19 Church Rd

Ryebrook

NY

10273

20493

Peter Green

3, Cross rd

White Valley

CA

92708

74432

20151

6/30/99

7/2/99

Federal Express

20512

Alex Young

79 Gessner Pk

Houston

TX

77024

75987

20151

11/10/99

11/12/99

UPS

20688

Matt Cole

51 Ulster St

Denver

CO

80237

62922

20493

9/5/99

9/6/99

UPS

20784

Joe Blogs

687 Trees Rd

Stowe

VT

08276

65745

20493

10/1/99

10/3/99

USPS

Tom Gres

36 N.Miller Ave

13206

72212

20493

4/22/00

4/25/00

UPS

73547

20493

8/17/99

8/20/99

UPS

69211

21570

5/12/99

5/12/99

Federal Express

70343

21587

10/2/00

10/4/00

UPS

20926 20932

Neil Ritts

512 Apex Rd

Syracuse Someville

NY NJ

08876

21570

Joseph Blerz

2008 Delta Ave

Cincinnati

OH

45208

21587

Kieth Murry

51 Windsor St

Cambridge

MA

02139

21965

Dennis Black

12 Harbor St

Burlington

VT

04982

As you can see in the previous, tables with data about customers and orders that have a one-to-many relationship The Customers table holds a unique record for each customer. Each customer can (and, we hope, does) place many orders. Many records in the Orders table can relate to only one record in the Customers table. This is a one-tomany relationship (1:N) between the Customers table and the Orders table. In a one-to-many relationship, the table on the one side of the relationship is the primary table and the table on the many side is the related table. A one-to-many relationship is the most common relationship found between tables in a relational database. The following is an example of a form used in a database to display the data from two tables with a one-to-many relationship. MR NOEL ATTARD

PAGE: 38


COMPUTER STUDIES NOTES

MANY-TO-MANY RELATIONSHIP: Examine the sample data below. These tables hold data about employees and the projects to which they are assigned. Each project can involve more than one employee and each employee can be working on more than one project (the "do more with less" thing). This constitutes a many-to-many (N:N) relationship. TABLE A:

TABLE B:

PROJECTS

EMPLOYEES PROJECT NUM

EMPLOYEE ID

NAME

SURNAME

PROJECT NUM

PROJECT TITLE

EMPLOYEE ID

30-452-T3

Woodworking Around The House

EN1-26

EN1-26

O'Brien

Sean

30-452-T3

30-452-T3

Woodworking Around The House

EN1-33

EN1-26

O'Brien

Sean

30-457-T3

30-452-T3

Woodworking Around The House

EN1-35

EN1-26

O'Brien

Sean

31-124-T3

30-457-T3

Basic Home Electronics

EN1-26

EN1-33

Guya

Amy

30-452-T3

30-482-TC

The Complete American Auto Repair Guide

EN1-33

EN1-33

Guya

Amy

30-482-TC

31-124-T3

The Sport Of Hang Gliding

EN1-26

31-124-T3

The Sport Of Hang Gliding

EN1-33

31-238-TC

The Complete Baseball Reference

EN1-35

31-238-TC

The Complete Baseball Reference

EN1-35

EN1-33

Guya

Amy

31-124-T3

EN1-35

Baranco

Steven

30-452-T3

EN1-35

Baranco

Steven

31-238-TC

31-241-TC

Improving Your Tenni s Game

EN1-40

EN1-36

Roslyn

Elizabeth

35-152-TC

35-152-TC

Managing Your Personal Finances

EN1-36

EN1-38

Schaaf

Carol

36-272-TC

36-272-TC

Using Electronic Mail Effectively

EN1-38

EN1-40

Wing

Alexandra

31-238-TC

EN1-40

Wing

Alexandra

31-241-TC

Above, tables are with a many-to-many relationship.

This is a screen shoot of how relationships are shown in MS Access

MR NOEL ATTARD

PAGE: 39


COMPUTER STUDIES NOTES

10. BINARY ARITHMETIC ADDITION RULES: This becomes extremely simple as only two digits are used. The rules for addition are: 1. 2. 3. 4. 5.

0+0=0 0+1=1 1+0=1 1 + 1 = 0 carry 1 1+1+1=1 carry 1

Example: 0101 0101 + -------------1010

0110 0111 + ----------------11 01

MULTIPLICATION RULES Again the rules here are much simpler than for the decimal system. The rules for multiplication are: 1. 2. 3. 4.

0 0 1 1

x x x x

0 1 0 1

= = = =

0 0 0 1

Example: multiply the following binary numbers: (i) 1 0 1 x 10 000+ 1010 1010

MR NOEL ATTARD

(ii)

101x 111 101+ 1010 10100 100011

PAGE: 40


COMPUTER STUDIES NOTES

SUBTRACTION: Subtraction does not prove to be quite simple as the other arithmetical processes. A computer cannot subtract a number from another. It can only add two numbers. Let us consider the case when we need to subtract two numbers. ` Subtract B from A A - B Add –B to A A + (-B) The above two statements yield the same result. To carry out the above addition, we need to find the code for –B in the binary and then add it to A. This idea brings us to what is known as complementation

ONE’S COMPLIMENT The easiest form of complementation is known as one’s compliment. The method of finding the one’s compliment of binary digit is by replacing ones for zeros, and zeros for ones (inverting all bits). Example: find the one’s compliment of 1001101 Number Invert all bits

1001101 0110010

TWO’S COMPLIMENT The two’s complement is obtained by adding 1 to the one’s compliment of a binary digit. We use this complement in a subtraction operation. Therefore the two’s compliment of 1001101 is Number One’s compliment Add 1 Two’s compliment

1001101 0110010 +1 0110011

SUBTRACTION RULES The rules to subtract two numbers are: 1. Pad with zeros until both numbers are the same length. 2. Take the two’s complement of the digit to be subtracted. 3. ADD the result to the first binary number. 4. Ignore the carry result to preserve the initial size. MR NOEL ATTARD

PAGE: 41


COMPUTER STUDIES NOTES

Example: if X=1101010 and Y=11101. Find the value of A, if A=X-Y. A= A=

X - Y 1101010 – 11101 1101010 – 0011101

1 1

0011101 1100010 +1 1100011

Y 1’s compliment 2’s compliment Answer

1 0 1 0 1 0+ 1 0 0 0 1 1 0 1 0 1 0 1 1

1 Ignore the carry result and so the answer is: 1010101

RIGHT & LEFT SHIFTS, NUMERIC OVERFLOW A REGISTER is a storage location with a fixed number of bits. Hence, in an 8-bit register, the number 1 will be stored as: 00000001 Numeric overflow is usually the result of a computation which is outside a fixed range. Assuming that data is being stored in 8-bit registers, the following computation causes numeric overflow.” 10110100+ 10011100 ---------------101010000 This is so because if we use an 8-bit register, we have 256 combinations (28), which means we can represent numbers in the range of 0…255. The numbers 156 and 220 can both be represented using such a register. However, number 350 is outside this range and therefore cannot be represented in this register. The result of the above computation is a nine bit digit which exceeds the fixed size of the register, which is 8 bit. Thus this is called a numeric overflow occurs. As a result of numeric overflow, 2 MR NOEL ATTARD

PAGE: 42


COMPUTER STUDIES NOTES

registers have to be taken up in order to store the result of the above computation, as shown below, as else result will not fit:

Two 8-bit registers 00000001

01010000

LEFT AND RIGHT SHIFTS: LEFT SHIFT Shifting a binary number left by 1 bit effectively multiplies it by 2. 1011002 = 4410 Sifting a binary number left by 1 bit means inserting a 0 to the right, so that this becomes the new least significant bit: 10110002 = 8810 RIGHT SHIFT

Shifting a binary number right by 1 bit effectively halves it. 1001112 = 3910 Shifting a binary number right by 1 bit means deleting the present least significant bit, irrespective of whether this is a 1 or a 0, so that the bit next to it, (on the left), becomes the new significant bit: 100112 = 1910

NOTE THAT WHEN SHIFTING A BINARY NUMBER TO THE RIGHT, AND A 1 IS DELETED, SINCE THAT WAY DATA IS LOST, THE VALUE MAY NOT BE EXACTLY HALVED.

MR NOEL ATTARD

PAGE: 43


COMPUTER STUDIES NOTES

11. COMPUTER LOGIC A logic gate is an elementary building block of a digital circuit . Most logic gates have two inputs and one output. At any given moment, every terminal is in one of the two binary conditions low (0) or high (1), represented by different voltage levels. The logic state of a terminal can, and generally does, change often, as the circuit processes data. In most logic gates, the low state is approximately zero volts (0 V), while the high state is approximately five volts positive (+5 V). There are seven basic logic gates: AND, OR, NOT, XOR ,NAND, NOR, and XNOR The AND Gate is so named because, if 0 is called "false" and 1 is called "true," the gate acts in the same way as the logical "and" operator. The following illustration and table show the circuit symbol and logic combinations for an AND gate. (In the symbol, the input terminals are at left and the output terminal is at right.) The output is "true" when both inputs are "true." Otherwise, the output is "false."

The OR Gate gets its name from the fact that it behaves after the fashion of the logical inclusive "or." The output is "true" if either or both of the inputs are "true." If both inputs are "false," then the output is "false."

Input 1 Input 2 Output 0

0

0

0

1

0

1

0

0

1

1

1

Input 1 Input 2 Output 0

0

0

0

1

1

1

0

1

1

1

1

A logical inverter , sometimes called a NOT gate to differentiate it from other types of electronic inverter devices, has only one input. It reverses the logic state.

MR NOEL ATTARD

Input Output 1

0

0

1

PAGE: 44


COMPUTER STUDIES NOTES

BOOLEAN EXPRESSION OF A LOGICAL CIRCUIT •

+

Means an OR Gate

– (A + B) = A OR B

.

Means an AND Gate

- (A . B) = A AND B

.

Means the NOT Gate -

MR NOEL ATTARD

A= NOT A

PAGE: 45


COMPUTER STUDIES NOTES

12. COMPUTER STORAGE MAIN MEMORY: Storage of data and programs is one of the most important features of an information processing system. This is done: • Temporarily while a program is running. This is stored in main store. • Long-term to preserve programs and data while not in use. This is called backing store. Note: Memory is another term used for storage. Computer memory is one of the most expensive components that make up a computer. This memory known as central memory or primary storage is divided into two: • •

Read Only Memory. Random Access Memory.

READ ONLY MEMORY (ROM) – It is a memory device in the form of a collection of integrated circuits (chips), frequently used in computers. ROM chips are loaded with data and programs during manufacture and can only be read by computer. However, the contents of the chips are not lost when the power is switched off (nonvolatile). If ROM was volatile it would lose its data and it would not be possible to write it back. ROM is used to form a computer's permanent store of vital information, or of programs that must be readily available but protected from accidental or deliberate change by the user. Frequently used programs essential to the normal running of the computer are stored in ROM. These usually include a small program, the bootstrap loader, which runs when the computer is switched on to get it started.

MR NOEL ATTARD

PAGE: 46


COMPUTER STUDIES NOTES

OTHER TYPES OF ROM’S: Although we mentioned that ROM is read only memory and cannot be altered there are other types of ROM, which allow some minor sort of reprogramming though this is of a very limited nature and is generally confined to a serial number, a code or settings. •

Programmable ROM (PROM): once programmed cannot be altered or erased. The difference between a prom and an ROM is that whilst a ROM is programmed by the manufacturer a prom may be programmed by a programmer

Erasable PROM (EPROM): this chip may be erased by exposure to ultra violet light. More expensive than a PROM and has a window to allow the passage of ultra violet light.

Electrically Alterable PROM (EAPROM): these chips may be partially programmed. Since these chips tend to wear out if it has to be read many times it is normally read into ram and then subsequently read from there.

RANDOM ACCESS MEMORY (RAM) It is a memory device in the form of a collection of integrated circuits (chips), frequently used in computers. RAM chips can be both read from and written to by the computer, but their contents are lost when the power is switched off. Such memory is called volatile memory. For example RAM is used to store: o The program which is running and the data it is using, o Data being transferred to and from peripherals, o The contents of the screen. MAIN DISTINCTIONS BETWEEN ROM AND RAM ROM RAM Can only be read by computer Can be both read from and written to by the computer The contents of the chips are not Contents are lost when the power lost when the power is switched is switched off (volatile) off (non-volatile)

MR NOEL ATTARD

PAGE: 47


COMPUTER STUDIES NOTES

USES OF MAIN MEMORY AND BACKING STORE The • • •

main store is needed: To store the program currently being executed To hold data produced as the program is run To hold other data such as the contents of the screen.

The backing store is needed: • For long-term storage of data and programs • For data and programs where there is not enough room in the main store. • For Backup purpose.

STORAGE MEDIA AND STORAGE DRIVES A storage medium is the material on which the data is stored e.g. magnetic tape, floppy disc, CD-ROM. A storage medium is exchangeable if it can be removed from the drive and replaced by another one of the same type. A storage drive is the piece of equipment, which rotates the storage medium and accesses the data on it.

CHARACTERISTICS OF BACKING STORE • • •

Data is usually accessed using read/write heads. These transfer the data while the medium rotates in the drive Access to backing store is slower that to main store They are non-volatile. The data is stored on the medium until it is deleted.

MAGNETIC MEDIA Magnetic Tape - narrow plastic ribbon coated with an easily magnetisable material on which data can be recorded. It is used in sound recording, audiovisual systems (videotape), and computing. Magnetic tape was first used to record computer data and programs in 1951. Since then magnetic discs have largely replaced it

MR NOEL ATTARD

PAGE: 48


COMPUTER STUDIES NOTES

as a working medium, although tape is still used to make backup copies of important data. Magnetic tape has serial access - an item can only be accessed by working through all the items before it. The device that reads the tape is the Tape Drive or Tape Unit. ADVANTAGES Speed - very fast

DISADVANTAGES A record on magnetic tape cannot be updated in place. Records to be updated have to be read, updated and then written to a second tape Capacity - high Tape must be stored in a suitable volume of 10 environment where humidity, temperature million characters and dust are tightly controlled; otherwise read errors occur. Cost - it is cheap Tape has a limited shelf life (about 2 years) and convenient. for reliable results and is therefore not suitable for long-term storage of history files.

Magnetic Disc - A typical magnetic disk has two surfaces or sides. Each surface holds data in circular tracks and each track is divided into equal sections called sectors. The track number and sector number are used as an address to find where data is on the disc. Data can be both written to and read from the disc. Magnetic disks are direct access i.e. any data item can be accessed without reading other data first. (A) TRACKS

(B) GEOMETRICAL SECTOR

ADVANTAGES Currently the most popular storage method in business Very high capacity storage at low cost

(C) TRACK SECTOR

(D) CLUSTER

DISADVANTAGES More expensive than tape drives and tapes Can be susceptible to dust, static electricity, head crashes etc.

Disc packs are convenient to handle and store.

MR NOEL ATTARD

PAGE: 49


COMPUTER STUDIES NOTES

Hard disk: The hard disk is usually fixed in the drive. Each is built into a sealed unit to prevent contamination by dust and moisture. Access to data is far faster than access to floppy discs. Hard disks store far more data than floppy discs. They are more reliable then floppy discs - there is better protection against dirt. Hard discs are used to store the operating system, application software and users' files. A hard disk can store about 40, 80, 120 Gbyte of data.

Floppy disc: access to data is much slower than for hard disc. The discs are exchangeable and easy to transport. A stiff plastic cover protects the disc. This has a whole for the read/write heads which is protected by a sprung metal cover. The data on the disc can be protected by sliding a small write-protect tab which prevents the contents of the disc from being changed. Floppy discs are light and portable. They are direct access and data can be written to magnetic discs. It can store 1.44 Mb of data.

OPTICAL MEDIA An optical disk is a storage medium in which laser technology is used to record and read large volumes of digital data. • Compact Disk Read Only Memory (CD-ROM): a computer storage device developed from the technology of the audiotape compact disk. It consists of a plastic-coated metal disc normally about 12 cm in diameter. Data is written to the disk using a powerful laser beam to burn patterns in the surface. Data is read back using a relatively lowpower laser to detect the patterns in the surface. The discs are exchangeable and easy to transport. Access to data is faster than access to floppy disks but slower than hard discs. CD-ROMs typically hold up to 700 megabytes of data, and are used in distributing large amounts of text and graphics, such as encyclopedias, catalogues, and

MR NOEL ATTARD

PAGE: 50


COMPUTER STUDIES NOTES

technical manuals. Usually data is written on to the disc before it is sold. After that data can be read from the disc but not written to it. It can store 700 Mb of data. •

Digital Versatile Disc (DVD): DVD, also known as Digital Versatile Disc or Digital Video Disc, is an optical disc storage media format, and was invented in 1995. Its main uses are video and data storage. DVDs are of the same dimensions as compact discs (CDs), but store more than six times as much data. It can store about 30 Gbyte of data.

Blu-ray Disc (BD): It is sometimes called "Blu-ray," is an optical disc storage medium designed to supersede the standard DVD format. Its main uses are for storing high-definition video, PlayStation 3 video games, and other data, with up to 25 GB per single layered, and 50 GB per dual layered disc. The disc has the same physical dimensions as standard DVDs and CDs.

ELECTRICAL STORAGE MEDIA An electrical media storage device is a chip where data can be stored. Nowadays they are used in various usage due to there capacity and size. In fact they are very portable, and can hold large amount of data. They are used in video games, digital camera. Examples of electrical storage media are: • Pen drives • SD Cards • Memory Sticks

SERIAL ACCESS VS RANDOM ACCESS: Imagine we have a thousand records stored on a secondary storage device and we wish to access the 543 records. In serial access we would have to access the preceding 542 records before homing in on to our required record. On the other hand in random access we are given the possibility to go directly to the particular record we require.

MR NOEL ATTARD

PAGE: 51


COMPUTER STUDIES NOTES

SERIAL ACCESS - MAGNETIC TAPE: Data is stored on tape in binary coded decimal format. A tape is made up of horizontally running tracks and vertical frames. When a file is stored to tape, the program is divided into: A file header Number of blocks A trailer In addition as a means of security parity checking is used. This is a means to check tape data integrity. Horizontal parity utilizes a tape track for checking whilst vertical parity uses a frame for parity checking. Both can coexist for optimum integrity and error correction. There are two types of parity systems odd and even parity. In even parity the tape drive ensures that both horizontally and vertically there is an even number of 1’s similarly for odd parity. DIRECT ACCESS - DISKS: Formatting a floppy disk or hard disk means preparing the medium to receive data. Mostly when a new hard disk is bought the surface area is free and not organized. In order to start writing data onto a disk we must format it to prepare the area into chunks where the data is stored. Formatting prepares the disk into round concentric circle called tracks. Tracks are then subdivided into smaller pieces to form sectors. Hard disks are not readily portable becoming cheaper, rewritable, typical storages nowadays at around 30gb. Magnetic medium is shining silvery metal and hard., since hard disks are getting larger and important factor to look at when buying a new hard disk is its access time.

THE DISK FILING SYSTEM: DISK MAP: A memory map describes the way storage is organised in a computer. For example, sections of memory may be allocated to the screen display, programs or applications. The memory map for disk storage is called a disk map. A disk map describes how the information held on disk is organised, and is kept on disk. It may be held as a bit map i.e. a pattern of bits describing the

MR NOEL ATTARD

PAGE: 52


COMPUTER STUDIES NOTES

organisation of data. For example, the arrangement of data on a disk might be represented to the operating system as a bit map in which each bit represents one sector on a disk: a ‘1’ for sectors in use, a ‘0’ for unused sectors. A graphical screen prepared in a painting/drawing package may be held as a bit map with each bit relating to the setting of an individual pixel on the screen. FAT: To retrieve files stored on magnetic disks, an operating system maintains a list of the sectors assigned to each file. This list is stored in a table called a File Allocation Table (FAT). The FAT is a file on each disk i.e. it is also kept on the backing store.

HIERARCHICAL DIRECTORY STRUCTURE: Computer storage is often conceptualized hierarchically as shown in the diagram, based on the speed with which the CPU can access data. ACCESS TIME: Access time is the time between the computer’s request for data from secondary storage and the completion of the data transfer. It is basically the time taken for a hard disk to seek data and is measured in milliseconds (1/1000th of a second). If you have a hard disk with an access time of 10ms, a file of 10Mb will take less time to be found than another hard disk with an access time of 12ms. Typical access time (time to seek data) is between 9ms and 12ms. The lower the access time, the more costly a device is. Access time for most disk drives is, in fact under 25 milliseconds.

MR NOEL ATTARD

PAGE: 53


COMPUTER STUDIES NOTES

13. ALGORITHMS

DESCRIPTION: An algorithm is a list of well-defined instructions for completing a task. Starting from an initial state, the instructions describe a computation that proceeds through a well-defined series of successive states, eventually terminating in a final ending state. A useful algorithm is a step-by-step process or a sequence of instructions that can be used to solve a problem in a finite (opposite of infinite) amount of time. Some problems are not computable – this means that no matter how simple some problems some problems may appear to US, they have no solution based on the algorithmic approach of computers. Algorithms can be described in different forms: This is an to figure out • TEXTUAL why the lamp doesn't turn on and tries to fix it • PICTORIAL using the steps • A MIXTURE OF BOTH An algorithm may consists of: - Sequence: involves a number of instructions in succession. - Selections / Conditions: we had to do a lot of selections, which were carried out by the IF..THEN..ELSE. or CASE OF this makes it possible to ‘tell’ the computer that if the argument holds, then do something, or else do something else. - Iteration / Repetitions: sometimes the computer needs to repeat a process or serials of instructions until a certain condition is met. Example: For Loop, While Loop or Repeat … Until Loop

PSEUDO CODING: Pseudo-code is a textual method of describing a program or system design. It uses to control structures and keywords similar to those found in the programming languages, but without the strict syntax (grammar) rules of programming languages. It may be presented in a form that looks like a combination of English and a programming language.

MR NOEL ATTARD

PAGE: 54


COMPUTER STUDIES NOTES

FLOWCHARTS: Flowcharts are often used to graphically represent algorithms.The flowchart is one of the most basic methods of representing algorithms. It has been around for many years and still it is useful as a precise method in some circumstances. A flowchart is a diagrammatic representation of the operations involved in a data processing system. So Flowchart is a pictorial representation of the operations involved in a data processing system. Flowchart symbols:

TERMINAL

PROCESSING

DECISION

FLOW DIRECTION

INPUT / OUTPUT

CONNECTER

PROGRAM: A program is a set of instructions (Algorithm) written in a programming language like Pascal or Java so solve a problem, when then can be run on a computer. On the right you can see an example of an algorithm written in 3 ways: • • •

Flowchart Pseudo code Program code

MR NOEL ATTARD

PAGE: 55


COMPUTER STUDIES NOTES

14. INSIDE THE CPU The CPU is the main part of the computer consisting of the registers, arithmetic logic unit and the control unit.

CONTROL UNIT:

is the part of the central processor which manages the execution of the instructions. A characteristic of all computers is the ability to follow a set of instructions automatically. The control unit fetch each instruction in sequence, decodes and synchronises it before executing it by sending control signals to other parts of the computer. This is known as the fetch – execute cycle. Two registers that are found in the CU are the Instruction Register and the Program Counter

ALU:

is the part of the CPU where data is processed and manipulated. It is also called the arithmetic unit. The processing and manipulation of data normally consists of arithmetic operations or logical comparisons allowing a programme to take decision. Two register that are found in the ALU are the Accumulator and the Shift Register.

REGISTERS: there are 4 registers, the instruction register and the programme counter which are found in the control unit, the accumulator and shift register which are found in the arithmetic logic unit. • • • •

Instruction Register: stores a copy of the current instruction being processed. Programme Counter: stores the address of the next instruction to the programme to be executed. Accumulator: is used for storing the current result of the calculation. Shift Register: is a cable of shifting its contents one or more positions to the right or to the left, in order to carry out arithmetic operations.

MACHINE CODE:

is the set of all possible instructions available from the electronic design of a particular computer. These instructions usually reflect the hardware design of the computer, and operate on very basic data, such as bytes or even single bits. The instruction can only be understood by the computer when expressed in binary notation.

MR NOEL ATTARD

PAGE: 56


COMPUTER STUDIES NOTES

Computer Speed: the first and most important is the speed with which the CPU chip can operate. This depends on the internal clock of the CPU and is measured in MHz or MIPs (million of instructions per second). Opcode: is short for operational code and is the mnemonic part of an instruction sort of the action to do part. Operand: is the mathematical part of the instruction – data upon which the op code is to carry out the action. (where to do action) Data Bus: is a set of parallel copper strips acting as wires along which data travels between the CPU, central memory and peripherals. The width of data bus depends also on the type of CPU and determines the word length that is the maximum number of bits a computer can pass at once along the bus. Address Bus: consists of the same structure and allows the transfer of the address to and from peripherals, between the CPU and central memory. The structure of the bus has been circular in the design of fast access and standard set out by manufacturers.

THE FETCH AND EXECUTE CYCLE: (fetch-decode-execute) is a repetitive process (steps) of fetching an instruction from main memory unit and executing it. Step 1: Set the value of the Program Counter to the address of the 1st instruction. Step 2: Fetch the instruction from the location specified by the Program Counter. Step 3: Store a copy of this instruction in the Instruction Register. Step 4: Increment the Program Counter by 1. Step 5: Execute the instruction. Step 6: Go back to Step 2 until the program ends. Flow of Data inside the CPU

MR NOEL ATTARD

PAGE: 57


COMPUTER STUDIES NOTES

15. IT PERSONEL ROLES Information Technology has many job components. An I.T. professional is an expert in one area, not all. It is impossible to master all the components since each component is so huge. Therefore to enter this profession you must choose an area of expertise for yourself that you wish to master. Information Technology has 4 major components: • Databases • Front-end tools • Networking • Operating Systems These components have given rise Information Technology: • Database Administrator • Application Developer • Applications Functional Expert • E-Commerce/Web Developer • Network Engineer • Operating System Administrator • Project Manager • And others as mentioned below

to

the

following

roles

I T MANAGER He is o o o

the man responsible for all the IT department. Employ all workers at the IT section. Ensure that computer department is running smoothly. Create new opportunities for company to make more profit.

- SYSTEM DEVELOPMENT MANAGER He is the man responsible for the System Development Department. o Ensure that research and development are running smoothly. o Ensure deadline for new system implementation are reached. o Ensure project original guidelines are followed. - DATABASE ADMINISTRATOR A Database Administrator is responsible for managing the database.. o Design Database to be used. o Test database. MR NOEL ATTARD

PAGE: 58

in


COMPUTER STUDIES NOTES

o Give right and access to whom have to access database o Do timetable of backup system o Label old file to any future reference - NETWORK ADMINISTRATOR The Network Administrator is responsible for managing the network o Create new profiles. o Check that system will not be overloaded. o Check all computer are connect to the internet. o Check for any viruses in employees emails. o Keep up to date with new technology. - OPERATION MANAGER He is responsible for the data entry department. o Ensure that data entry is running smoothly o Train staff o Do problem solving meeting. o Do timetable for staff and resources

SYSTEM DEVELOPMENT MANAGER Project Manager is responsible for managing the I.T. project and bringing it to completion. This person possesses more soft skills than technical skills. This role requires skills of people management, resource planning, writing project plans, managing conflicts and managing time and activities of the team. SYSTEM DESIGNER (ANALYST) o Define inputs & outputs of new system. o Do feasibility study. o Design program flowchart. o Write up documentation for new system. SYSTEM PROGRAMMER o Write system (operating) software. APPLICATION PROGRAMMER o Write application programs. SENOIR PROGRAMMER o Develop program through a flowchart. o Take care of JUNIOR programmers. o Co ordinate Junior Programmer work. MR NOEL ATTARD

PAGE: 59


COMPUTER STUDIES NOTES

JUNIOR PROGRAMMER o Write programs source code. o Prepare INLINE documentation for future reference. o Test program by give data from Senior Programmer. IT TRAINER o Train new employees on how to use system. o Coordinate courses with other departments. o Teach the NON-IT staff with new developed programs.

DATABASE MANAGER FILE LIBRARIAN o Responsible for all the safekeeping of Database files. o Do backup of files regularly. o Fetch for any deleted files that are deleted by mistake. o Reinstall any deleted files to the system.

NETWORK ADMINISTRATOR Network Engineer is responsible for maintaining the network in an organization. A network engineer is specialized in one of the networking technologies like NT, CISCO or Novell COMPUTER ENGINEER o Initially setting up the system. o Solve hardware problem not solved by technician. o Thinking of upgrading present system. o Check compatibility of current software with new system.

MR NOEL ATTARD

PAGE: 60


COMPUTER STUDIES NOTES

COMPUTER TECHNICIAN o Repair faulty equipment. o Replaces faulty equipment. o Install new hardware to the system. o Maintains ‘older’ hardware in working order.

OPERATION MANAGER Operating system administrator's role is very similar to that of a database administrator. Operating system administrator manages the health of the operating system. Managing directories, managing operating system security, creating backup and restoring them, installing products are all part of his duties. This role involves working closely with database administrators (DBAs) and application developers. This role also requires basic programming skills. Sometimes operating system administrators have to write small programs to automate certain processes. COMPUTER OPERATOR o Ensure input and output media are ready (printers…) . o Power up computer and machines. o Record any errors in error log book. o Clean devices from dust. o Regulate computer environment room temperature. o Delete unwanted files and directories DATA ENTRY CLERK o Enter data into the computer. (Typists). o Check the date inputted is correct. o Correct an incorrect data when found. WEB MASTER o Creates and host the company web page. o Maintains and update the web page o He act as a link between the client (problem) and programmer (have solution) o Do all internet links for the company. o Display all new products and achievements of the company. MR NOEL ATTARD

PAGE: 61


COMPUTER STUDIES NOTES

16. SYSTEM ANALYSIS WHAT IS SYSTEM ANALYSIS? Systems analysis is the process of analysing particular system to see if computerisation would be useful, productive and more profitable. Systems analysis also includes the specifying, setting up, testing and evaluating of the system. The latter is done to see of it has achieved and desired aims and objectives that were laid down when the specifications from the system were drawn up.

HOW IS A SYSTEM ANALYSED AND DESIGNED: Systems are created to solve problems. Before a system is conceived, a problem or need must exist. Once the problem is defined, a system is developed to solve it. Different alternatives may have to be studied and analysed. If there is an existing system in operation, this system is investigated to determine the true nature of the problem. Investigation will be always reveal the best course of action, whether to leave things as they are, upgrade the current system or developed a new computerized system. Assuming that a new system is to be developed, the next phase is analysis. Analysis involves a detailed study of the current system, leading to the specifications of a new system. As the shortcomings of the present system are identified, the user will specify what they want out of the new system. The main target of analysis at this point is a specification of what the new system is to accomplish. Based on the user requirements, the new system must be designed. Normally, the design proceeds in two stages. In the first stage called preliminary design, the features of the new system are specified. The costs of implementing these features are the benefits to be derived are estimated. If the project is still considered to be feasible, the analysis moves to the detailed design stage. When the design is completed, implementation begins. After the system has been developed, it is installed, that is, the system is put in place, ready to be used. Once it is operating, the system can be monitored to determine if it is performing up to expectations. If it is not, it will be necessary to make modifications. Eventually, it becomes necessary and economical to replace the old system with a new one. Thus the life cycle of a system ranges from problem definition to obsolescence.

MR NOEL ATTARD

PAGE: 62


COMPUTER STUDIES NOTES

WHO IS IN CHARGE??? System Analyst Is the person responsible for the analysis of a system to access its suitability both for computerisation and for any changes or up-grades to existing systems. Where change is decided upon, the system designer will be responsible for building on the analyst’s results to create the new computer-based system and will normally work up to the point where programmers can sensibly take over. People who are responsible both for the analysis and for new system design, are referred, to as analyst.

THE SYSTEM ANALYST WHAT IS A SYSTEM? A system is an organised set of related components, consists of input, processes, files (storage) and outputs, and is designed to fulfil same useful purpose.

WHAT IS SYSTEMS ANALYSIS? Systems analysis is the process by which a new system replaces a old one. It is an all-embracing term which converse not only the study and analysis of systems but also the design and implementation of new and better ones. An alternative, and perhaps better, phrase to describe the same processes is ‘systems development’. The improvement of a business system now usually implies the use of a computer in some way.

WHO IS THE SYSTEM ANALYST? The system analyst is the person who applies the techniques and procedures of systems analysis and design and, as such, plays an important role in the application of computer projects. He or she must maintain close contact with the client (usually management) and the users (the staff) during systems development, not least because this may help to overcome resistance to and fear of changed.

THE MAIN FUNCTIONS OF A SYSTEMS ANALYST: 1. An analyst must coordinate schedules and tasks with a number of people: programmers, managers, users, suppliers, etc. She/he must be a good communicator able to talk and write to people at all levels within the organisation. 2. The analyst must plan and design the new system. This function involves all the activities from the beginning of the project until the final implementation of the system.

MR NOEL ATTARD

PAGE: 63


COMPUTER STUDIES NOTES

AN APPROACH TO SYSTEMS ANALYSIS As you already know, the computer system consists input, processing, output and backing storage (secondary storage) as regards hardware, and consists also of software which includes the program files and data files. The computer system that you are using at home or at school was probably bought off-the shelf and it was suitable for your needs. However, in industries and businesses, computerized systems may be needed to perform specific tasks. In that case, it may be necessary to have a computer system designed specifically for that particular use. Systems Analysis is the study, design and implementation of new computerized systems and the updating of older ones. It is the process taken in replacing a system from a manual one to a computerized one, or upgrading a computerized system to a more suitable one for the company s current needs. This process involves seven steps There are many ways of developing a computer-based business system — there is no one magical formula. Obviously the size and complexity of the task will determine the time, money and effort to be spent on the development of a new system. Small businesses will probably not have the resources to afford outside experts or tailormade programs but this does not devalue systems analysis as a way of thinking.

STAGES OF SYSTEMS ANALYSIS AND DESIGN: Structured systems analysis and design consists of several steps collectively known as the systems life cycle. No one standard set of stages exists, but commonly the following are used: (1) (2) (3) (4) (5) (6) (7)

Feasibility study. Current Systems study and analysis. …. (Yes or No) New Systems design. Programming & Documentation. Implementation & Testing. Control and review. System Maintenance.

STAGE 1 — FEASIBILITY STUDY: When the system analyst is given a task, s/he has to first discuss the objectives of the system with the client to determine what the system needs to include. S/he will then do a feasibility study: a study to MR NOEL ATTARD

PAGE: 64


COMPUTER STUDIES NOTES

check whether the new system will be more effective than the original and to see whether it is worth it to proceed with the development of the new system. A feasibility study can screen out bad ideas such as a scheme which is technically possible but too expensive to implement. The project will, therefore, be rejected or the objectives redefined. If an idea is acceptable to the client a written go-ahead should be given to proceed with the next stage, the systems study.

STAGE 2 — SYSTEMS STUDY AND ANALYSIS: This stage covers a review of the existing system leading to design specification for a new system. It is a detailed study of current practices, files, documents, working methods, etc. from which can spring ideas for new systems. This is based on the premise that you cannot improve a system until you understand it and what it's supposed to do. So in 1. 2. 3. 4. 5.

this stage the system analyst, should Studying the old system Thinking of alternatives to use as solutions to problem Propose briefly the new system requirements Time taken to do project Approximate cost of project

The outcome of this stage should be a written report, known as the statement of requirements, where the objectives of the proposed new system are shown and the total cost of the new system. Then the user will decide if to continue with project or not.

STAGE 3 — SYSTEMS DESIGN: This is the stage in which the analyst actually plans the new system. The systems design stage is essentially a process of moving from a general outline to a detailed final product. The designer usually works backwards from outputs to produce inputs (documents, files) and procedures leading to a systems specification which will be presented on standard forms. Design is often divided into two sub stages: preliminary design and detail design. This is because the analyst wants to make sure that

MR NOEL ATTARD

PAGE: 65


COMPUTER STUDIES NOTES

management approves the overall plan before spending more time and money on details. So after studying the current system and gathering the needed data, the analyst will now design the new system, based on what s/he has learned from the previous stages. This stage produces a detailed design of the final system providing a much clear idea of what the system will consist of. The system is usually divided into four parts, which are the: Input: The ways data is input into the system Output: The ways information is to be output from the system Processing: This is the part that the programmers will be using as a plan for the programs they will be writing to provide new system to the clients and users with a user-friendly, error-free and reliable software. Data files and access methods: How and where will the data be stored? This is also designed in this stage. Care needs to be taken so that the new system will use data file structures that suit the new system.

STAGE 4 — PROGRAMMING & DOCUMENTATION: This stage can often be difficult and time consuming because the design has gradually to be put into practice. Programming is a logical progression from the systems specification, as programs should, in theory, be able to be written straight from the logic charts or pseudo code in the design specification brief. Indeed programmers should be involved at the design stage whenever possible. So this stage is carried out by the programmers. The system analyst will hand the design of the system to the programmers, who will use it to write the actual needed programs. They will also prepare the documentation of the software, so that if maintenance is needed in the future, it will be easier to understand what was done especially if the programmer in charge of the maintenance is not the same one who wrote the program in the first place. Also at this stage when the programs are ready all the necessary program documentation (Program Manual and User Manual) have to be done by the programmer.

MR NOEL ATTARD

PAGE: 66


COMPUTER STUDIES NOTES

STAGE 5 — IMPLEMENTATION: This stage involves the practical work of transferring the systems design, suite of programs and database into a working system. It begins when the new system comes on stream (perhaps when the hardware contract is placed) and ends when the old system is closed down. As problems tend to be human rather than technical at this stage it must be carefully planned and is the responsibility of management. The tasks in the implementation stage are: • Staff training and education: • File conversion — reformatting files for the new system. • Security: • Documentation check: • Deciding on the method of change-over: System Implementation (CHANGE OVER): The Implementation stage is concerned with those tasks leading immediately to a fully operational system. The change over of files must have been carried out before implementation can proceed. So the system is tested to check all system is ok. After that the system is tested and everything check, the new system can now replace the old manual system. This changeover can be done in four ways: Parallel Implementation: The computerized system is implemented while the manual system is still running. Its advantage is that if the computerized system fails, the manual system is still working as usual. The disadvantage is that for some time there is redundancy of work. At some point in time, the manual system is phased out. Direct Implementation: In this system the computerized system is implemented directly over the new system. This means that when the new system starts operation the old system is abandoned. Staggered Implementation: In this system the computerized system is implemented little by little. For examples first data inputs,..then the outputting of system will be implemented… then maybe the printing feature. etc…

MR NOEL ATTARD

PAGE: 67


COMPUTER STUDIES NOTES

Pilot Implementation: The computerized system is implemented while the manual system is still running. Its advantage is that if the computerized system fails, the manual system is still working as usual. This is only done to test the new system. When all the tests are over, the change over will be as in direct implementation.

STAGE 6: CONTROL AND REVIEW: The analysts work does not end when the new system is fully implemented. The system analyst needs to keep an eye on the new system for a short period of time or trial period (e.g. 6 months) to make sure that all is working well and check that data is being saved correctly, and that the actual performance is as it was designed 1) Control: Once the system is put into action its progress will have to be monitored to see whether what actually happening matches with what should be happening is. This stage involves the following tasks: • Setting standards against which performance can be compared. • See system actual performances. • Taking corrective action wherever appropriate so that the system meets its objectives. This stage involves regular progress meetings and is also called 'systems maintenance'. 2) Review: Periodically, usually once a year, systems are reviewed to give an overall picture of the progress made. The findings of the review can then be incorporated into subsequent systems analysis which, in theory, should be better because of the knowledge and experience gained. Review should help to provide feedback information. Success criteria might include whether the system produces accurate, relevant and up-to-date information at a cost-effective price.

STAGE 7: SYSTEM MAINTENANCE Finally, the system analyst must remain in contact with the users of the new system even after the trial period is over to make sure that all is working well. This monitoring goes on for a number of years until the new system is not suitable anymore. MR NOEL ATTARD

PAGE: 68


COMPUTER STUDIES NOTES

17. OPERATING SYSTEM WHAT IS THE OPERATING SYSTEM / SYSTEM SOFTWARE? An operating system is a software program that provides an interface between the user and the computer and manages thousands of applications. Most computer systems are sold with an operating system installed. Computers that are designed for individual users are called Personal Computers (PCs). PC operating systems are designed to control the operations of programs such as Web browsers, word processors, and e-mail programs. The operating system is stored on disk, but it needs to be loaded into memory (RAM) once the computer is switched on and before any other program can be run. The operating system is automatically loaded into memory as soon as you turn on, or boot, the computer. The term booting refers to the process of loading an operating system into a computer’s memory. This process is done by a program (called the bootstrap loader) that is stored permanently in the computer’s electronic circuitry (usually on a ROM chip). If you have a computer, then you have heard about operating systems. Any desktop or laptop PC that you buy normally comes preloaded with Windows XP. Macintosh computers come pre-loaded with OS X. Many corporate servers use the Linux or UNIX operating systems. The operating system (OS) is the first thing loaded onto the computer -- without the operating system, a computer is useless.

BASIC FUNCTIONS OF ANY OPERATING SYSTEM? Every computer has an operating system and, regardless of the size and complexity of the computer and its operating system, all operating systems perform the same basic functions: •

Managing Resources – These programs coordinate all the computer’s resources including keyboard, mouse, printer, monitor, storage devices and memory. An operating system creates a file structure on the computer hard drive where user data can be stored and retrieved. When a file is saved, the operating system saves it, attaches a name to

MR NOEL ATTARD

PAGE: 69


COMPUTER STUDIES NOTES

it, and remembers where it put the file for future use. The way an operating system organizes information into files is called the file system. Most operating systems use a hierarchical file system, which organizes files into directories (folders) under a tree structure. The beginning of the directory system is called the root directory. Screenshot of tree structure when using Windows Explorer.

Providing a user interface – Users interact with application programs and computer hardware through a user interface. Almost all operating systems today provide a windows-like Graphical User Interface (GUI) in which graphic objects called icons are used to represent commonly used features.

Running applications – These programs load and run applications such as word processors and spreadsheets. Most operating systems support multitasking, or the ability to run more than one application at a time. When a user requests a program, the operating system locates the application and loads it into the primary memory or RAM of the computer. As more programs are loaded, the operating system must allocate the computer resources.

Support for built-in utility programs –The operating system uses utility programs for maintenance and repairs. Utility programs help identify problems, locate lost files, repair damaged files, and backup data. The figure here shows the progress of the Disk Defragmenter, which is found in Programs > Accessories > System Tools.

Utility Programs are specialized programs that make computing easier. All kinds of things can happen to a computer system – hard disks can crash, viruses can invade a system, computers can freeze up, operations can slow down, and so on. That’s where utility programs come in. Many operating systems (such as Windows) have utility programs built in for common purposes – they are also known as System Tools ( to find these tools, click on Start / Programs / Accessories / System Tools ). Examples of utility programs are Format, Scan Disk, Disk Cleanup, Disk Defragmenter, and Anti-Virus.

MR NOEL ATTARD

PAGE: 70


COMPUTER STUDIES NOTES

The purpose of an operating system is to organize and control hardware and software so that the device it lives in behaves in a flexible but predictable way. So the essential facilities the operating system must provide are: • •

To manage all computer resources and maximise their use. (memory, peripherals, etc …) To virtualise all the hardware to make the user life easier to communicate with the computer hardware (using printers, file and folders, etc…)

In order to do provides these features the operating system have a number of modules (small programs) to carry out these tasks. Among of these modules one finds the:

RESIDENT LOADER: It is a program responsible to load/copies a program from or to the backing store onto the central memory for eventually use. At start up not all the operating system modules are loaded, just the important modules are loaded. So if required the resident loader will need to also load the specific module when needed.

COMMAND PROCESSOR: it is the program which execute the commands. It is important to remember that a computer can only execute programs so the program (module) which execute these commands (ex: LOAD / CREATE / PRINT / OPEN) is called the command processor. Commands given by the user can be: • •

CLI – Command line Interface – typing the commands name. GUI – Graphical User Interface – click on graphical icons.

FILE MANAGER: A file is a collection of information accessible by a name defined by the user. The file name given by the user is called the SYMBOLIC ADDRESS of a file. It is very inconvenient for a user to also remember when the file is stored on the disk and other information on the file. All the other information on the file is called the PHYSICAL ADDRESS of a file. So the uses just uses the Symbolic Address to access a file (the name), while the file manager needs the Physical Address of that file to open. So is the job of the

MR NOEL ATTARD

PAGE: 71


COMPUTER STUDIES NOTES

file manager module to search in the list of names and address stored in the file directory when a particular file is need. The physical file directory layout can be either chained or indexed. The structure of the directory will include: • • • • •

File name and File Type Pointer to First Sector or to Index of file Number of sectors occupied Date of creation and last accessed Protection key

The file manager must also know which sector on disk are free or not. This is mapped by the BIT MAP – where a 1 = used and 0 = free for each sector on disk. So when files are stored/edited or deleted the file manger will have to update the Bit Map of disk.

PERIPHERAL DRIVER: This module is responsible to check and see that every peripheral connected to the computer have the correct driver installed. The driver software is a software supplied by the manufactured so that the computer would know how to communicate with this peripheral, which the need for the user to communicate directly with is peripheral.

TYPES OF OPERATING SYSTEMS The precise nature of an operating system will depend on the application in which it is to be used. For example, the characteristics required for an airline seat reservation system will differ from those required for the control of scientific experiments, or for a desktop computer. Clearly, the operating system design must be strongly influenced by the type of use for which the computer system is intended. Unfortunately it is often the case with ‘general purpose machines’ that the type of use cannot easily be identified; a common criticism of many systems is that, in attempting to be all things to all individuals, they end up being totally satisfactory to no one. We shall examine various types of system and identify some of their characteristics.

MR NOEL ATTARD

PAGE: 72


COMPUTER STUDIES NOTES

SINGLE USER SYSTEM: Single user systems, as their name implies, provide a computer system for only one user at a time. They are appropriate for computer dedicated to a single function, or which are so inexpensive as to make sharing not worthwhile. Single user systems generally provide a simple computer system, which facilitates the running of a variety of software packages (e.g. word processing or spreadsheet) as well as allowing uses to develop and execute programs of their own

BATCH PROCESSING: Batch processing was the first operating system – which consisted of ONE user and ONE CPU. The main purpose of this system was to enable the computer to move automatically from one job to another, without the operator having to intervene. In any computer system, the speed by which the CPU can execute instructions is much higher than that which other peripheral devices can reach. Thus, peripheral devices such as the printer, disk drives, and others, waste a lot of the CPU’s time, because they cannot process their part of the job as quickly as the CPU. This results in a large percentage of CPU idle time. Another inefficiency is that, when a small program is being run, most of main memory remains unused. Therefore, the most two expensive resources of the system – memory and time – are wasted. As processing speed and memory size increased with the advance in technology, the wastage became even greater. This is operating systems why continued to evolve from the simple batch system. So in batch processing jobs (that consist of data and programs) are queued. The computer would then process the jobs one at a time without further human intervention. Batch processing is still used nowadays – e.g. printing thousands of mailing labels or calculating all the telephone bills of the customers.

MULTIPROGRAMMING SYSTEM: The multiprogramming operating system could manage resources more efficiently. More than one user’s program can be resident in main memory at one time. In this system we also have ONE User and ONE CPU. MR NOEL ATTARD

PAGE: 73


COMPUTER STUDIES NOTES

In this system, multiple jobs are loaded into the central memory, and each is allotted some CPU-TIME, a tiny fraction of a second during which it receives the CPU’s attention. When a job’s CPU-TIME is up, it is suspended and control passes to the next job, which can continue from where it left off before. The TIME allocated to a job is called the TIME SLICE. In simpler terms the CPU is switched rapidly between the different programs. This means the system does not have to wait for one job to be completed before starting the next. When then for example one of the jobs is used a peripheral device - like printer to print, it TIME SLICE is given to the other jobs The simplest multiprogramming systems used a round-robin method, where each job received the same CPU-TIME. More sophisticated systems allowed priorities to be defined for each job, such that the job with the highest priority received the longest CPU-TIME. Such a system minimizes the amount of idle time of the CPU and the amount of unused memory. A complication arises when printing. What happens when two jobs are working concurrently (at the same time) and both are printing their results? A technique known as SPOOLING is adopted, where each job sends any output to be printed to a spool file on backing storage instead of directly to the printer. This spool file makes a queue of all files to be printed… at a first come first served bases. The general idea behind multiprogramming is that the computer is working on several programs, which are in memory at one time.

TIME-SHARING SYSTEM (MULTI-USER): In an interactive system, the user sits at a terminal, which is hooked up to the computer. The user can execute the job, and the output is expected to be reasonably instantaneous, even if other users are executing their own jobs on the same computer. So in this system we have MORE the one user but only ONE CPU. To meet these situations, the principle of time-sharing was introduced in the design of operating systems. The

MR NOEL ATTARD

PAGE: 74


COMPUTER STUDIES NOTES

aim of a time-sharing operating system is to give each terminal user a response time (called time-slice) of about three to five seconds – like in multiprogramming system. One must consider that even the fastest typist is slower that the CPU, and most people are not fast typists. Sometimes, several seconds or minutes might pass by while the user is deciding what to do next, or while thinking about the cause of an error in the program. The operating system would therefore poll each terminal every one or two seconds – that is, the computer makes an enquiry at the terminal by checking if any characters are present in the keyboard buffer. So the function of the keyboard buffer is to store any commands given by the user while the CPU attention was given to the other jobs. If there has been no activity since the last polling, the computer simply goes on to the next terminal. But if a new command has been issued, the computer will allocate a time-slice to the user. During this time, the computer devotes the full attention to this user. When the time slice is up or the user’s requests have been satisfied, the computer goes on the next terminal. A time-sharing system works on the same principles as a multiprogramming system, so when a user will start using the peripheral device, its time slice is given to the other users. The jobs to be outputted are then saved in the Spooler file and then executed one by one like in the multiprogramming system.

REAL-TIME SYSTEMS: Immediate processing and up-to-date information are major characteristics of a real-time system. Such a system, the information in files has to be located very quickly, and the updating of records must be fast. The system must be able to respond quickly to an enquiry otherwise it becomes impractical. In a real-time system a transaction is processed to completion at the time is occurs, ensuring that the information in the files reflects the true (real) situation. Examples of a real-time system would be: a flight reservation system, a banking situation – where data have to be processed immediately. There is also Critique real time system, where data have to be handled

MR NOEL ATTARD

PAGE: 75


COMPUTER STUDIES NOTES

more fast then normal timings – like in nuclear power station or space shuttle launching, were any faulty have to be shown MORE immediately then normal once.

NETWORKED SYSTEMS: As technology advanced, computers became cheap enough for all users of a system to have a microcomputer of their own. Of course, a stand-alone, single-user microcomputer can do a lot of work, but it has the following disadvantages: • Sharing data between different users becomes difficult. • Peripherals such as printers have to be bought for each microcomputer, and will lay idle for most of the time. Such considerations led to the development of networked systems, where many computers are connected together to facilitate the sharing of data and peripherals. A network operating system must handle the communication between the networked computers, managing the data traffic and the sharing of system’s resources.

EXAMPLES OF OPERATING SYSTEMS SOFTWARE: • • • •

UNIX Linux Windows MS-DOS

Sometimes, software may be specific to a particular operating system and would therefore not work under a different operating system, like in the case of MAC computers. Another name for Operating System is System Software.

MR NOEL ATTARD

PAGE: 76


COMPUTER STUDIES NOTES

18. NETWORKS NETWORKS TERMS: LAN WAN MAN TCP/IP CABLE MODEM FTP TOPOLOGY IP ADDRESS CAT 5 FIBER OPTIC CABLE BACKBONE

ETHERNET WIRELESS BPS BROADBAND

ADSL INTERNET INTRANET MAC ADDRESS CAT 6 BLUETOOTH NODE

SERVER PING PACKET HUB PROTOCOL EXTRANET VOIP COAXIAL CABLE TWISTED PAIR INFRARED SEGMENT

WHAT IS A COMPUTER NETWORK? ⇒ network is the interconnection of many computers and peripheral devices. ⇒ Networks make it possible for users to share resources for communication (hardware) and data (software) ⇒ It can be with wires or wireless

TYPES OF NETWORKS WHAT IS LAN? - Local Area Network A network in which the computer systems are all situated relatively close to each other. E.g. School Distance between the network is small What is WAN? - Wide Area Network A network in which the computers are geographically remote. Wide area networks make use of a range of connection methods including communication satellites What is MAN? - Metropolitan Area Network A communications network that covers a geographic area such as a city or suburb or university campus.

MR NOEL ATTARD

PAGE: 77


COMPUTER STUDIES NOTES

NETWORKS TOPOLOGIES Network topology is how nodes are connected to form a network.

POINT-TO-POINT Simplest connection. One computer connect to another computer.

BUS Each node is connected to one main communications line. With this arrangement, even if one of the nodes goes down, the rest of the network can continue to function normally. There is no hub in a bus/line network. Usually coaxial cable is used. Adv – users uses same line, cheap & easy to do, need small lengths of cables. Dis Adv – all terminal hear data, Terminators required at ends

STAR consists of several nodes connected to a central hub in a star-shaped configuration. Messages from individual nodes pass directly to the hub, which determines any further routing Adv – Easy to set up, No disruptions when moving devices, easy to detect faults. Dis Adv – Requires many cables, one line disconnection will only disconnect one node, if central hub fails then network will fail.

RING Messages travel in one direction around a ring from node to node. As each node receives a message, it checks the message address. If the message is not for that particular node, the message is regenerated and passed on. This regeneration allows messages to travel farther in a ring network than in other network configurations. Adding of nodes have to be done using great care. Adv – Relatively fast, Easy to detect faults, Dis Adv – Not easy to add/remove nodes, Requires more cables, all nodes are connected to the single backbone.

TREE / HYBRID Also known as hierarchical, it is a network where bus and star topologies are combined together. The tree network, branches out into many nodes, so hubs are linked to other hubs serially. Adv – Fast, no disruption, Easy to detect faults Dis Adv – Hard to setup, Loss of connection wire will disable lower ends nodes

MR NOEL ATTARD

PAGE: 78


COMPUTER STUDIES NOTES

MESH / MULTI-CONNECTED Such a network is used in LANs as well as WANs. In this type of network the terminals are interconnected directly with one another. Within LANs, mash networks are kept small. Each node acts like an intelligent hub – so able to receiver, processing and routing data. Adv – Fastest network, No disruptions, easy to detect faults Dis Adv – Hard to setup, great amount of wires needed.

WHAT IS A BACKBONE? The main cabling (wires) of a network, to which all of the segments are connected to.

WHAT IS A NODE? Any device (with an ADDRESS) that is connected to the network

WHAT IS A HUB? A central connecting device in a network that joins communications lines together in a star configuration. Passive hubs are just connecting units that add nothing to the data passing through them. Active hubs, also sometimes called "multi port repeaters," regenerate the data bits in order to maintain a strong signal, and intelligent hubs provide added functionality.

WHAT IS A ROUTER? A device that forwards data packets from one local area network (LAN) or wide area network (WAN) to another. Based on routing tables and routing protocols, routers read the network address in each transmitted frame and make a decision on how to send it based on the most expedient route (traffic load, line costs, speed, bad lines, etc.).

MR NOEL ATTARD

PAGE: 79


COMPUTER STUDIES NOTES

WHAT IS AN IP ADDRESS? An IP address is a logical address for a network adapter. The IP address uniquely identifies computers on a TCP/IP network. An IP address can be private - for use on a local area network (LAN) - or public - for use on the Internet or other wide area network (WAN). IP addresses can be determined statically (assigned to a computer by a system administrator) or dynamically (assigned by another device on the network on demand).

WHAT IS AN MAC ADDRESS? The MAC address is a unique value associated with a network adapter. MAC addresses are also known as hardware addresses or physical addresses. They uniquely identify an adapter on a LAN. MAC addresses are 12-digit hexadecimal numbers (48 bits in length). By convention, MAC addresses are usually written in one of the following two formats: MM:MM:MM:SS:SS:SS

MAC ADDRESSING VS IP ADDRESSING Whereas MAC addressing works at the data link layer, IP addressing functions at the network layer (layer 3). It's a slight oversimplification, but one can think of IP addressing as supporting the software implementation and MAC addresses as supporting the hardware implementation of the network stack. The MAC address generally remains fixed and follows the network device, but the IP address changes as the network device moves from one network to another.

CENTRALISED DATA: It is when data in a network is stored only one 1 computer. This is a good system as you only have to do one backup, but then if the server in down no data can be access from no one. More over as data have to pass all from one computer there might be some overloading traffic!!!

MR NOEL ATTARD

PAGE: 80


COMPUTER STUDIES NOTES

DISTRIBUTED DATA: It is when data in a network is stored on all computer branches and not only one 1 computer. This is a good system as is one branch is down only data from that branch cannot be accessed. On the other hand each branch have to do their own backups.

WIRED AND WIRELESS COMMUNICATION: Wired •

Ribbon Cable – consist of many copper wires laid near each other to form a belt formation. Data transfer is of 160 MBps

Twisted Pair Cable – consist of 2 or more insulated copper wires twisted around in pairs. Most of the world communication is built around this technology. There are the CAT 5 and the CAT 6 – which is more insulated for any interference. Transmission speed can go up to 100Mbps

Coaxial Cable – This wire consist of insulted copper, wrapped with solid or braided shield. It can have transmission speed up to 550Mbps. It is very durable and be used for outside and even underwater

Fiber Optic Cable – consist of thousand of thin glass strands(human hair) from where light pass then electricity. Data is not effected by electricity interference. Speed is about 30 Gbps.

Wireless •

Infrared (IR) Channels – used electromagnetic spectrum. Used for short distance at 4Mbps. (home TV remote)

Bluetooth / Wi-Fi (wireless fidelity) – make use of high frequency radio wave technology. (mobile phone sharing) – about 10Mbps.

Terrestrial Microwave – involves high speed radio transmission sent

through the planet atmosphere. It range is of 50Km and data transfer of 100Mbps.

MR NOEL ATTARD

PAGE: 81


COMPUTER STUDIES NOTES

19. PROGRAMMING LANGUAGES There are two main types of languages which are the High-level language and the Low-level language.

HIGH-LEVEL LANGUAGE: The High-level languages are theoretically machine-independent which means they are mainly machine code. The High-level languages are more powerful than the low-level languages. This language is used quite frequently; it is used in the PASCAL program and other programming software such as the BASIC. This language is written in English and also in machine code, this means it isn’t that difficult to learn and to begin with. Students usually begin learning and working with these high-level languages because it is easy to learn. Ultimately programs written in high-level language must be translated into machine language by a compiler or an interpreter. These languages are often described as problem-oriented languages.

LOW-LEVEL LANGUAGE: There are also the low-level languages which are more suited to sophisticated techniques because only machine code is used in them. These languages are harder to learn and to work on obviously. The low-level language is faster in execution then the high-level language and uses less memory when saved. These languages are not generally good for problem solving programs but are good for writing translator programs. These languages are also known and described as machineoriented languages. The low-level language is closer to the hardware than the human language. Two good examples of low-level languages are the Assembly language and the machine code.

TRANSLATORS: There are three types of translators which are the Assembler, the Interpreter and the Compiler.

THE ASSEMBLER: The assembler is some kind of software which translates the assembly language of the computer to machine code. The process when the assembly language is being translated to machine code is

MR NOEL ATTARD

PAGE: 82


COMPUTER STUDIES NOTES

called assembly. The assembler program is specific to a type of computer and is often provided as part of the systems software.

THE INTERPRETER: The interpreter translates and executes a program one statement at a time. The interpreter is actually a machine code program. It is used as an easy way of executing programs not in the machine code of the computer. Sometimes the interpreter may be slow, for example when an interpreted program contains a loop the speed will decrease because the analysis of each statement has to be repeated for each time round the loop.

THE COMPILER: Last but not least is the compiler. The compiler is a simple program which translates a high-level language program into a computer’s machine code or some other low-level language. The translation process is called compilation. The compilation involves the analyzing of the language structure of the source program checking if it is valid and then producing suitable machine code.

SOURCE CODE AND OBJECT CODE Source code and object code refer to the "before" and "after" versions of a computer program that is compiled. The source code consists of the programming statements that are created by a programmer with a text editor or a visual programming tool and then saved in a file. For example, a programmer using the ‘A’ language types in a desired sequence of ‘A’ language statements using a text editor and then saves them as a named file. This file is said to contain the source code. It is now ready to be compiled with an ‘A’ compiler and the resulting output, the compiled file, is often referred to as object code. The object code file contains a sequence of instructions that the processor can understand but that is difficult for a human to read or modify. For this reason and because even debugged programs often need some later enhancement, the source code is the most permanent form of the program. Source code – is the program written by the programmer in a programming language Object code – is the translation of the program into machine code done by the compiler or interpreter and ready for execution MR NOEL ATTARD

PAGE: 83


COMPUTER STUDIES NOTES

20. FILING SYSTEM SEQUENTIAL FILE: Sometimes called: serial file: is a file in which the records are stored in a specified order. For example, in record system this could be in alphabetic order of the surname or in n order of reference number.

RANDOM ACCESS FILE is a file where the records are stored sequentially, that is one after another, but can be directly accessed, as in a random file. This is done by u position of the data in the file as its address.

RECORD NUMBER is a unique number which identifies the position of a record in a data means that record number one identifies the first physical position and in that position. The concept of a record number is not used in some file structures such as random files and in some relational database system. Many data files can be processed serially by working through the file on at a time and, in this situation, the record number identifies the position of the record currently being processed. A record number may serve as a pointer.

ARCHIVE FILE is one containing data no longer in use, but held for historical purposes, perhaps for auditors. It is often stored away from the computer system, in a secure location.

BACKUP FILE is a copy of a current file kept as a security measure in case the original is corrupted in any way. As with an archive file it is often kept in secure location away from the computer system. Reference file is a special type of master file which is not updated during the job being processed. It contains fixed data that does not change. When changes are necessary, this will be achieved by a separate program.

MASTER FILE Including: transaction file is the principal source of data for an application. It holds data which is mostly static but which can be added to or amended by updating as necessary during processing. In a traditional commercial batch-processing application, such as a payroll,

MR NOEL ATTARD

PAGE: 84


COMPUTER STUDIES NOTES

the master file (of all employees) is updated by reference to a transaction file of hours worked in the current month, leave, sickness, promotions, etc.

GRANDFATHER, FATHER, SON - BACKUP FILES Grandfather, father & son are the three most recent versions of a file that is periodically updated, for example the master file in a batchprocessing application such as a payroll. The most recent, the ‘son’ file, is used for the next run of the program; if an error occurs that corrupts this copy of the master file, the ‘father’ version is still available, and can be used with an archive copy of the transaction file from the previous run, to re-create the damaged ‘son’ version. The ‘grandfather’ version provides an additional level of security. The file generation starts from the transaction file, which then leads to the reproduction of a master file. When a new master file is then created the old master file is called the father and now the new master file is called the son. This is a process that can be repeated more than once. For example: The newest master file becomes the son, the master file that was used to produce it becomes the father, and the original master file becomes the grandfather. All these files put together (grandfather, father, son) make the file generation.☺. The more files there are the update there is. These kinds of files are always awaiting some kind of action.

INDEX FILE: is a file used to access a large data file quickly. It contains key field data from the file that the index is for. The key data is in a format which can be searched quickly and the attached addresses are used to access the data.

MR NOEL ATTARD

PAGE: 85


COMPUTER STUDIES NOTES

21. APPLICATION SOFTWARE APPLICATION SOFTWARE: Applications programs are written to solve particular problems. There are basically two types. USER APPLICATION PROGRAMS: These are custom or bespoke programs written by the user (DIY), or a software house under contract, to perform a specific job. APPLICATION PACKAGES: An application package is a software package that is created for a specific purpose or industry. These are prewritten programs purchased ‘off the shelf ‘ or ‘taylor made’ by the user. They are very important to non-specialists, in the home or in business, and for beginners. There is a wide range and variety of packages which continues to increase. The quality continues to improve: packages are genuinely versatile and include such aids as on-line help facilities for ease of use. OFF SHELF SOFTWARE: Programs that are ready made for the general public. The end-user buys them from the computer outlets. For example: Microsoft Word, Corel Draw, Access, Excel, , Games. Benefits of buying off-the-shelf package: • Cheaper in price • Quicker and less costly • Proven and more tested • Documentation provided with package • User friendly • Automatically and free updates • May not fit 100% your need or your hardware TAYLOR MADE SOFTWARE: Programs written by the user himself, or ordered to be done for him by a software house to perform exactly the specific job he wants. Examples include an aeroplane autopilot control or programs used to create special effects in movies. Benefits of buying Taylor Made Package: • Every expensive • Takes time to do

MR NOEL ATTARD

PAGE: 86


COMPUTER STUDIES NOTES

• • • •

Will fit exactly to your needs No updates and if yes at a cost Little or no Documentation Will fit your hardware

FREEWARE SOFTWARE: This software can be loaded, used and modified by everyone free of charge. If you have a freeware software you can also share free with others. SHAREWARE SOFTWARE: This software can be used by everyone free of charge for a limited time, but the creator of the software retains the rights. If the user is satisfied with the software, he has to pay for the licence to continue using it. INTEGRATED PACKAGES: These combine word processing, spreadsheet, database, graphics and communications facilities into one program. There is no need to load separate programs or data and standard commands are used throughout. Such a package would include a number of application software that can share the same information. For example, cutting a selection from one application and pasting it in another application. Examples of integrated software packages include Microsoft Office, Corel Graphics Suite.. INTEGRATED ACCOUNTING PACKAGES: These comprise a number of program modules which make up all or part of an organization’s accounting system. Popular packages on microcomputers include Sage and Pegasus. APPLICATION-SPECIFIC PACKAGES: These can be used in a wide range of businesses but are written for a specific routine or application, e.g. payroll, stock control. OCCUPATION-SPECIFIC PACKAGES: These are designed for a particular vertical market, i.e. an identifiable group of users such as farmers, estate agents, hoteliers, dentists. By their very nature they sell less well and therefore tend to be more general packages which have a more widespread appeal. Look up a computer magazine called Micro Decision and check the specialized software section. This will give you a useful overview of the main types of vertical market software. MR NOEL ATTARD

PAGE: 87


COMPUTER STUDIES NOTES

SOFTWARE PACKAGES: This section gives a brief overview of the most popular software packages. These are: • Word processing • Database management • Spreadsheet • Graphics • Accounting • Desk-top publishing • Communications Popular packages include: • MS Office – includes a bundle of software with it. WORD PROCESSING (WORD): WP packages are in widespread use. There is little point in buying a typewriter nowadays as the benefits of WP significantly outweigh it. • Easy editing and correction – abolishes copy typing; • The output of ‘clean top-copy’ document; • Output in different formats and styles; and versions. • Storage of standard documents such as letters, contracts and minutes – different versions of them can be made up to meet different needs without having to retype everything. DATABASE MANAGEMENT - ACCESS: Information is vital to all business and a database is a collection of organized information stored in a way that makes it easy to find and present. All business keep records although they may not be efficiently organized or kept in one place. Many of them are ‘manual’ system held in a filing cabinet or card index. SPREADSHEETS - EXCEL: Spreadsheets are designed to manipulate numeric data. They are easy to use and have many applications particularly in accounting, statistics and mathematics. A spreadsheet is the electronic equivalent of an accountant’s ledger – a large piece of paper divided by vertical columns and horizontal rows into a grid of cells. The name derives from spreading the organization’s accounts on a sheet of paper. The program starts by showing a blank grid of cells and the user can directly enter one of three types of information into a cell: • Numbers • Formulae –referencing other cells • Text.

MR NOEL ATTARD

PAGE: 88


COMPUTER STUDIES NOTES

GRAPHICS PACKAGES: Graphics require a lot of main memory and usually a special circuit board (card) and a high resolution screen capable of displaying many small points of light – called pixels – if high definition is required. Graphics output on plotters or dot-matrix or laser printers. Graphics software can be classified as follows: • Business graphics • Computer-Aided Design (CAD) These packages demand more sophisticated kit and consist of special functions aimed at helping the graphic designer, architect, engineer or draughtsman to design products, buildings or parts. The screen becomes the canvas and a light pen (or mouse or digitizer) the equivalent of the brush or pen. They allow work of professional quality to be produces quite quickly and include such facilities. ACCOUNTING SOFTWARE - SAGE: Accounting systems are vital to all types of organization as the main internal source of information. Their importance and the fact that they are made up of a set of formal rules and procedures led to the early development and growth of computer-based accounting systems usually running on large (mainframe and mini) computers. Nowadays there are many popular accounting packages available for the small business which run on a microcomputer.

DESK-TOP PUBLISHING (DTP) – PUBLISHER: DTP packages are designed to help produce documents, newsletters, posters and other illustrated articles which combine large amounts of text with illustrations. They combine the features of word processing and graphics packages, placing particular emphasis on the format and style of presentation – a simpler version of the modern methods of newspaper composition. Standard graphics symbols and free-form drawings can easily be incorporated. From reading the advertisements for it, you might conclude that all a business needed to meet its ‘publishing and printing’ requirements was a micro, a printer and DTP package. So equipped, a secretary should be quite capable of saving the company the expense involve in putting printing work out to the trade. COMMUNICATION SOFTWARE: Packages such as Msn Messenger enable the user to send or receive files or programs to and from other computers – a very powerful feature nowadays. They usually offer links to most public electronic

MR NOEL ATTARD

PAGE: 89


COMPUTER STUDIES NOTES

mail and external database facilities. The software handles all the communications protocols, speeds etc. for you. Similarly, the software will automatically deal with incoming files, messages etc. from other users. THE EDUCATIONAL SOFTWARE: Software aimed at teaching or facilitating the teaching of certain topics. Example of educational software: • CBT – Computer Based Training • CAL – Computer Assisted (Assisted) Learning • CAI – Computer Aided (Assisted) Instruction • CML – Computer Managed Learning. SOFTWARE PROGRAMS TERMS: SITE LICENCE UPGRADES PATCHES

UPDATES

PLUG – Ins

DRIVERS

SKINS

A payment so that the program will be distributed to specified number of network terminals. Program enhancements that are made available only to the subscribers. Pieces of object code that are inserted (patched) into an already existing executable program to act as a temporary solution to a program bug. Every software is open to programming errors. When a number of errors have been found and fixed, the creator sends a new version of the complete and modified program to the registered users. Also known as ADD-ONs or SNAP-INs are small program modules created to act under the operating system’s controls. They interact with other programs already resident in the computer operating system to supplement certain features that will allow the end-user to complete his needs. Like the Active-X. Device drivers are small programs that allow the operating system to interact with the hardware peripherals. These programs instruct the operating system with the ways of how to control and communicate with a peripheral such as printers, hard disks, etc … Also known as Themes, are graphical accessories that enhance aesthetically the software as well as make the interface more userfriendly. Example: MSN Messanger,

PROGRAMMING LANGUAGES: A programming language is used to write computer programs such as • Applications • Utilities • Servers • Systems Programs

MR NOEL ATTARD

PAGE: 90


COMPUTER STUDIES NOTES

A program is written as a series of human understandable computer instructions that can be read by a compiler and linker, and translated into machine code so that a computer can understand and run it. A computer ‘works’ by executing a series of instructions – the program. A program can be written in a variety of programming languages. In order of development there are several ‘generations’ of languages: Machine & Assembly Language

PASCAL / BASIC / C++

Low-level languages

High Level Languages

High-Level & Low-Level Languages –> TRANSLATED TO Machines Language

MACHINE CODE A manufacturer designs a computer to obey just one language, its machine code, which will be represented inside the computer by combinations of binary digits. The set of binary codes which can be recognized by the computer is known as the machine code instruction set. INSTRUCITON FORMAT The instruction format of a machine code instruction has two main parts: • A function (or operation) opcode; • An address (operand).

e.g.

Op. code

Operand address

0 0 1 1

0 0 0 0 0 0 0 0 1 0

The function code tells the control unit of the CPU what to do with the item held in the address. For example, for one computer: 4 A 2 187 Instruction Address (op. code)code instruction for: ‘add the might be the hexadecimal machine

contents of storage location 187 to the contents of register 2’. MR NOEL ATTARD

PAGE: 91


COMPUTER STUDIES NOTES

The absolute address of each store location is a binary number which can be decoded so that when data is required from a memory cell the right location is selected.

LOW-LEVEL LANGUAGES Programming of the first stored-program computer systems was performed in machine language. This is the lowest level of programming language. All the commands and data values are given in ones and zeros, corresponding to the "on" and "off" electrical states in a computer. The programming process became easier with the development of assembly language, a language that is logically equivalent to machine language but is easier for people to read, write, and understand. But the limitations of the low-level languages – machines code and assembly – led to the development of high-level languages which are: • ‘user friendly’ (people based); • similar to English with vocabularies of words and symbols; • ‘problem’ rather than ‘machine’ based; • shorter than their low-level equivalents – one statement translates into many machine code instructions.

HIGH-LEVEL LANGUAGES A programming language in which the program statements are not closely related to the internal characteristics of the computer is called a high-level language. As a general rule, one statement in a high-level programming language will expand into several machine language instructions. This is in contrast to assembly languages, where one statement normally generates one machine language instruction. Example: PASCAL , BASIC, C++

PROGRAMMING LANGUAGE GENERATIONS In the computer industry, these abbreviations are widely used to represent major steps or "generations" in the evolution of programming languages. 1GL OR FIRST-GENERATION LANGUAGE – Low Level The first generation of programming language is a machine-level language that makes use of the binary system (0 and 1) as codes for the program. The system would then convert these codes into instructions. Machine-level language was fairly quick in execution since MR NOEL ATTARD

PAGE: 92


COMPUTER STUDIES NOTES

it is directly instructed by the CPU; however it is fairly confusing to learn and to edit since the programming language uses numerical representations of instructions that do not appear significant to a human user. Example: Machine code

2GL OR SECOND-GENERATION LANGUAGE – Low Level The second generation of programming language makes use of assembly language, meaning, it has a slight similarity with the human language, although it has to be converted into machine language (the binary system) in order to be executed. Each command is mapped into a set of binary codes, which the CPU performs in a similar way that it executes machine-level language. Normally an assembly language statement consists of a label, an operation code, and one or more operands. Labels are used to identify and reference instructions in the program. The operation code is a symbolic notation that specifies the particular operation to be performed, such as move, add, subtract, or compare. It has a significant speed advantage, although machine-level language is still quicker in execution due to its direct instruction into the CPU. The assembler (sometimes called "assembly") language is a typical 2GL instruction looks like this: ADD

12,8

An assembler converts the assembler language statements into machine language. Example: Assembler

3GL OR THIRD-GENERATION – High Level Third generation programming languages are designed for easier human use. General representations of human arithmetic and other logical operations are represented in third generation languages. 3GL language is a "high-level" programming language, such as Pascal, C, or Java. Java language statements look like this: public boolean handleEvent (Event evt) { switch (evt.id) { case Event.ACTION_EVENT: { if ("Try me" .equald(evt.arg)) {

A compiler converts the statements of a specific high-level programming language into machine language. (In the case of Java, the output is called byte code which is converted into appropriate

MR NOEL ATTARD

PAGE: 93


COMPUTER STUDIES NOTES

machine language by a Java virtual machine that runs as part of an operating system platform.) A 3GL language requires a considerable amount of programming knowledge. Programs are shorter then the other 1st & 2nd generation, and more easier to debug and transportable on different machines. Example: Pascal, Java 4GL OR FOURTH-GENERATION LANGUAGE – High Level Fourth generation programming languages were made to remedy the third generation language's flaws. While third generation languages performed complex functions in the program, the fourth generation language's objective was to lessen the error and quicken the process of the execution of the commands. This kind of language was designed for specific purposes, such as mathematical problem solving or systems engineering. An example of a 4GL is the query language that allows a user to request information from a database with precisely worded English-like sentences. A query language is used as a database user interface and hides the specific details of the database from the user. 4GL is designed to be closer to natural language than a 3GL language. Languages for accessing databases are often described as 4GLs. A 4GL language statement might look like this: EXTRACT ALL CUSTOMERS WHERE "PREVIOUS PURCHASES" TOTAL MORE THAN $1000

Example: Visual Basic, Access

5GL OR FIFTH-GENERATION LANGUAGE – High Level The fifth generation programming language was designed generally for the user's ease. The user does not specifically need to create an entirely new program, since the language is designed to solve the problems based on user input. The user does not need to worry about making the program; the program readily performs the required routine and algorithm with the necessary input. Fifth generation language is involved with artificial intelligence research. 5GL is programming that uses a visual or graphical development interface to create source language that is usually compiled with a 3GL or 4GL language compiler. Microsoft, Borland, IBM, and other companies make 5GL visual programming products for developing applications in Java, for example. Visual programming allows you to easily envision object-oriented programming class hierarchies and drag icons to assemble program components. Example: Lisp

MR NOEL ATTARD

PAGE: 94


COMPUTER STUDIES NOTES

OBJECT-ORIENTED LANGUAGES In object-oriented programming, a program is no longer a series of instructions, but a collection of objects. These objects contain both data and instructions, are assigned to classes, and can perform specific tasks. With this approach, programmers can build programs from pre-existing objects and can use features from one program in another. This results in faster development time, reduced maintenance costs, and improved flexibility for future revisions. Some examples of object-oriented languages are: C, Java, and Ada TRANSLATORS Is a computer program used to convert a program from one language to another (for example from a low-level language to machine code). This is general name for the three types of translation programs, assemblers , compilers and interpreters.

Source program Low-level language

Translator

Object Program

Assembler

Assembly Machine Language High-level language E.g. BASIC, COBOL

Interpreter or Compiler

TRANSLATORS FOR LOW LEVEL LANGUAGES ASSEMBLER: The translation program needed to translate mnemonics (the assembly code) into machine code. TRANSLATORS FOR HIGH LEVEL LANGUAGES INTERPRETER: The interpreter translates and executes each instruction at a time. The program runs slower since it is being translated to machine code during runtime. Debugging is easier since the interpreter stops on encountering an error.

MR NOEL ATTARD

PAGE: 95


COMPUTER STUDIES NOTES

COMPILER: The compiler translates the whole program completely, and then executes the machine language version. When using a compiler a programmer ends up with 2 versions of the program – the source code and the object code (.exe). The program executes faster. Compile-time errors are listed at the end of program compilation.

COPYRIGHT LAW In the US, unauthorized duplication of computer software products for simultaneous use constitutes copyright infringement and is punishable in a federal criminal action pursuant to 17 U.S.C. Section 506(a) by a fine of up to $25,000 and imprisonment for up to one year. In addition, federal civil penalties provided in 17 U.S.C. Section 504(c) allow the recovery of actual damages based upon the number of copies produced, or statutory damages. Where the copyright owner proves that infringement was willful, the court has discretion to increase the award of statutory damages up to $100,000 for each copyrighted product, which has been infringed. Finally, 17 U.S.C. Section 505 provides for the recovery of attorney’s fees by the prevailing party.”

SOFTWARE PROTECTION Software manufacturers spend great expense and effort in producing and marketing software, and therefore want to protect themselves against software theft (piracy). There are various software protection schemes a manufacturer can use to protect against software theft:

Security locks, or dongles, are hardware devices, which attach to a port on the computer. The software will check that the correct dongle is attached, and will not run if it is not.

Keyword protection is frequently used with cheap software. In this protection scheme, every time the software is run it will ask you to input a word from the manual, each time a different word from a different page.

MR NOEL ATTARD

PAGE: 96


COMPUTER STUDIES NOTES

Software registration is also intended as a deterrent against piracy. Someone who buys the original package receives a registration card, which he/she sends off to the software manufacturers. This entitles the user to various types of se such as free help, cheap updates etc.

Key disk protection uses specially formatted disks, which cannot be copied. Every time the software is run, it asks you to insert one of the original disks (called a key disk) into the disk drive. It then checks the disk, and if it isn’t the original the software won’t run.

TYPES OF SOFTWARE PIRACY INDUSTRIAL PIRACY Industrial Piracy occurs when an individual or group attempts duplication and distribution on a large scale for profit.

CORPORATE PIRACY The LAN is at the root of corporate piracy. By installing one copy of a software application on a LAN server, potentially hundreds of employees may gain unlicensed access.

RESELLER PIRACY Reseller Piracy involves computer hardware companies selling machines with illegal copies of software pre-loaded on their hard drives.

HOME PIRACY Home piracy includes everything, from trading disks with friends to running a not bulletin board for the purposes of illegal software distribution.

WHY SHOULD WE BUYING SOFTWARE 1. Buying original software ensures that you have the latest version, including manuals and all accompanying support material. 2. The software manufacturer will be able to help registered users if they encounter difficulties in using the software. 3. Product upgrades at reduced prices. MR NOEL ATTARD

PAGE: 97


COMPUTER STUDIES NOTES

4. Breaking the law. 5. Reduce virus risk 6. Why should I buy software, and then distribute it free of charge to others?

DATA PROTECTION ACT: It is a law which start that certain data with is sensitive stored on computer must be protected by passwords so that unauthorized users will not access it. Data Controllers are persons who check that this law is obey and no data is stolen!!! What must be done on stored data: o Delete old and unwanted file o Update frequently so data will be up to date o Create passwords so data will be secure o Do and protect backup of data.

DATA SECURITY: It is when you protect your data stored on the computer. It is done: • • •

by backup o (so no data is lost if something happens) by passwords o (so no data is stolen by unauthorized users) old data deleted o especial after updates or very old data

DATA INTEGRITY: It is when data inputted into the computer is 100% correct. This is done by the • • • •

Data preparation form o printed filled form MUST look like input screen Visual Check o after typing check with eyes Verification o typing x2 times by two different persons & compare Validation o different types of checking – type, range, etc

MR NOEL ATTARD

PAGE: 98


COMPUTER STUDIES NOTES

25. UTILITY PROGRAMS What Is A Utility Program?

Utility software (also known as service program, service routine, tool, or utility routine) is computer software designed to help manage and tune the computer hardware, operating system or application software by performing a single task or a small range of tasks. Some utility software has been integrated into most major operating systems. In simple terms a utility program is a system program that performs a common task, for example the transfer of data from one storage device to another.

Disk Formatting: One of the utilities is disk formatting. This prepares the disk for use and to be capable to accept data in that particular disk. To prepare a disk for use you want to formatted and so, it will initalise the disk. When you format a disk all records and data on it would be erased. The disk formatting would also create the file allocation table (FAT). In this process tracks and sectors are created.

Scandisk Scan disk is a system tool that is used to check a disk for logical a physical errors. Scan disk can even repair the damaged areas. Scan Disk is a utility in MS-DOS and Microsoft Windows systems which checks and repairs file systems and bad clusters on the hard drive. It was introduced in MS-DOS version 6.2. Previous versions of MS-DOS supplied only the simpler, purely text-based program CHKDSK. MR NOEL ATTARD

PAGE: 99


COMPUTER STUDIES NOTES

De-fragmentation (DEFRAG). De-fragmentation is a process also known as garbage collection. This process collects the separate files of the program and puts them all together, which can help improve the access speed of the disk and the performance of the system.

Antivirus. A virus is a program designed to make a computer system unreliable, many of which copy themselves between and within computers. A parasitic virus hides itself by an attachment and can take action in a particular date. A worm is a program that once activated can copy itself automatically. A Trojan is a program that performs a normal process in the computer but also performs another at the same time, possibly harmful. An antivirus can protect viruses. An antivirus is a program that is used to searches for viruses and when it finds one the anti virus would remove it.

WinZip WinZip is a tool to make working with Zip and other types of archives file easier. To add a document, you want to Zip that document. To Zip it you want to use the WinZip and follow the following steps. First you right click on the document and then select “Add to Zip file”. Firewall A firewall is a program that prevents viruses and Trojans from entering into the computer system It also prevents other users from entering into your computer system to cause damage – Example is the Norton Internet Security

MR NOEL ATTARD

PAGE: 100


COMPUTER STUDIES NOTES

22. COMPUTERS AT WORK WHERE COMPUTERS MIGHT BE MORE APPROPRIATE THAN PEOPLE • • • •

Repetitive tasks Easily automated tasks Mathematical calculations Dangerous situations

WHERE PEOPLE MIGHT BE MORE APPROPRIATE THAN COMPUTERS •

Computers have their limits. When you are unwell and visit your doctor, it is often a person to whom you want to talk. The human touch is important. Computers are very bad at recognising and interpreting shapes. They can take photographs and record images on video, but they have no understanding of the meaning of shapes, and will be easily confused when presented with two overlapping shapes. In time things may change, it was not very long ago that a computer was incapable of beating a chess grand master.

COMPUTER APPLICATIONS IN BUSINESS • •

Business administration systems: The classic use of a computer is to run business administration systems, and all aspects of this have now been computerised. Airline booking systems: Airline booking systems have long been computerised. This maximises profit for the airline companies and is often more convenience for the customer. Many of these airlinebooking systems have now also been integrated with online airline ticket sales. Insurance claims processing: All insurance companies use very large mainframe computers, combined with specialist software to manage their business. The software involved can handle all aspects of claims procedures. Online banking: Most banks now offer some form of online banking. This has the advantage to the bank that costs can be reduced. Some banks are completely online, with no physical branches at all. The customers benefit from 24-hour access to banking services. The downside is that this leads too many job losses in the banking industry and when things go wrong there is no physical person you can go and see and make your complaints to.

MR NOEL ATTARD

PAGE: 101


COMPUTER STUDIES NOTES

COMPUTERS APPLICATIONS WITHIN GOVERNMENT • • • •

Census: Every few years census details are taken and entered into large computer databases. This data can then be used to extract useful information and predict trends. Vehicle registration: All car and lorry details are kept centrally; this makes it easy to find the owners of cars, which can be useful for police, customs and security services. Revenue collection: Increasingly aspects of government revenue collection are being computerised, which in many cases involves online systems as well. Electronic voting: Governments are experimenting with online voting systems, often in response to low voter turnout. Security remains the main obstacle. COMPUTER APPLICATIONS IN HOSPITALS AND HEALTH CARE

• • •

Patient record systems: Appointment and record systems are computerised and centralised. Ambulance control systems: Ambulances are often centrally controlled and the computer systems can now integrate satellite positioning to pinpoint the location of each ambulance. Diagnostic tools and specialist surgical equipment: The modern intensive care facility is filled with computerised diagnostic equipment: monitor heart rate, blood pressure etc. COMPUTER APPLICATIONS IN EDUCATION

• •

Student registration and timetabling: These are programs designed to computerise school registration and do timetables. Computer Based Training (CBT): Computer Based Training (CBT) offers a low cost solution to training needs where you need to train a large amount of people on a single subject. As an alternative to training via CD/DVD, CBT can also be delivered via the Internet. Using the Internet as a homework resource: The Internet is the ultimate resource for getting the information necessary to complete a student’s homework. The Internet can also be used to set and collect homework (via email). Distance learning systems: E-learning is a term used to describe studying via the Internet. It can take many forms ranging from a simple web version of printed books, through to advanced use of video images with sound. In many cases there can be real-time two-way communication between the teacher and the student.

MR NOEL ATTARD

PAGE: 102


COMPUTER STUDIES NOTES

Advantages include: - One trainer can train many people at many different locations. - If the training is solely computer based, then the students can work at their own pace, and repeat parts of a course which they do not understand. Also the teaching can be at any time, 24 hours a day, 7 days a week. - Often e-learning solutions are cheaper to provide. Disadvantages include: - There may be no opportunity to ask a question of a real person. - The Internet connection may temporarily fail for some reason. - You may have to pay for the connection time, by the minute. - The download speed may be too slow for some forms of e-learning - Because of the increased time required to produce some types of elearning packages, the e-learning tutorials may not be available for some time following the release of a new version of software, or a new certification syllabus. OTHER COMPUTER APPLICATIONS & USE Computer Process Control: A digital computer is used to direct the operations of a manufacturing process. Includes the measurement of important variables (eg: temperature), execution of some optimizing strategy, actuation of such devices as valves and switches, and generation of reports. Robotics: A robot is a system with a mechanical body using computer as its brain. Integrating the sensors and actuators built into the mechanical body, the motions are realized with the computer software to execute the desired tasks.

Gas and Oil Exploration: Finding the right conditions for an oil trap, the right source rock, reservoir rock and entrapment. Tiny changes in the Earth's gravitational field that could indicate flowing oil can be measured.

MR NOEL ATTARD

PAGE: 103


COMPUTER STUDIES NOTES

Banks: Bank accounts are accessed through phone lines, ATMs and the Internet. A single plastic card and bank code will allow you access to your bank account 24 hours a day. Banks use computers to work out the interest on loans and saving accounts, keep track of how much money a bank is able to lend, compute how much money a bank may have at any given moment. Stock Control: This is the term used in business to denote the levels of stock a business has in its stores. The Stock Control software stores and maintains stock levels for the user and informs him/her when the stock of a particular product is low. E-Commerce: Electronic commerce is the idea of doing business electronically over the Internet. You select the items you wish to purchase and put them in your shopping cart. Then you are usually given the option to pay by cash, check or credit card. Air Traffic Control: A system by which airplanes are safely routed into and out of major airports, along established airways to airport traffic control centers. Space Travel: Computers have been used to keep the ships on course, plan their landing, and determine how long the return flight would take and how much fuel and oxygen would be used. Intelligent Cars: Collision-avoidance will be advance enough to totally drive a car without any driver assistance. The only thing the automobile operator will need to do is enter a destination.

Police: With the installation of laptop computers in police cruisers, police officers can submit reports and gather information from their cars, without having to come to the station.

MR NOEL ATTARD

PAGE: 104


COMPUTER STUDIES NOTES

Hospitals: When an alarm rings at the nurse's station the computer screen shows instantly that a patient is in trouble. Electronic sensors are taped to the patient's chest, attached to a computer which can signal an irregular heartbeat. Schools: Using Computer Assisted Instruction (CAI), to assist in learning. More and more classrooms and libraries are being connected to the Internet, where there is a large volume of information to be gathered and where tutorials, quizzes and lessons are available. Tele shopping: The use of telecommunications and computers to shop for and purchase goods and services. WHAT IS TELE-WORKING? Tele-working is a broad term which refers to people working at home connected to the rest of the organisation via a computer network. Some of the advantages of Tele-working - Reduced or zero commuting time - Greater ability to focus on one task - Flexible schedules - Reduced office desk space requirements Some of the disadvantages of Tele-working - Lack of human contact - Negative impact on teamwork - Self-discipline - Possible Employee Exploitation

What is email? Email allows you to send a message to another person almost instantly, anywhere in the world. It requires both computers to be connected to the Internet. As well as sending a text message, files can be sent as email attachments.

MR NOEL ATTARD

PAGE: 105


COMPUTER STUDIES NOTES

What is E-commerce? You can purchase directly via a Web site by selecting the goods or services which you require and entering your credit card details. When you send your credit card details these SHOULD be encrypted by the site operators so that no one can intercept your details. What is E-banking? The phrase e-banking relates to managing your money online. Instead of having to go to the local branch, or telephoning them, you can pay your bills online and move money from one place to another. Some online banks have no physical branches at all, making it a very profitable operation for the bank. There are security considerations relating to online banking, with numerous examples of poor security. The process of shopping online There are numerous web sites from where you can purchase online, the most famous of all being amazon.com as illustrated. Most Internet based shopping sites use a virtual “shopping cart� system. As you browse the site you can add any products you want to purchase to your cart. The advantages of e-commerce - Services available 24 / 7 - Large stock range - Detailed product information - Ability to compare prices - Equal delivery to town and country - Right to return defective goods The disadvantages of e-commerce - Possible Credit card Fraud - Is the web site genuine - What about returning faulty goods - Are covered when you purchase goods from another country? - Can you talk to a real person

MR NOEL ATTARD

PAGE: 106


COMPUTER STUDIES NOTES

23. THE INTERNET Sometime in the mid 1960's, during the Cold War, it became apparent that there was a need for a bombproof communications system. A concept was devised to link computers together throughout the country. The whole operation was referred to as ARPANET. Gradually, the Internet had gone from a military pipeline to a communications tool for scientists. As more scholars came online, the administration of the system transferred from ARPA to the National Science Foundation. The speed of the Internet has changed the way people receive information. It combines the immediacy of broadcast with the in-depth coverage of newspapers...making it a perfect source for news and weather information. Even with the multimedia excitement of the Web, Electronic Mail (email) is the most frequently used application of the Internet. Many people who have access to the Internet at school, home, and work, use the Internet for no other purpose than to send and receive email. The transmission of messages is done over communications networks. The messages can be notes entered from the keyboard or electronic files stored on disk. Some electronic-mail systems are confined to a single computer system or network, but others have gateways to other computer systems, enabling users to send electronic mail anywhere in the world. Companies that are fully computerized make extensive use of e-mail because it is fast, flexible, and reliable. Each email address you send is made up of certain components that help route it to the proper recipient: A computer system that is accessed by a user working at a remote location. Typically, the term is used when there are two computer systems connected by modems and telephone lines. The system that contains the data is called the host, while the computer at which the user sits is called the remote terminal. A computer that is connected to a TCP/IP network, including the internet. Each host has a unique IP address. The web began in the late 1980's when physicist Dr. Berners-Lee wrote a small computer program for his own personal use. This MR NOEL ATTARD

PAGE: 107


COMPUTER STUDIES NOTES

program allowed pages, within his computer, to be linked together using keywords. The document formatting language used to link documents is called HTML (Hypertext Markup Language.) Web sites contained more than just text, they also had sound and video files. These pages, written in the hyper-text mark up language, have "links" that allow the user to quickly move from one document to another...even when the documents are stored in different computers. Web browsers "read" the html text and convert it into a page like the one you are now looking at. Each web site has an address, or Uniform Resource Locator (URL). The URL contains a set of instructions that are read by the browser.

The www address that distinguishes one Internet site from another. Domain Names consist of at least 2 parts. The part on the left is usually the name of the company, institution, or other organization. The part on the right identifies the highest subdomain, such as .com, .biz, .org, etc. 1webbiz.com is a domain name To provide the infrastructure for a computer service. For example, there are many companies that host Web servers. This means that they provide the hardware, software, and communications lines required by the server, but the content on the server may be controlled by someone else A group of computers and devices on a network that are administered as a unit with common rules and procedures. Within the Internet, domains are defined by the IP address. All devices sharing a common part of the IP address are said to be in the same domain.

MR NOEL ATTARD

PAGE: 108


COMPUTER STUDIES NOTES

24. MULTIMEDIA Multimedia is the use of technology to better communicate information. This includes the use of digital video, interactive programs, Internet content, graphics, audio, 3-D animation, 2-D illustration and any other computer-delivered media. An electronic encyclopedia is an example of a multimedia application. Multimedia is and will be more introduced in almost every aspect of society such as houses, offices (presentations), libraries, films, etc. In fact, Multimedia Messaging Service (MMS) is a new standard in mobile messaging. Like SMS (Short Messaging Service), MMS is a way to send a message from one mobile to another. The difference is that MMS can include not just text, but also sound, images and video. It is also possible to send MMS messages from a mobile phone to an email address. Multimedia helps demonstrate subjects that require time, movement etc. to understand. It also supports different learning styles and adds interest to the learning materials. It highly supports those with special needs. So multimedia is the use of computers to present text, graphics, video, animation, and sound in an integrated way. Text: Words, sentences, paragraphs. This book, for example, consists of text. Text processing refers to the ability to manipulate words, lines, and pages. Typically, the term text refers to text stored as ASCII codes (that is, without any formatting). Objects that are not text include graphics, numbers (if they're not stored as ASCII characters), and program code. Graphics: Refers to any computer device or program that makes a computer capable of displaying and manipulating pictures. The term also refers to the images themselves. For example, laser printers and plotters are graphics devices because they permit the computer to output pictures. A graphics monitor is a display monitor that can display pictures. A graphics board (or graphics card) is a printed circuit board that, when installed in a computer, permits the computer to display pictures Video: Refers to recording, manipulating, and displaying moving images, especially in a format that can be presented on a television. Another example is the displaying images and text on a computer monitor. The video adapter, for example, is responsible for sending

MR NOEL ATTARD

PAGE: 109


COMPUTER STUDIES NOTES

signals to the display device. A recording produced with a video recorder (camcorder) or some other device that captures full motion. Animation: A simulation of movement created by displaying a series of pictures, or frames. Cartoons on television is one example of animation. Animation on computers is one of the chief ingredients of multimedia presentations. There are many software applications that enable you to create animations that you can display on a computer monitor. Note the difference between animation and video. Whereas video takes continuous motion and breaks it up into discrete frames, animation starts with independent pictures and puts them together to form the illusion of continuous motion. Long touted as the future revolution in computing, multimedia applications were, until the mid-90s, uncommon due to the expensive hardware required. With increases in performance and decreases in price, however, multimedia is now commonplace. Nearly all PCs are capable of displaying video, though the resolution available depends on the power of the computer's video adapter and CPU. So Multimedia is the integration of TEXT, GRAPHICS, VIDEO, ANIMATION and SOUND integrated together as on thing. So a multimedia program, is a program were you will find sound, good graphics, text and animation mixed together. Nowadays nearly all programs and games are being designed as multimedia – more beautiful and more user friendly. Even the computer must have larger memories and good graphics installed in order to run these programs.

CLI vs GUI COMMAND LINE INTERFACE: Short for command line interface, a user interface common to MS-DOS computers. The user sees the command line on the monitor and a prompt that is waiting to accept instructions from the user. The user types in the command, the computer acts on that command and then issues a new prompt for the next

MR NOEL ATTARD

PAGE: 110


COMPUTER STUDIES NOTES

instruction from the user. CLI operating systems are becoming less used as GUI operating systems gain in popularity. In a GUI operating system, such as Windows, the user responds to graphic images on the screen instead of typing in commands in response to a prompt GRAPHICAL USER INTERFACE: A program interface that takes advantage of the computer's graphics capabilities to make the program easier to use. Well-designed graphical user interfaces can free the user from learning complex command languages. On the other hand, many users find that they work more effectively with a command-driven interface, especially if they already know the command language. Graphical user interfaces program, such as Microsoft Windows and the one used by the Apple Macintosh, feature the following basic components: Pointer : A symbol that appears on the display screen and that you move to select objects and commands. Pointing device : A device, such as a mouse or trackball, that enables you to select objects on the display screen. Icons: Small pictures that represent commands, files, or windows. By moving the pointer to the icon and pressing a mouse button, you can execute a command or convert the icon into a window. Desktop : The area on the display screen where icons are grouped is often referred to as the desktop because the icons are intended to represent real objects on a real desktop. Windows: You can divide the screen into different areas. In each window, different program by run or display. Menus: Most graphical user interfaces let you execute commands by selecting a choice from a menu.

MR NOEL ATTARD

PAGE: 111


COMPUTER STUDIES NOTES

26. TURBO PASCAL Pascal is an influential imperative and procedural programming language, designed in 1968/9 and published in 1970 by Niklaus Wirth as a small and efficient language intended to encourage good programming practices using structured programming and data structuring. PASCAL RESERVED WORDS? Write or writeln (‘Text’): displays what seen on the screen Readln: reads an item from the user and places it in the variable Clrscr : Clears the screen Uses crt: Calls a library of commands, which helps graphics Textcolor (color): changes the color of the text Begin - End : to start and end a body of a program Var – to declare variables CONST – to declare a constant Program - to start a program in pascal Procedure – to start a procedure Function – to declare a function INPUT STATEMENT: In Pascal an input statement is achieved by using Readln. Readln can be used with text as well as a numeric value. Readln on its own may be used to pause the program until ENTER is pressed. OUTPUT STATEMENT Is achieved by using either Write or Writeln. Writeln with single quotes outputs text. Writeln without single quotes output the value. Writeln on its own outputs a blank line. WHAT ARE VARIABLES? Variables are placeholders in memory A variable must be declared as one a data type Var {stands for variable declaration} X: integer – hold one number in variable X WHAT ARE CONSTANTS? Its is when a name is give a value at the beginning of the program, but it is not like in the case of a variable where the value can be changed, in fact its value cannot be changed. CONST {stands for constant declaration} Pi = 3.142 { pi will be equal to 3.142 when called} MR NOEL ATTARD

PAGE: 112


COMPUTER STUDIES NOTES

WHAT ARE ARRAYS? Arrays are a special form of table in which the data is stored by position, for example 1 2 3

OVETT COE CRAM

3:52 3:55 3:56

Ticket type Bristol awayday m idweek ordinary

Hull 20 24 33

Newcastle 24 30 43

28 33 58

Arrays are important because the computer need store the data, and the data, and the location of the first data element. The location of any other item may then be determined by addition. Rather than a single column of data (as above) an array may also appear as a two-dimensional table with both rows and columns. For example, the students in a particular school may be categorized according to year and subject studied. - X:array [1..5] of integer – holds 5 numbers in n[1], n[2]… SOME VARIABLE DATA TYPES: Byte : can store a number between 0 and 255 Integer : can store a number between –32768 to 32767 Real : can store a number which are positive, negative, whole or fractional. Char : can store a single character @; t; 6 String : can store a set of zero or more characters Boolean : True or False – 1 or 0 PASCAL MATHEMATICAL FUNCTIONS: • • • • • • • • • • • • •

ROUND (x): returns value of x to the nearest whole number. TRUNC (x) : returns the number before the decimal point INT (x) : returns the number before the decimal point SUCC (x) : returns x + 1 ; the successor of x PRED (x) : returns x – 1; the predecessor of x SQR (x) : returns the square of x SQRT (x) : returns the square root ABS (x) : absolute value (positive number value) EXP (x) : returns to the power of SIN (x) : returns the sine COS (x) : returns the cosine ARCTAN (x) : returns the arctangent Ord (x) : returns the ASCII value for a character

MR NOEL ATTARD

PAGE: 113


COMPUTER STUDIES NOTES

MATHEMATICAL OPERATIONS: +

is used for addition

-

is used for subtraction

*

is used for multiplication

/

is used for division

mod returns a remainder div

returns the integer

WHAT ARE CONDITIONS? Pascal uses Boolean expressions as a variable: True / False Pascal also supports other expressions: = is equal to <> not equal to > greater than < less than >= greater than <= less than and equal to and equal to

IF…Then… Else…or CASE Statement Pascal uses: • IF…Then… Else… as conditional statements. • Or IF…Then …for a number of times • Or the CASE statement If it rains, then I’ll go to the cinema. If x= 0 then write (‘wrong’); If it rains, then I’ll go to the cinema otherwise I’ll go for a walk. If x= 0 then write (‘wrong’) else write (‘correct’);

WHAT ARE LOOPS? A loop in its simplest terms is a structure that make a block of instructions repeat any number of times. In Pascal there are 3 main loops • FOR To Do … used for a definite amount o For x:= 1 to 10 do • WHILE… DO… indefinite amount o While x:= 1 to 10 do • REPEAT… UNTIL (the condition) …indefinite amount

MR NOEL ATTARD

PAGE: 114


COMPUTER STUDIES NOTES

WHAT ARE PROCEDURES AND FUNCTIONS? By means of procedures and functions a Pascal program can be split up into many smaller parts. These procedures and functions would have a name and then they will be called from the main program to do something. The procedures and functions have to be declared before the main program. The only difference between a function and procedure is that a procedure just do something, while a function will return with a value. • •

Procedure add; Function add:integer; – so name add will contain a value

INLINE DOCUMENTATION It is when comments or help are added within { …} in a program in order to explain parts of a program for further reference or to other programmers.

ASSIGNMENT STATEMENT It is when a variable is assigned to a value or the answer of a formula. X:= Y + Z;

WHAT TYPES OF ERRORS CAN I GET? • SYNTAX ERRORS: o With syntax errors the program will not work. Syntax error is when so words are misspelling. o Example - (WRIBELN) • LOGICAL ERRORS o In logical errors the program will still work but will be giving the wrong answer. o Example of logical errors is when using (+ instead of *). • RUN-TIME ERRORS o errors which occur during the running of the program o Example - (division by 0 or infinite loop). PROGRAMMING TERMS: • BUG – an error in a program • DEBUG – finding errors in a program • DRY RUN – running a program on a paper • TRACE TABLE – a table used in dry run to variables values • EXECUTABLE – a program ready to be run • PROGRAM LISTING – printout of the program

MR NOEL ATTARD

PAGE: 115


COMPUTER STUDIES NOTES

27. DOCUMENTATION The purpose of documentation is to help the understanding of a program for both those who use it and those who modify it. Documentation are importance because: 1. User must know how the program works in order to use it. 2. If program have to be modified the programmer must understand the program listing and its variables 3. If a team are working on a programming project, every team must know what each team is doing 4. If the programmer should leave the company, the one who takes over must know how each program is working. There are two section of documentation which are: • Technical Documentation – for Programmer • Non-Technical Documentation – for User PROGRAM DOCUMENTATION: Is a technical documentation, and is necessary because if the program is to be changed in the future, people must know how and what to modify the program. To do this, they must have a write up of the program of the variables, procedures, flowchart, input and output of the program. A program include:

documentation

should

1. A description in English of what the program does – what is it function (Input and Output) 2. List of variable use and procedures use and what they do. 3. Algorithm in a form of a flowchart or Pseudo code 4. Program listing (print out of the program. for further help, inline documentation with the program, with be very useful, to help you understand the program 5. List of instructions needed to operate the program

MR NOEL ATTARD

PAGE: 116


COMPUTER STUDIES NOTES

6. Test data samples inputted and the output they produce (test data is data used to test if the program works properly, i.e. 100% ok) 7. Trouble shooting of the program

INLINE DOCUMENTATION makes the program more readable and easy to update. Example: {this procedure works out the area} • to be used near procedures • to be used near each variable (to know what is used for) • General information about program

USER MANUAL : is a non technical manual and must be written so that non specialised used can use this software with the least effort. It will explain what to do if the user finds a difficulty, he would know what to do. It will include error messages that the user might encounter when using this program. Sometimes a short training session is included to help the user to understand more the program.

OPERATOR MANUAL is a non technical documentation and is used only in multi user system where the system is not run only by the user himself. The operator manuals describe in details, all the needs to be done to execute a system. The contents should be clear and the requirements of the operation by sections should be illustrate. Ex: data capture, data control, data preparations, operations. Etc… It should be designed to enable problems to be solved without continual reference to the programmer. This manual is not found in a single user package.

MR NOEL ATTARD

PAGE: 117


COMPUTER STUDIES NOTES

28. ABBREVIATIONS & TERMINOLOGY Item ADSL Bit Bps Byte CAD CAL CAM CBT CD CD-R CD-ROM CLI CPS CPU DAT DOS DSL DTP DVD FTP GIGO GByte GHz GUI HTTP Hz IP IS ISDN IT KByte LAN MByte MAN MHz PC PPM POS PSTN RAM ROM ROM-BIOS

Meaning Asymmetric Digital Subscriber Line 1 or 0 level of storage is called a bit Bits Per Second A measurement of storage capacity Computer Aided Design Computer Aided Learning Computer Aided Machine Computer Based Training Compact Disk Compact Disk - Recordable Compact Disk - Read Only Memory Command Line Interface Character per Second Central Processing Unit Digital Audio Tape Disk Operating System Digital Subscriber Lines Desk Top Publisher Digital Versatile Disk File Transfer Protocol Garbage In Garbage Out Gigabyte. A gigabyte consists of 1024 MBytes Measurement of computer speed. Gigahertz Graphical User Interface HyperText Transfer Protocol Hertz ( this is a measurement of frequency (i.e. speed). Internet Protoct Information Systems Integrated Services Digital Network Information Technology Kilobyte. A kilobyte (KB) consists of 1024 bytes. Local Area Network Megabyte. A megabyte (MB) is one million bytes Metropolitan Area Network Million Hertz Personal Computer Page per Minute Point of Sale Public Switched Telephone Network Random Access Memory Read Only Memory Read Only Memory - Basic Input Output System

MR NOEL ATTARD

PAGE: 118


COMPUTER STUDIES NOTES

RSI TFT TByte UPS USB VDU WAN WWW

Repetitive Strain Injury Thin Film Transistor Terabyte. A terabyte (TB) is one million Mbytes Uninterruptible Power Supply Universal Serial Bus Visual Display Unit Wide Area Network World Wide Web

MR NOEL ATTARD

PAGE: 119


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.