Computer Studies Support Booklets

These five booklets cover the CIE computer studies syllabus theory (0420/1, 7010/1). They should be used in conjunction with the appropriate syllabus topic. Each booklet also contains exam-type questions. The questions could be used either for revision or in timed tests to give students experience at answering questions under examination conditions. Whilst there are several examples on each topic, it is not envisaged that students would use these booklets as their sole source of information. These booklets don’t replace good teaching and should be used as an additional resource together with text books and web-based knowledge systems. Since computer studies, by its very nature, is a rapidly changing subject these booklets will be reviewed on a regular basis to ensure they contain the latest technological advances. Teachers of the subject are encouraged to keep abreast of the latest developments in computing and apply their new knowledge in the teaching of this subject. Students should find computer studies both exciting and stimulating and it is hoped that these booklets will help students in their thirst for knowledge and encourage further learning.

Booklet 1

This covers the following topics found in section 1 of the computer studies syllabus: Item 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Topic Computer aided design Virtual reality systems Monitoring and control Embedded web technology Robotics Global positioning satellite (GPS) systems Expert systems The internet Simulations Training and entertainment systems Computer based training Communications (including video conferencing) Intranets Further applications Problems based on section 1 topics

Booklet 2

This covers the following topics found in section 2 of the computer studies syllabus:

Item 1 2 3 4 5 6 7 8

Topic Feasibility study Analysis Design Implementation System maintenance and evaluation Project tools Systems flowcharts Problems based on section 2 topics

Booklet 3

This covers the following topics found in section 3 of the computer studies syllabus:

Item 1 2 3 4 5 6 7 8 9 10 11

Topic Common flowchart symbols Writing flowcharts to solve problems Dry running of flowcharts Problems based on flowcharting Pseudocode Writing algorithms using pseudocode Problems based on pseudocode Introduction to logic Description of common logic gates Combinations of logic gates Problems based on logic

Booklet 4

This covers the following topics found in section 4 of the computer studies syllabus:

Item 1 2 3 4 5 6 7 8 9 10 11 12 13 14

Topic Automatic data capture Validation techniques Check digits Verification techniques Files Binary data Word processors Desk top publishing (DTP) Spreadsheets Databases (DBMS) Authoring software “Off the shelf”/bespoke software Macros Problems based on section 4 topics

Booklet 5

This covers the following topics found in section 5 of the computer studies syllabus:

Item 1 2 3 4 5 6 7 8 9 10 11

Topic Hardware Computer memories External storage systems Credit cards and smart cards Sensors Operating systems Batch processing Real time systems Network topology Multimedia applications Problems based on section 5 topics

Booklet 1

This covers the following topics found in section 1 of the computer studies syllabus: Item 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Topic Computer aided design Virtual reality systems Monitoring and control Embedded web technology Robotics Global positioning satellite (GPS) systems Expert systems The internet Simulations Training and entertainment systems Computer based training Communications (including video conferencing) Intranets Further applications Problems based on section 1 topics

1

Page numbers 2 3 5 6 6 7 9 11 14 17 18 19 21 21 23

This booklet contains a number of examples of computer applications and ties in with section 1 of the computer studies syllabus. 1.1

Computer-Aided Design (CAD)

CAD is used in the design and development of new products in a variety of applications both at home and on a commercial/industrial basis. Examples of typical CAD applications include: -

aerospace architecture car/vehicle design construction (e.g. roads, services, surveying, tunnels, bridges, etc.) consumer goods (e.g kettles, toasters, etc.) digital circuits factory layouts (e.g. ergonomics) fashion design garden/landscape gardening heating systems interior designs (houses, offices, etc.) lighting systems (e.g. to get lighting effects at a concert) machinery design plant design (chemical, nuclear, etc.) ship building

CAD systems usually require considerable processor power and a number of input and output devices; for example: -

large screens light pens devices such as trackerballs, mouse and graphics tablets plotters to draw scale and full size drawings high specification graphics cards spacemouse/spaceball some systems support stereoscopic drawings where 3D spectacles can be worn and the user sees a 3D image

The features usually found in a CAD package include: -

wire frame 2D and 3D modelling library of parts which can be used in new drawings validation and verification of designs against original specification ability to link with computer-aided manufacture (CAM) facility to calculate the mass of the actual object once built facility to calculate the cost of producing the article features such as rotation, colour, zoom, etc. simulation of designs without the need to build a prototype create engineering drawings from solid models import and export to allow the exchange of data with other software packages kinematics (i.e. check moving parts in assemblies don’t interfere with each other) routing of cables and hoses

2

There are many advantages and disadvantages of using CAD rather than manually producing drawings using pen and paper: advantages of CAD

disadvantages of CAD

-

-

it is easier to modify drawings a library of parts can be kept ability to do automatic costings ability to model the design can do ergonomic study

risk of deskilling high training costs to use packages can move work overseas one CAD operator can do work of 5 manual draftsmen

Developments CAD packages can now be linked to 3D ink jet printers which produce an actual prototype model by building up slices/layers in fine powder (e.g. resin) which are bonded by an adhesive from the print head. The models produced actually work. This saves time and money since an actual prototype doesn’t need to be made.

1.2

Virtual Reality (VR)

This is an artificial 3D environment created by a computer system. Very often the user wears data goggles, data helmet or data gloves to give a feeling of “being there”. Apart from feeding sensory input to the user, these devices also monitor user actions e.g. data goggles track eye movement and respond by sending new video input. As indicated above, a number of devices are used to interface with virtual reality systems. These can be summarised below: Data goggles/helmets – these use display screens and optical systems that send 3D images to the eyes. Motion sensors measure the position and orientation of the head; this information is sent back to a computer which enables it to adjust the image being sent to the user. Data gloves, suits containing sensors and joysticks are all used to interface with a virtual reality system depending on the application. The CAVE is a VR system which provides the illusion of 3D by projecting images on the walls and floor of a room. Participants wearing data goggles can enter the room and freely walk about. Sensors in the goggles and in the room continually track the participants’ position and adjust the images based on this information.

(

3

projectors

)

Areas of use Entertainment

Used in films/television as special effects (e.g. the “holodeck” in Star Trek: The Next Generation and the Brazilian tv show Conquista da Titã where the studio audience wear VR helmets in a space simulation). Virtual reality is also used in many computer arcade games.

Marketing

Used in virtual tours around houses and hotels, kitchen designs, ergonomics, etc.

Training

Areas of use include: military training, medical/dental training, teaching personnel how to use equipment and in general areas where training is dangerous and/or expensive e.g. flight simulators, car driving simulators, operating devices under water or in outer space, etc.

Design

Design of chemical and nuclear plants, ergonomic studies (e.g. factory layouts), helping to develop devices for handicapped people, etc.

How we create virtual reality images for use on a computer system When a virtual tour of, for example, a house is shown on a website the images need to be first created and then manipulated. The following summarises how this can be done (a similar method/technique could be used for various applications): -

take photos with, for example, a digital camera the photos are taken from a single point (reference point) the camera is rotated around the room as a number of photos are taken the images are “stitched” together using special imaging software photo images are re-sized and re-configured for Internet use use hotspots on the web page to allow a user to move around the house (e.g. from room to room). Integrate plans and maps into the image to allow user to navigate the house. - developments such as broadband, large computer memories and compression software have allowed virtual tours to be offered on the Internet and/or CD/DVD files. Advantages of using virtual reality - it is safer (since techniques can be tried out in advance without the dangers of the real operation e.g. maintaining a nuclear plant where it is possible to try a task on a computer first to learn how to do it; if mistakes are made the results would be harmless; e.g. doing a medical task on a “virtual” patient is much safer in case of mistakes, etc.) - cost savings (no need to build the real thing which could save large sums of money e.g. testing out a real moon buggy or building a part of a chemical plant would be very expensive). - it is possible to do tasks which would normally be impossible (e.g. walking inside a nuclear reactor, doing a task in outer space, etc.) - there is a feeling of “being there” which makes the training more realistic and can allow a number of very realistic scenarios to be tested out e.g. how to deal with an emergency on a chemical plant which could be made to be really realistic!!

4

1.3

Monitoring and control

Examples of use Monitoring

hospitals (monitoring patient’s vital signs), chemical and nuclear plants (monitoring key parameters), burglar alarms (monitoring for intruders), etc.

Control

traffic lights (controlling the sequence of lights to maintain optimum traffic flow), chemical and nuclear plants (opening and closing valves, safety systems, etc.), etc.

How it is done - sensors gather information from the application being monitored or controlled - the data being gathered is often analogue in nature and therefore requires translating into digital using an analogue to digital converter (ADC) to enable the computer or microprocessor to “understand” and process the data from the sensors - the computer or microprocessor will compare the incoming data with the data values stored in memory - if monitoring, the computer/microprocessor system will warn the user in the form of a sound (e.g. a siren if a burglar alarm, a loud beeping sound if monitoring patients in a hospital) and/or read outs (e.g. heart rate trace in hospital monitoring system, temperature reading on a chemical plant). - if a control system, the computer will send a signal to a device which will be converted to analogue using a DAC (analogue to digital converter); actuators are usually employed to operate devices like valves, heaters, etc. - the device will be instructed to switch on or off (e.g. if controlling a central heating system, if temperature > set temperature a heater will be switched off and/or a cooling fan switched on; if the temperature is below the set point then the heating will be switched on and/or a cooling fan switched off) - the computer/microprocessor system will continually monitor the data coming from the sensors - in chemical and nuclear plants, there is often a combination of monitoring and control taking place. Information from sensors is often displayed on a control panel where operators can see key values and alarm conditions (e.g. if a system monitors temperatures and 1100C is the normal temperature and 1200C is the alarm temperature, the control panel will show normal, present and alarm values in the form of read outs – either the computer will automatically take action if necessary or the operator will take action (i.e. over-ride the system if necessary).

5

Why is this done? Monitoring and control using computers/microprocessors is often done for the following reasons: - it is safer (faster response to non-standard conditions and they don’t get tired and miss key data) - computers work 24/7 (even though humans can work in shifts there is always the danger of missing information at shift handover etc.) - computers are more accurate and can take more frequent readings (e.g. if readings need to be taken every 30 seconds, humans can make mistakes or miss readings or even find it impossible to take readings at such short time intervals) - data can be automatically displayed and analysed without the need to enter data manually (which in itself could introduce errors into the system)

1.4

Embedded Web Technology (EWT)

This is a new technology that uses the Internet in real time to control/interact with a device which contains an embedded system/microprocessor. The user needs to be authorised to do this and can control a device anywhere using a web browser (e.g. from a computer or even a mobile phone which is web-enabled). Example: An oven contains an embedded processor. The owner can use a webready mobile phone anywhere to control the oven remotely. By accessing a web site he is able to send instructions to control the oven. It is possible to control any device in this way if it contains an embedded processor e.g. television, DVD player/recorder, washing machine, scientific experiments in remote areas such as outer space.

1.5

Robotics

Robots can contain embedded processors or be linked to a computer system. They are pre-programmed to do a specific task or “taught” to remember instructions from a human operator carrying out the task manually e.g. teaching a robot to spray a car with paint. In summary: -

the robot is programmed with a series of instructions which enable it to carry out a series of tasks - alternatively, an operator manually carries out a series of tasks which are relayed back to the robot; these instructions are remembered so that the robot can carry out the tasks automatically Robots rely on processors and sensors. The sensors gather information so that the robot knows it is alright to do the task (e.g. is a car in position to be sprayed, is there an obstruction to prevent the robot doing its task, if the robot is spraying a car has the supply of paint run out, etc). They are capable of doing some pseudo-intelligent tasks (e.g. different sized cars to be painted) but essentially any non-standard routine is better dealt with by human beings.

6

Advantages of using robots -

they are capable of working in conditions hazardous to humans they can work non-stop; they don’t need a break less expensive in the long run since robots don’t need to be paid any wages generally more productive (can usually do a given task in a shorter time than a human) - not necessarily more accurate than humans, but the standard of work is certainly more consistent - removes the need to do boring, very repetitive tasks leaving humans free to do the more skilled work such as quality control etc. Disadvantages of using robots - they can find it difficult to deal with “unusual” circumstances e.g. a door is missing from a car waiting on the paint spraying line - tend to reduce labour requirements (therefore causing unemployment) - since robots take over many of the tasks done by humans de-skilling is a real risk - work can be done anywhere, therefore factories can be moved to anywhere in the world (again a cause for unemployment risks)

1.6

Global Positioning Satellites (GPS)

Global positioning satellite (GPS) systems are used to determine the exact location of a car, airplane, ship or any conveyance which travels from one place to another. In vehicles these systems are often referred to as satellite navigation systems (sat nav). Satellites in outer space transmit signals to the Earth. Computers in vehicles (e.g. car, airplane or ship) receive and interpret these signals. Positioning depends on very accurate timing – atomic clocks are used because of their accuracy to within a fraction of a second per day. Each satellite transmits data indicating its position and time. The computer in the vehicle calculates its location based on the information from at least three satellites (in the case of airplanes, it is also possible to determine the height as well as position); this can be shown diagrammatically as:

7

satellite 1

Exact location of vehicle

satellite 2 satellite 3

In motor vehicles the system is called satellite navigation (sat nav). The on board computer contains pre-stored road maps. The vehicle’s exact location, based on satellite positioning, can be shown on the map; the driver can then be given verbal directions e.g. “turn left into Pendle Road” OR a screen output showing the vehicle moving on the map:

The blue dot shows the position of the vehicle on a map projection in the vehicle. The sat nav system will show the blue dot moving indicating the exact position of the vehicle.

High Street

Pendle Road Morson Road

Dean Street

Sat Nav Map

This is far safer since a driver of a vehicle doesn’t have to consult maps whilst driving. It also removes error (e.g. going the wrong way down a one-way street). Sat nav systems can also give additional information such as position of speed cameras, estimate time of arrival, etc. GPS can now be used to monitor a vehicle’s position if it has broken down (additional safety feature) or has been stolen (known as vehicle tracking system). In airplanes GPS can also pinpoint its exact location in case of an accident which enables search teams to quickly respond to the incident.

8

What can go wrong? - maps not up to date therefore instructed to carry out an incorrect manoeuvre (e.g. turn into a road which no longer exists) - unless the system is very sophisticated, road closures due to accidents or road works will cause problems to a sat nav system - signal loss can cause problems with GPS systems - potential interferences from external sources (major problem on aircraft) - incorrect start and end point keyed into system (!!!)

1.7

Expert Systems

These systems have been developed to mimic the expertise and knowledge of an expert in a particular field. For example: - prospecting for oil or minerals - diagnosing a person’s illness - diagnostics (e.g. finding faults in a car engine, finding faults on a circuit board, etc.) - tax and financial calculations - complex “thinking” tasks such as chess - route scheduling for delivery vehicles - identification of plants, animals and chemical compounds (for example) The Basic System A basic expert system is made up of the following elements:

Explanation system Working Store User Interface

Inference Engine

Knowledge Base (Knowledge Base) Editor

Expert System Shell (Note: The Working Store contains the Facts and Rule Base)

9

Setting up an Expert System -

information is gathered from experts in the field the knowledge base is created information gathered from experts is added to the knowledge base the rule (base) is created the inference engine is created the user interface is designed/created (often use Yes/No options or multichoice)

The system, once set up, needs to be tested using data with known outcomes to see if it functions correctly. If it is being used to diagnose faults, the expert system will output the probable fault and how to rectify/deal with the problem. Usually a % probability of the accuracy of the diagnosis will be given so the end user can decide whether or not to accept the recommendations. How does it work? Consider this set of questions? Q: A: Q: A: Q: A: Q: A: Q: A:

Do you know which car you want? No Is there any make of car you would prefer? No Do you want 2 doors? No Do you want high performance? Yes When you have a big engine, do you need a manual gearbox? Why?

The system uses a rule base and an inference engine together to simulate human reasoning when analysing a problem and arriving at a conclusion. To simulate human processes it is necessary to have a vast amount of information stored in the knowledge base and the reasoning set out as a set of rules in the rule base. In the above example, the response Why? came up since the user wanted to know the Expert System’s thought processes. The system would give the possible response “I am trying to find the make of car you require. Up to now, coupes are not likely. It is possible that saloon cars are a likely option. I know that you like high performance which gives me strong evidence that the car should include a manual gearbox”. The above is how an Explanation System might work where questions like why or how are dealt with. Inference Rules use an if-statement and a then-statement. This gives Expert Systems the ability to find solutions to diagnostic and prescriptive problems. For example: If the make of car includes high performance and you want Italian style Then the car you want is probably a Maserati Quattroporte A rules base is made up of many such inference rules and the inference engine uses these to draw its conclusions.

10

Advantages of expert systems -

provides consistent answers never “forgets” to ask a question in determining the logic reduces the time taken to solve a problem less skilled work force needed, therefore potentially can save money

Disadvantages of expert systems - lacks common sense in some of the decision making processes - errors in the knowledge base can lead to incorrect decisions being made - cannot adapt to changing environments unless the knowledge base is continually updated - expensive system to set up in the first place - needs considerable training to ensure system used correctly by operators

1.8

The internet

Web sites need to be set up to maximise information supplied to customers and to ensure they are as helpful and self-contained as possible. If customers are continually telephoning or contacting the company by email then the web site isn’t being effective as it should. The following general features should be found on most web sites in one form or another (this list is by no means exhaustive): -

shopping basket secure site when using credit/debit cards “when customer bought X, they also bought Y” facility search facility for artist/tile/item …… drop down boxes to choose categories help facilities/how to get in touch with the company if a problem exists currency converters for international customers date/sales confirmation by automatic email saved customer details/customised pages ability to track status of orders ability to listen to/view/see video/see product …….. recognise customer as soon as they log on

When designing web pages it is necessary to supply the correct spacing for customer information (and/or use drop down menus), buttons to navigate to other web pages, etc. Search Engines The most effective way of finding information on the internet is to use a search engine. However, it is just as easy to use these inefficiently as well as efficiently. When a search condition is entered, inclusion of statements such as AND (or + sign) and OR will help narrow down the search. Also, the use of quotes (“ “) can also help. If these are not used, many irrelevant (and sometimes unwanted!!) results (known as hits) can be displayed by the search engine. For example:

11

Type in:

CIE

and the search engine would return about 22 million hits

Type in:

CIE+sample papers

and the search engine would return about 1.2 million hits

Type in:

CIE+sample papers+ICT

and the search engine would return about 6,500 hits

Security When using the Internet, security can be enhanced using encryption. Credit and debit card transactions can also be protected by a special type of password control. For example, if a user chooses the password COMPUTE34 to protect their credit card, when they buy something over the internet the card issuer will ask the user an additional question such as: “Please type in the 2nd, 4th and 7th character of your password in the following boxes:

□□□



The user will then type in O P E and the card purchase will be authorised. This additional protection is used as well as encryption. Some of the new systems use a chip and PIN card which is slotted into the keyboard and is used as additional security. The user slots the card into the side of the keyboard and is required to type in a PIN before the Internet can be accessed. This gives an additional level of security since it is necessary to have the card, know the PIN associated with the card AND also know the user’s log in id and password!!! How society is affected Buying goods and services (e.g. banking) over the internet has both positive and negative aspects on society. These can be summarised below: Positive aspects for society Shops and banks are open 24/7 Access to shops and banks is worldwide Less pollution since less travelling Disabled people are not disadvantaged (no need to travel) Busy people can shop/bank when they want and where they want If you live in a remote area, it is much easier to access shops/banks Less expensive (cost savings to shop/ bank + more competition – savings are passed on to the customer)

Negative aspects for society Close down of shops/banks in city centres Increased risk of fraud/hacking Less personal service/more impersonal Loss of jobs due to closures of shops/banks Less social interaction between people – just sit at home using computer Less activity for people – leads to a less healthy/overweight population Less environmentally friendly since more goods sent out by post – waste from packaging significantly increases

In general, increased use of computers has led to many of the above affects . Other aspects to consider include: - deskilling of the work force (e.g CAD has taken over draftsman skills, word processors have taken over many office-based duties, etc.) - the need to re-train the workforce in the use of new software/computers.

12

Computer systems have allowed companies to set up call centres in other countries where potential cost savings can be made. This, of course, can lead to job losses in the host country. The main advantages to companies adopting call centres overseas includes: - if strikes or other problems occur in one country it is possible to transfer work elsewhere - reduced costs in countries where labour costs are lower - reduced costs due to incentives/grants by countries keen to set up call centre offices - round the clock customer support (one of the advantages of time differences is the possibility of 24/7 cover) There are, of course, disadvantages to having call centres overseas: -

language and culture problems animosity to overseas call centres (leading to loss of customers) need for extensive re-training which is time consuming and expensive time differences (can lead to health problems in call centre work force who need to work unsocial hours to target key markets) - technology (does the infrastructure exist to service high tech equipment?) General Security Issues Many issues exist when linking a computer system to the Internet or indeed to any external link via a network set up. There are ways of guarding against this. The following is a list of potential problems and ways of protecting against the problems: Problem Hacking

Viruses (also see note 1 below)

Corruption/Loss of Data can occur in a number of ways: - viruses - hackers - accidental damage

- hardware faults

- software faults - incorrect computer operation

Safeguard Use of passwords and ids to prevent illegal access to files. Also locking the computer itself or locking the computer room can help here. Encryption stops the information being read even if access has been gained to a file but won’t stop hacking!! Use of ant-virus software and firewalls to prevent viruses entering a computer. It is also sensible not to open emails/ attachments from “unknown” sources; it also helps to only load software from disks/cds which are originals

- viruses can be protected against as described above - as above (also see note 2 below) - accidental damage is best guarded against by keeping back up files or use the Grandfather-Father-Son (GFS) method; also use of passwords and ids can help by restricting access in the first place - protection against hardware faults could be to keep back ups or use GFS; use of UPS (in case of power loss) and parallel system also help - keeping back up files or using GFS would help here - backing up files would guard against problems caused by incorrect power down of the system

13

Note 1: Viruses don’t just infect computers, they can also affect mobile phones, MP3 players etc. – any device which can download files from a source such as the internet is potentially at risk. Note 2: Backing up may allow files that have become lost/corrupted (due to hacking or viruses) to be reinstated; however, this would not recover the system nor would it prevent hacking/viruses affecting a system in the first place. Note 3: Other problems such as spam, pop ups, cookies, etc. are more of a nuisance (although they can considerably slow down the operation of a computer system) and can be blocked or made inactive (since they can become active without the user’s knowledge) using suitable software.

1.9

Simulations

To demonstrate how a simulation can be developed for use in a real situation the following example has been chosen. The scenario chosen is a series of traffic lights at two busy junctions:

In this simulation it is necessary to consider: (1) (2) (3) (4) (5)

how and what data is gathered how the simulation is done how the system would work in real life why simulations are done other examples of simulations

(1)

How and what data is gathered

To make this as realistic as possible, data needs to be gathered over a long period of time. This can be done by sensors in/near the road, using cameras or manual data collection. Data gathered includes: -

count the number of vehicles passing in all directions at each junction ….. ….. at a particular time of day count how many cars build up at a junction before lights change is it a week day or weekend or bank holiday how long it takes to clear vehicles at a junction other data (e.g. pedestrian crossings) time for largest/slowest vehicle to pass through a junction other factors (e.g. filtering of traffic to the right or left)

14

(2)

How the simulation is done

The data is entered into the computer and the simulation is run. scenarios may be tried out:

The following

- timing of lights varied to see how the traffic flow is affected - build up number of vehicles stopped at a junction and change timing of lights to see how it affects the traffic flow - increase/decrease traffic flow in all directions to see how the traffic is affected - try out the impact of accidents - consider passage of emergency vehicles - effect of adding in pedestrian crossings - once the simulation is run, the timing of the lights is determined and how they interact so that the maximum traffic flow is achieved; fault scenarios (e.g. an accident) and their impact are considered (3)

How the system would work in real time

- sensors in/near the road gather data (these can be light/infra red sensors, induction loops, pressure sensors, etc.) – the data is usually number of vehicles passing a particular point - the data is sent to a control box or computer system - the gathered data is compared to data stored in the system (the stored data is based on simulation runs, how the number of vehicles at a junction at a particular time of day affects the traffic flow, etc.) - the control box or computer “decides” what course of action to take and ….. - ….. sends signals to the traffic lights to change timing if necessary - as with any system involving sensors, ADC and DAC interfaces may be needed (4)

Advantages of carrying out simulations

-

saves cost (rather than doing the real thing) safer (scenarios tried out on the simulation first before used in reality) possible to try out various scenarios in advance some environments make simulations the only way to carry out a task beforehand (e.g. outer space, under sea, chemical processes, nuclear reactors, crash testing cars, etc.) - faster (no need to build and test real system, so it is possible to get results more quickly) (5)

Other examples of simulations

-

training (e.g. pilots, drivers, etc.) running/testing chemical plants and nuclear plants trying out equipment to be used under sea or in outer space crash testing cars financial simulations (e.g. stock market predictions based on various scenarios) population growth (i.e. predict how the world’s population will increase based on a number of different scenarios) - queues (e.g. simulating queues at supermarket checkouts for example) - weather (refer to next section)

15

Another example of simulation is predicting weather (i.e. a weather forecaster). In this case we will consider how/what data is collected, how the simulation is done and consider how it can be used in predicted possible climate changes. We won’t consider stage (3) here (how the system works in real time) since this simulator doesn’t control anything and stages (4) and (5) above will be the same. (1)

How and what data is collected

- sensors measure pressure, temperature, relative humidity, wind speed and wind direction - sensors are placed in weather balloons and/or weather stations - information is also got from satellites - pilots also send in information regarding weather conditions during long flights (2) -

How the simulation is done information from the sensors/satellites sent to computer this data is compared to information stored on files ….. ….. which contain known weather patterns from the past ….. predictions are made based on these comparisons produces weather maps showing isobars, temperatures, etc. computer can show graphically how weather (e.g. cloud formations) will change with time (i.e. predict weather patterns) – this is often presented as a computergenerated video showing how clouds build up, how temperature and pressure changes over, for example, the next 7 days, wind speeds etc. This shows isobars tracking across part of Europe. A computer simulation will show how areas of pressure change with time so it is possible to predict rainfall, strong winds etc. in advance

This shows clouds tracking across the Earth. A computer simulation will show how the clouds patterns will change with time so it is possible to predict rainfall etc.

16

- it is also possible to do statistical analysis and predict the percent probability that certain weather conditions will occur. (3)

How future environment/climate changes can be predicted

-

information over time is fed into a climate/weather model based on changes in weather patterns, carries out a statistical prediction model is able to change parameters to see how future climate can be affected needs to review a lot of previous data over a number of years to check if changes are genuine or just cyclical - over, for example 20 years, predictions compared to actual climate conditions to validate/further refine the model - can make use of spreadsheets and statistical software packages

1.10

Training and Entertainment

Music Computer hardware and software advances have changed how music is generated and produced. Some of the key reasons for this have been summarised below: - actual musical notes can be generated from the music itself by software - music samplers and mixers give an almost limitless ability to alter the original tracks recorded in a studio - software can automatically correct notes - don’t need to understand music notation to write a musical score - electric instruments (such as guitars and organs) play back through electronic effects machines - synthesisers combine simple wave forms to produce more complex sounds - electric organs can now mimic almost any instrument (including a full orchestra!!) - automatic rhythm - music notes automatically printed out in the correct format There are many other software and hardware developments; the above is just a summary of the more common elements.

Animation/Cartoons in Films and Video/Television Computer animation is the art of creating moving images via computer hardware and software. For 3D animation, objects are designed on a computer and a 3D skeleton is produced. The limbs, mouth, eyes, etc. are moved by the animator using key frames (these define the start point and end point of a smooth transition to make the animation as realistic as possible). The differences in appearance between key frames are automatically calculated by the computer – this is called TWEENING or MORPHING. The animation is finally RENDERED (i.e. turned into a realistic image).

17

Computer animation uses a technique called avars (animation variable) where the starting point is usually a series of stick figures; e.g. Toy Story used over 700 avars (1 avar = position of each feature e.g. the mouth). Successive sets of avars control all movement of the animated character. Once the stick model is moving in the required way, avars are incorporated into full wire frame models. Finally, surfaces are added requiring a process called rendering (i.e. turned into a realistic image). There are several ways of generating avar values to get realistic movement. One way is to use markers on a real person (or whatever is being animated) acting out a part and track the movements by video camera. Alternatively, avars can be set manually using a joystick. Software produces a level of quality for movie animation that would take many years to produce by hand and would employ several cartoonists/animators. This all saves considerable time and money to the film and television producers. Avatars are another example of animation. These are often used to represent people either in 3-D (as used in computer games) and in 2-D (as used in internet message boards). Some avatars are animated consisting of a sequence of images played one after the other. Ultimately, animators want to create a human image which moves and interacts with its background in such a away that the viewers can’t tell if a particular scene is computer generated or produced by real actions in front of an actual movie camera. Special effects in many modern films (televisions) all use computer animation to produce fantasy worlds.

1.11

Computer Based Training

CBT makes use of a computer system to train people in a number of applications. It makes use of multimedia and self-assessment with minimum input needed from a human trainer. The advantages of training people using computer systems (such as CBT) include: -

trainees can work at their own speed trainees can learn when they want it is possible to re-run sections of the training program if necessary possible to come back at any time/pause training program at any point user gets immediate assessment of performance possible to include multi-media elements in the training package no need to have a teacher/classroom – potential cost savings therefore possible it is easier to keep up to date/amend

18

1.12

Communications

Video Conferencing Video conferencing continues to grow in popularity. reasons are listed below:

Why is this?

Some of the

- communication links are now much faster therefore images, sound quality etc. are now far better - safety reasons (increase in world-wide terrorist activity, frequent travelling, etc. are all risks to company employees if they have to travel to meetings) - costs (the money saved on not having to travel, accommodation costs, lost time to the company whilst employees are out of the office travelling to meetings, etc.) - improvements to the work/general environment (employees can work from home, less travel means less stress to employees but also means less pollution, disabled employees are no longer disadvantaged, etc.) - because of the above, it is possible to hold a meeting at short notice The hardware and software needed to run video conferencing is very sophisticated. Apart from the obvious items (i.e. large screen, computer and devices such as mouse, etc.) the following briefly describes what is needed to have a video conference: -

delegates speak into a central microphone webcam takes a video image delegates hear speech through loud speaker system at each venue the system uses internet/WAN/modem to transmit data requires use of compression software for video/audio signals systems may use CODEC (which converts and compresses analogue data into digital data for sending down digital lines) - requirement for echo cancellation software (this allows talking in real time and keeps communications synchronised) - video images and audio are seen/heard in real time on large monitors/through loud speakers Electronic Mail (email) Another form of communication is through email. This has the following advantages over video conferencing: - there are no language problems (systems can translate messages sent) - it is possible to read emails whenever you want – there are no issues of time differences as would be the case with video conferencing. If some delegates lived in the USA and the others lived in India, for example, the time difference is 10 to 14 hours which could be a problem) - it could be argued that the email system is cheaper since there is no need to buy webcams, special software, etc.

19

The following is a simple description of how the email system works: - the sender composes a message (and attaches a file if required) and sends it - this message is sent to an ISP (Internet Service Provider) mail server - the mail server examines the address associated with the message and decides how to route the message - the message travels over the internet arriving at the recipient’s ISP mail server - the message is then held in the recipient’s electronic mail box - to read the message, the recipient logs on to their mail server - the message is then retrieved and sent to the recipient’s computer Wireless Technology (WiFi) and Broadband Most areas in the world now offer broadband rather than dial up for connecting to the internet. The advantages of broadband over dial up include: - the system is always “on”/no need to dial into ISP every time you want access - the connection rate/data transfer rate is much higher (for example broadband operates at 11 000 kbps compared to the dial up rate of 60 kbps) - there is a flat monthly rate with broadband (dial up is charged per hour of usage) - it is possible to use the telephone at the same as the internet with broadband/the line isn’t tied up - broadband permits other facilities such as “skype”/VOIP Wireless technology (WiFi) allows connection of a computer to the Internet without the need for connecting cables. A router (containing a modem and external aerial) is connected to a telephone line and it is then possible for any computer within range to communicate with the router and allow Internet access – the link between computer and router is completely wireless.. The main advantage of doing this is clearly the portability (i.e. can go anywhere within range since no wires are needed). There are, however, a number of disadvantages: -

the range can be very limited possible interference from nearby electronic devices security issues (i.e. tapping illegally into WiFi networks) access speed/transfer rate is often slower using wireless systems

It isn’t just computers that can be linked without wires, various peripheral devices can be linked to a computer system without the need for a physical, wired connection. For example: -

printers keyboards mouse digital cameras

20

1.13

Intranets

Many companies use intranets as well as the internet. The simple definition is “An intranet is a computer network based on internet technology, that is designed to meet the internal needs for sharing information within a single organisation/company”. The main reasons for doing this include: -

safer since there is less chance of external hacking or viruses it is possible to prevent employees from accessing unwanted web sites companies can ensure that the information available is specific to their needs only it is easier to send out “sensitive” messages to remain within the company only

Some comparisons between internet and intranet include: -

the INTERNET is INTERnational NETwork an INTRANET is INTernal Restricted Access NETwork the intranet only gives local information relevant to the company/organisation it is possible to block access to certain sites using the intranet it is not always necessary to have external modems when using intranets information for use on intranets is stored on local servers the internet can be accessed from anywhere the internet is available to anyone, whereas the intranet requires password entry the intranet is behind a firewall

1.14

Other applications

The notes in sections 1.1 to 1.13 cover a number of computer applications. These are by no means exhaustive since the list of possibilities is almost endless. The following section chooses a sample of another application which is useful to study. It considers how supermarkets use bar codes in their automatic stock control systems. It would have been equally valid to consider library systems, administration systems (e.g. in a hospital), banking systems, burglar alarm systems or passports/id cards. Centres would be advised to consider all of these as a knowledge of computer systems is built up. Sample Application – Automatic Stock Control System in a Supermarket - bar codes are attached to all goods/items sold by the supermarket as a means of identification - each bar code is associated with a stock file on a computer database - the customer takes their basket/trolley to the POS terminal - the bar code on the product is scanned at the point of sale (POS) terminal - if the bar code can’t be read, the POS operator has to key in the bar code number manually using a keyboard/key pad - the bar code is searched for on the database - once the bar code is identified/found, the appropriate file/record is accessed - the price of the good/item is found and sent back to the POS - the stock level of the item is reduced by 1 - if the stock level is less than or equal to the re-order/minimum stock level then the system automatically re-orders goods/items from the suppliers - this procedure is repeated until all the items in the customer’s basket/trolley have been scanned - when all items/goods have been scanned, the customer is given an itemised bill showing a list (with prices) of everything they have bought

21

- the computer also updates the files containing the daily takings - if the customer has a loyalty card, the system automatically updates their points total - when new goods arrive, the bar codes are used to update the stock files - some newer supermarkets now allow customers to scan their own basket/trolley and pay for the items/goods using credit card or cash (essentially the stock control system is the same for both methods)

22

1.15

Problems

A list of examination-based problems now follow. These can be used as revision questions or centres can use the questions to make up their own assessments to give candidates practice under examination conditions.

(1)

(2)

(a)

Give three features you would expect to see in a typical Computer Aided Design (CAD) package.

(b)

A company uses CAD to design a child’s toy. Give two advantages of using CAD in this application.

(a)

What is meant by virtual reality?

(b)

A hotel decides to offer a virtual tour of its facilities on a web site. (i)

Describe how images are created and processed for use in the virtual tour.

(ii) What features would you expect to see on the virtual tour web site?

(3)

(c)

Give two other applications of virtual reality.

(a)

A large house with eight bed rooms is to be protected by an intruder surveillance system (burglar alarm). Describe how sensors and a microprocessor would interact to monitor for intruders and sound an alarm if a break in occurs.

(b)

(4)

Describe the main differences between a computer being used in a monitoring application and a computer used in a control application.

Robots are being used to spray some metal parts. (a)

Describe two problems the robot might encounter and how these could be overcome.

(b)

In general, what are the advantages of using robots rather than human workers in manufacturing industries?

23

(5)

(6)

(7)

(8)

A bus has been fitted with a Global Positioning Satellite (GPS) navigation system (sat nav). (a)

Describe how the sat nav computer calculates the exact location of the bus.

(b)

How does the sat nav system indicate to the bus driver the correct route that needs to be taken to reach the required destination?

(c)

What are the advantages to the bus driver of having GPS installed?

An expert system is to be created to identify chemical compounds. (a)

Describe how the expert system would be set up and made ready for use.

(b)

Explain the function of the Explanation System which forms part of the expert system.

(a)

Describe four security issues associated with linking a computer to the internet. How is it possible to guard against each of these security issues?

(b)

Describe the differences between the internet and an inranet.

A supermarket has decided to model queues at the check outs using simulation software. (a)

Describe how data is collected for the simulation/model.

(b)

Describe how the simulation/modelling is carried out.

(c)

Describe the advantages of using a simulation.

(d)

Give two other uses of simulations.

(9)

Describe how computer hardware and software are used to create animation effects in films and television programmes.

(10)

(a)

Describe how it is possible to have a video conference between delegates in two different countries.

(b)

Give the main reasons why video conferencing has become increasingly popular.

24

Booklet 1 – answers and hints 1(a) The features found in a typical CAD package include: -

wire frame 2D and 3D modelling library of parts which can be used in new drawings validation and verification of designs against original specification ability to link with computer-aided manufacture (CAM) facility to calculate the mass of the actual object once built facility to calculate the cost of producing the article features such as rotation, colour, zoom, etc. simulation of designs without the need to build a prototype create engineering drawings from solid models import and export to allow the exchange of data with other software packages - kinematics (i.e. check moving parts in assemblies don’t interfere with each other) - routing of cables and hoses

(b) Any of the following advantages could be quoted: -

easier to modify drawings of the toy toy can be built up from library of parts possible to cost final toy automatically easy to try colour variations etc.

2(a) Definition points: - artificial 3D environment ….. - ….. created by a computer - users wear data goggles, data helmets, data gloves or suits fitted with sensors - devices monitor user actions (e.g. data goggles track eye movement and system responds by sending new video input) (b) (i) (ii)

Stages in the creation of images takes photos with a digital camera photos taken from a single, reference point camera rotated around the room as a number of photos taken images “stitched” together using imaging software photo images re-sized and re-configured for Internet use Expected features:

- hot spots on web page to allow user to move around the hotel - plans and maps integrated to allow user to navigate the hotel - ability to move from room to room to navigate whole hotel (c) There are many applications; examples include: -

special effects on films/television arcade games training (military, medical, etc.) design (e.g. nuclear and chemical plants 1

3(a) Interaction between sensors and microprocessor: -

sensors around the house would gather information e.g. has a light beam been broken has pressure pad detected excess pressure has infra red beam detected excess heat has acoustic sensor detected any noise such as breaking glass data translated into digital using an ADC (analogue to digital converter) microprocessor/computer will compare signal from sensor with stored info e.g. signal that light beam is broken pressure > stored “normal” value heat level > stored “normal” value acoustic level > “stored” normal value - if any values are outside normal range, microprocessor/computer sends a signal to an alarm and/or flashing light - system also automatically sends signal to police/security company - since the house is large, sensors will be in zones; therefore computer will indicate on a control panel the zone where intruder broke in (b) Differences between monitoring and control: Monitoring: - computer system takes information from the sensors compares the data with stored values - warns/informs the user of status either by read outs or alarms Control:

-

computer system takes information from the sensors compares the data with stored values sends signals to devices to open/close, on/off etc. output from system can affect next input

4(a) Problems associated with robotics: -

out of paint (sensors in paint reservoir to indicate low paint levels) something in path of robot (sensors used to detect presence of an object) is item in correct position (sensors to ensure item present and in position) is item present (as above)

(b) Advantages of using robots rather than humans: -

they can work in conditions hazardous to humans robots don’t need breaks (capable of working non-stop) they are less expensive in the long run since don’t need any wages more productive (do same task faster than a human being) work is of a more consistent standard removes need for a human to do boring, repetitive tasks

2

5(a) How satellite navigation systems can be used to calculate a vehicle’s position -

satellites in outer space transmit signals to the Earth computers in the bus receive and interpret these signals the satellite relies on very accurate timing (atomic clocks) each satellite transmits data indicating position and time computer in bus calculates its position based on received satellite data at least three satellites are used to give the bus its exact position

(b) How the bus driver uses the satellite navigation system: - the computer has a number of pre-stored maps - bus location shown on appropriate map - directions are given verbally or on-screen output (on a map) (c) Advantages to the bus driver of using this system: - it is generally safer (driver doesn’t need to consult maps whilst driving) - error reduction (e.g. can’t go the wrong way down a one-way street) - if the bus breaks down/involved in accident, its exact position is known to facilitate recovery (especially in remote areas) - system can warn driver of speed cameras, road works, etc.

6(a) Setting up an Expert System: -

gather information from experts create/design a knowledge base gathered information from experts is added to the knowledge base rules (base) is created/designed inference engine is created/designed user interface is designed/created fully tested using known chemical compounds

(b) The function of the Explanation System: - if a user can’t answer one of the Expert system questions, the Explanation System will come up with a response to try and explain its “thought process”

7(a) Security issues and how to guard against them: (NOTE; this question asks for a description of the security issues; for more in depth definitions refer to booklet 1 and good text book) - hacking (use of passwords, ids, etc.) - viruses (use of ant-virus software, firewalls, only use CD/DVDs from known sources) - cookies/spyware (use appropriate clean up software, “clean” system up) - WiFi open circuits (secure connection with passwords, etc.)

3

(b) Differences between intanet and internet: -

internet is INTERnational NETwork intranet is INTernal Restricted Access NETwork intranet only gives local information relevant to the company can block access to certain sites using intranet intranet data stored on servers with restricted access internet can be accessed by anyone from anywhere intranet requires passwords etc.

8(a) Collecting data for the model: -

counts number of people at checkouts …. …. at each time of day and each day of the week count how many people build up at the checkouts …. is it a weekday, weekend or bank holiday how long does it take to serve a customer other data (special offers)

(b) Carrying out the simulation: - number of checkouts opened and see how flow of people affected - build up number of customers at checkout, open extra checkouts and see how it affects time to be served, etc. - increase/decrease number of customers and observe the affect - once simulation is run, number of checkouts needed is determined …. - … and interaction with customers is determined so that optimum throughput is achieved - look at fault scenarios (breakdown of equipment etc.) (c) Advantages of simulations (in general): -

cost savings (e.g. no need to crash test several cars) it is possible to try out various scenarios in advance quicker to get results (no need to build and test a real system) it is possible to test systems which would take years to obtain “real” data (e.g. environmental/weather predictions)

(d) Other areas where simulations can be used: - training - running/testing chemical and nuclear plants - trying out equipment in hostile environments (e.g. under the sea, in outer space etc.) - crash testing cars - financial simulations (e.g. effect of inflation) - population growth - weather/climate predictions 9

Refer to the notes on pages 16 to 17 (booklet 1) to see how computer systems are used to create animation (special effects) in film and television. An essay should include: animation, tweening, morphing, rendering, avars, wire frames, and how these combine to make special effects/animation.

4

10(a) Video conferencing: -

delegates speak into central microphone webcam takes video images in real time delegates hear speech through loud speaker system system uses internet/WAN/broadband modem to transmit data requires use of compression software/CODEC need for echo cancellation software

(b) Reasons for the popularity of video conferencing: - safety reasons (increase in terrorism, frequent travelling are all risks) - communications links are now much faster (better images etc.) - costs (money saved on travelling, accommodation, costs of lost time whilst employees are out of the office, etc.) - improvements to workers (e.g. can work from home, less stress from driving/ travelling to work, doesn’t disadvantage disabled, etc.) - pollution aspects (e.g. less traffic (car and air)) - flexibility – ability to call a meeting at short notice

5

Booklet 2

This covers the following topics found in section 2 of the computer studies syllabus:

Item 1 2 3 4 5 6 7 8

Topic Feasibility study Analysis Design Implementation System maintenance and evaluation Project tools Systems flowcharts Problems based on section 2 topics

1

Page numbers 2 2 4 5 7 8 9 11

Systems Analysis A systems analysis team is often brought in to improve on an existing system. Frequently this involves moving from a paper-based filing system to one which is computerised. The following revision notes describe some of the key stages in a systems analysis study. Many of the topics are covered elsewhere (such as how to choose hardware, validation techniques, testing, etc.). 2.1

Feasibility Study

This involves writing a report to convince management of the merits of adopting the proposed new system. Some aspects of the study include: •

Terms of reference:



Description of the existing system (including any problems and the projected costs)



Criteria (essential requirements and desirable features of the proposed system)



Solution (including development plan and cost/benefit analysis)

- objectives - boundaries - constraints

If the feasibility study is accepted then the systems analyst moves to the next stage which is a full analysis of the system.

2.2

Analysis

The analysis involves some or all of the following stages: •

Fact finding – this is usually done in four ways (see page 2)



Understanding the current system



Produce data flow diagrams



Identify the user requirements



Interpret the user requirements



Agree the objectives with the user



Collect data from the current system

2

Fact finding Observing the existing system first hand This involves watching the personnel using the existing system to find out exactly how it works. There are a number of advantages and disadvantages of using this method to gather information about the existing system: Advantages

- the analyst obtains reliable data - it is possible to see exactly what is being done - this is an inexpensive method compared to other techniques

Disadvantages - people are generally uncomfortable being watched and may work in a different way - what they are watching may not be representative of a typical day’s work - if workers perform tasks that violate standard procedures, they may not do this when being watched!! Questionnaires This involves sending out questionnaires to the work force and/or to customers to find out their views of the existing system and to find out how some of the key tasks are carried out. As with observation, there are a number of advantages and disadvantages in using this technique: Advantages

- questions can be answered quickly - an inexpensive way of gathering data from a large number of people - allows individuals to remain anonymous - it is quick to analyse data

Disadvantages - number of people returning questionnaires is often quite low - questions asked tend to be rather inflexible - no immediate way to clarify a vague/incomplete answer to a question - it is difficult to prepare a good questionnaire Interviewing This involves a one to one question and answer session between the analyst and employee/customer. A good method if the analyst wants to probe deeply into one specific aspect of the existing system. As with the previous method, there are a number of advantages and disadvantages: Advantages

- opportunity to motivate the interviewee to give open and free answers to the analyst’s questions - allows the analyst to probe for more feedback from the interviewee (easier to extend a topic than it is when using questionnaires) - can ask modified questions or questions specific to the interviewee based on previous responses

3

Disadvantages - can be a very time consuming exercise - can be expensive to carry out - unable to remain anonymous Looking at existing paperwork This allows the analyst to see how paper files are kept, look at operating instructions and training manuals, check accounts, etc. This will give the analyst some idea of the scale of the problem, memory size requirements, type of input/output devices needed, and so on. They will often gain information not obtained by any of the other methods described above. However, it can be a very time consuming exercise.

2.3

Design

Once the analysis has taken place and the systems analyst has some idea of the scale of the problem and what needs to be done, the next stage is to design the key parts of the recommended system. The following is a list of tasks that are usually done (this is by no means an exhaustive list): •

design the data capture forms/input forms



design the screen layouts



design output forms and reports



produce systems flowcharts and/or pseudocode



select/design any validation rules that need to be used



select the most appropriate data verification method(s)



file structures/tables need to be designed/agreed



select/design the hardware requirements for the new system



select/design the software requirements



produce any algorithms or program flowcharts



design a testing strategy/plan

4

2.4

Implementation

Once the “final” system has been designed it is then necessary to put together the hardware and software and introduce the new system. There are many stages in this complicated process: •

produce the documentation; there are two basic types here to consider: User documentation this usually consists of: -

how to load/run the software how to save files how to do a search how to sort data how to do print outs how to add, delete or amend records the purpose of the system/program/software package screen layouts (input) print layouts (output) hardware requirements software requirements sample runs (with results and actual test data used) error handling/meaning of errors troubleshooting guide/help lines/FAQs how to log in/log out

Technical documentation this usually consists of: -

program listing/coding programming language(s) used flowchart/algorithm purpose of the system/program/software input formats hardware requirements software requirements minimum memory requirements known “bugs” in the system list of variables used (and their meaning/description) file structures sample runs (with results and actual test data used) output formats validation rules



install the hardware and, if necessary, the new software



fully test the new system once installed it is necessary to develop a proper testing strategy to ensure all possible scenarios are covered and that all error trapping techniques are fully tested; for example if inputting data to represent somebody’s age, the test plan may include: 0, 5, -2, fred, 3.5, 215, 85 etc. to see whether each piece of data is correctly dealt with; test data often falls into 3 types: 5

normal data -

this is data which is acceptable/valid and has expected outcomes (for example, if a date is being input the day should be in the range 1 to 31)

abnormal/erroneous data -

this is data outside the limits of acceptability/validity and should cause an error message to be generated (for example, if a date is being input the day can’t be -1 or 50 etc.)

extreme/boundary data -

this is data at the limits of acceptability/validity (for example, if a date is being input, the two values at the extreme limits of valid days would be 1 and 31)



train the staff to use the new computer system



transfer the paper files across to the new system; this may involve the following: - scanning in the documents - keying in the data - create databases etc. to allow downloading of files etc.



changeover to the new system change over is usually done in one of four ways; the following notes summarise these methods and gives advantages and disadvantages of all the techniques: direct changeover with this technique, the old system is stopped and the new system is used straight away; -

this method can be disastrous if the new system fails at any point however, the benefits are immediate and less time is wasted costs are reduced (only one system in use so save on staff costs) less likelihood of a malfunction since the new system will have been fully tested

parallel with this technique, the old and new systems are run together for a time - if the new system goes down for any reason, you still have the old system to fall back on so a failure wouldn’t be disastrous - it is possible to gradually train staff/time to get used to the new system - more expensive than direct since need extra staff to run both systems - more time consuming since both systems need to be run and evaluated

6

pilot with this technique, the new system is introduced into one part of the company (e.g. into one warehouse of a supermarket) and its performance assessed - if the new system fails only one part is affected; the rest is still functional - it is possible to fully train staff in one area only which is much quicker and less costly than parallel - the costs are also less than parallel since only one system is being used in the pilot warehouse phased in this technique only part of the new system is introduced and only when it proves to work satisfactorily is the next part introduced, and so on, until the old system is fully replaced - if the latest part fails, only need to go back in the system to the point of failure; hence a failure isn’t disastrous - more expansive than direct since it is necessary to evaluate each phase before moving to the next stage - can ensure the system works properly before expanding The following table summarises the risks involved in all four methods: Method Parallel Pilot Phased Direct

2.5

High Medium Medium

Input needed by the user High Low Medium

Low

Medium

Relative costs

Input needed by Systems team Low Medium Medium Low (if successful; otherwise VERY High)

Impact of failure of method Low Low Medium High

System Maintenance and Evaluation Once a system is up and running it is necessary to do some evaluation and carry out maintenance if necessary. This is summarised below: • • • • • • • •

compare final solution with the original requirement identify any limitations in the system identify any necessary improvements that need to be made evaluate the user’s responses to using the new system compare test results from new system with results from the old system compare performance of new system with performance of old system update hardware as new items come on the market or the company changes in any way which requires new devices to be added/updated update software if necessary if company structure changes or legislation is introduced which affects how the company operates

(text in blue refers to evaluation and text in green refers to maintenance)

7

2.6

Other information

Tools Systems analyst have a number of tools to help them in carrying out their work. Since many of their projects are for big companies it is necessary to keep track of costs, resources and time. The following are only mentioned as a basic introduction and a guideline for further study: -

-

Gantt charts show - all stages/tasks to be done - the critical path(s) - key project milestones - number of days to do tasks - progress on tasks as % complete - progress versus expected time to do work - how tasks are all linked together Gantt charts allow emailing of tasks/project info to others automatically Gantt charts allow use of the intranet/email facility to post or download project information to others Gantt charts permit the use of PERT charts (A PERT chart is a type of chart used for project management; it represents each task of a project as a box (circle or rectangle), arrows between tasks are used to show the sequence and task dependencies (i.e. which tasks need to be complete before others can start).

Below is a sample of a project summary using a Gantt chart:

Typical Gantt chart showing some aspects of project management

8

System flowcharts System flowcharts are used to show how all the components in a system link together (e.g. input, storage, output, processing, etc.). They are very different to normal flowcharts since they don’t go into detail of how something is actually done – they are a general overview. The table below shows the most common system flow chart symbols:

Magnetic Tape

Online storage (files stored on hard discs, etc)

Connector (a link to or from another part of diagram)

Visual Display Unit (Monitor)

Terminator Data processing (Start and end of the flow operation diagram)

Document output (printed hard copy)

Manual input (e.g. keyboard)

Communication line (e.g. telephone line)

Sort Collate (alphabetical, chronological, numeric)

Hard disk (file)

Merge (e.g. join two files together)

Connector, off-page. (link from this diagram to another diagram)

A simple example of a systems flowchart is shown below:

9

Input/Output operation

START

Member’s application form

Membership data keyed in

Write raw data to member file

Write sorted data to member file

Back up file

Back up file to magnetic tape

STOP

10

Member file

Member file

2.7

Problems

(1)

(a)

A systems analyst was brought in to computerise a paper-based car sales system. What methods could be used to gather data about the existing system? Give reasons for your choice.

(b)

What would need to be done before the new computerised system became “live”?

(c)

Why would PILOT and PARALLEL change over methods be suitable in this application?

(2)

A program is written to input daily temperatures. Name three types of test data that could be used. Give examples of each type of test data which could be used and discuss the outputs you would expect to get.

(3)

Name five tasks that would be carried out at the DESIGN stage in systems analysis.

(4)

Name four methods used to change over from a manual system to a new computerised system. Discuss the relative advantages and disadvantages of these four methods.

(5)

Describe how the effectiveness of a new computer system can be assessed.

(6)

What tools exist to help the analyst draw up an action plan and ensure that the project is completed on time and to budget?

(7)

What information would a systems analyst need to gather to decide on what hardware is required for a new computerised system?

(8)

What five items need to be included in the USER GUIDE and in the TECHNICAL GUIDE of a newly developed computerised system?

(9)

Choose six symbols used in systems flow charts and explain what each symbol means.

11

(10)

A company selling CDs and DVDs presently uses a manual, paper-based system to keep track of: - stock levels - files containing CD and DVD information - sales information The company has shops in five major cities. When a customer comes into the shop s/he goes to the desk and either asks the assistant to find a particular CD/DVD. The shop assistant locates the files for the item the customer has requested and, (i) (ii) (iii)

checks if it is stock checks the price of the CD/DVD finds where the CD/DVD is in the shop

If the customer has already found the CD/DVD in the shop s/he takes it to the desk and the shop assistant finds the item file to check for its price. The customer pays for the CD/DVD and the following then happens: -

shop assistant fills out a sales receipt and puts it into a file at the end of the day, all the sales are recorded and the number of each item in stock is updated if the number of items are low a request for new stock is filled out the value of the day’s sales are recorded in an accounts book. The new system

The system is to be computerised. The following will be created: (i) (ii) (iii) (iv)

all CD and DVD data will be stored on a database all items for sale will have a bar code on them a sales file will be set up a database will be created showing supplier and customer details

A customer goes into the shop and finds a CD/DVD s/he wants to buy. The shop assistant scans the bar code on the item and the CD/DVD details have been found including its price. The stock files are updated (i.e. 1 is reduced from the number in stock) and the takings file updated. The stock levels for that item are checked and an automatic order is sent out after accessing the supplier database. If the customer has requested the assistant to find a particular CD/DVD the assistant keys in the name/artist and finds out if the item is in stock, where it can be found and it’s price (the next stage is the same as above). If the item isn’t in stock, the assistant takes the customer details and updates the database and adds a request for the item to be ordered and this is added to the customer’s file.

12

(a)

Draw the systems flow charts to show how the above system will work.

(b)

Discuss the advantages of the new computerised system when compared to the manual paper-based system.

(c)

Why would the new system reduce the shop’s costs?

13

Booklet 2 – answers and hints 1(a) Methods for gathering information:

Advantages of method:

- observation

- reliable data - see exactly what is done - inexpensive method

- questionnaires

-

- interviewing

- easier to motivate interviewee - gives the opportunity to expand on answers given by interviewee - can ask specific questions

- look at existing paperwork

-

fast method of data gathering inexpensive method individuals can be anonymous quicker to analyse data

look at how files are kept what is kept in files look at training manuals check company accounts can decide on file size, memory requirements, devices needed, etc.

(NOTE: could also include focus groups here) (b) What to do before making system live: -

produce user documentation and technical documentation install hardware and software fully test the new system train the staff to use the new system

(c) Reasons for choosing Pilot and Parallel: - Pilot (could introduce system in one section of car dealership or, if a large chain, introduce the whole system in one of the car dealerships and see how it performs before rolling out to all the other dealerships in the chain) - Parallel (could run the two systems together to make sure it works alright)

2

Types of test data: - normal (e.g. 15 – you would expect this data to be accepted since 150C is a reasonable temperature) - abnormal (e.g. -500, 200 – you would expect an error message since -2000C or -5000C are not reasonable temperatures) - extreme (e.g. -40, 50 – you would expect these extreme values (boundaries of acceptability) i.e. -400C and 500C to be accepted as boundary values.

6

3

Design stage tasks: -

4

design data capture forms design screen layouts design output forms/layouts produce systems flowcharts and/or pseudocode select/design validation rules select most appropriate data verification method(s) design file structures/tables select/design hardware (requirements) select/design software (requirements) produce algorithms/program flowcharts design testing strategy/plan

Advantages and disadvantages of changeover techniques: Direct - disastrous if new system fails - immediate benefits felt - reduced costs (only one system used) - less likelihood of failure since fully tested

Parallel - more expensive than direct since two systems in operation at the same time - more time consuming - still have old system if new system fails - can gradually train staff while both systems are running together

Pilot - if new system fails can easily go back to point where system failed - less expensive than parallel - can train staff while system being introduced in stages - can ensure system works before expanding

Phased - if new system fails can easily go back to point where system failed - less expensive than parallel - can train staff while system being introduced in stages - can ensure system works before expanding

5 Assessing the effectiveness of the new system: -

compare final solution with original requirements identify any limitations in the system identify any necessary improvements that need to be made evaluate user responses to using the new system compare test results from new system with results from old system compare performance of new system with performance of old system effectiveness of the hardware effectiveness of the software

7

6 Tools to ensure project completed on time and to budget: -

use of Gantt charts to show all the tasks use of Gantt charts to show critical paths use of Gantt charts to show key project milestones use of Gantt charts to show:- number of days to do the tasks - progress as percent completed - progress versus expected time to do work - how tasks are linked together - allows the emailing of tasks/project information to others automatically - use of Gantt charts allow use of the intranet/email facility to post or download project information to others - Gantt charts allow use of PERT charts (each task in the project is represented and shows sequence and dependencies)

7 Information needed to decide on the hardware requirements: -

how much printing will be done memory size requirements (e.g. for files) size and resolution of monitors (e.g. will large drawings be shown on screen?) input and output requirements (e.g. scanners, mouse, etc.) portability requirements will disabled people be using the hardware? does it need to be compatible with existing systems?

8 Items needed in User Documentation and Technical Documentation User Documentation - how to load/run software - how to save files - how to do a search - how to sort data - how to do printouts - how to add/delete/amend records - purpose of system/program/package - (input) screen layouts - (output) print layouts - hardware requirements - software requirements - sample runs (with results) - error handling/meaning of errors - how to log on/log out

Technical Documentation - program listing/coding - program language(s) used - flowcharts/algorithms - purpose of system/program/package - input formats - minimum memory requirements - known “bugs” in the system - list of variables used - file structures - hardware requirements - software requirements - sample runs (with results) - output formats - validation rules - verification techniques

8

9 Systems flowchart symbols

Magnetic Tape

Online storage (files stored on hard discs, etc)

Connector (a link to or from another part of diagram)

Visual Display Unit (Monitor)

Terminator Data processing (Start and end of the flow operation diagram)

Document output (printed hard copy)

Manual input (e.g. keyboard)

Communication line (e.g. telephone line)

Sort Collate (alphabetical, chronological, numeric)

Hard disk (file)

Connector, off-page. (link from this diagram to another diagram)

10(a) - see page 10 for system flowchart for the new system 10(b) Advantages of the new system: -

Merge (e.g. join two files together)

easier/faster to search for items improved stock control automatic stock control is possible less space taken up in filing system less expensive (fewer staff, etc.) no need to price individual items able to offer items on the internet

(c) Reduced costs: - refer to above advantages

9

Input/Output operation

START

updated stock d/base

stock items put on d/base

Sample solution – others exist

scan bar code

item found?

Yes

show details

No key in information

No STOP

Yes item found?

show details STOP

item in stock?

Item bought by customer

stock file update stock file update takings file takings file stock level < reorder level

Yes re-order item

No

Yes

new stock?

STOP No

10

supplier file

Booklet 3

This covers the following topics found in section 3 of the computer studies syllabus:

Item 1 2 3 4 5 6 7 8 9 10 11

Topic Common flowchart symbols Writing flowcharts to solve problems Dry running of flowcharts Problems based on flowcharting Pseudocode Writing algorithms using pseudocode Problems based on pseudocode Introduction to logic Description of common logic gates Combinations of logic gates Problems based on logic

1

Page numbers 2 3 9 13 18 20 25 28 28 31 34

Booklet 3 covers the development of algorithms (both in pseudocode and flowchart form) and also introduces logic gates which is a new topic from 2011. Introduction to Flowcharts This section covers the use of flow diagrams (charts) in the production of algorithms. Systems flowcharts are different and these are covered in a different section (Systems analysis). The early part of section 3.1 (i.e. top down design, structure diagrams, menus, libraries of procedures and subroutines) is covered adequately by standard text books. This section primarily covers four areas: 1 2 3 4

Common flow chart symbols Writing flowcharts to solve problems Dry running of flowcharts to determine its function and outputs Exercises to test the above concepts

1

Common flowchart symbols 1.1

The start and end box:

START

END

1.2

The process box: X=X+1

1.3

Input/Output box:

1.4

Decision/query box:

Print X

No

Is X > 5?

2

Yes

Writing flowcharts to solve problems

2

The following five problems are also covered in section 3.2 where the algorithms are constructed using pseudocode. Candidates may choose to answer questions using either flowcharts or pseudocode but a working knowledge of both techniques is well advised. 2.1

Example 1 A town contains 5000 houses. Each house owner must pay tax based on the value of the house. Houses over $200 000 pay 2% of their value in tax, houses over $100 000 pay 1.5% of their value in tax and houses over $50 000 pay 1% of their value in tax. All others pay no tax. Write an algorithm to solve this problem in the form of a flowchart.

2.2

Example 2 The following formula is used to calculate n: n = (x * x)/(1 – x). The value x = 0 is used to stop the algorithm. The calculation is repeated using values of x until the value x = 0 is input. There is also a need to check for error conditions. The values of n and x should be output. Write an algorithm to show this repeated calculation in the form of a flowchart.

2.3

Example 3 Write an algorithm in the form of a flowchart which takes temperatures input over a 100 day period (once per day) and outputs the number of days when the temperature was below 20C and the number of days when the temperature was 20C and above.

2.4

Example 4 Write an algorithm in the form of a flowchart which: • • •

2.5

inputs the top speeds (in km/hr) of 5000 cars outputs the fastest speed and the slowest speed outputs the average (mean) speed of all the 5000 cars

Example 5 A shop sells books, maps and magazines. Each item is identified by a unique 4 – digit code. All books have a code starting with 1, all maps have a code starting with 2 and all magazines have a code starting with 3. The code 9999 is used to end the algorithm. Write an algorithm in the form of a flowchart which inputs the codes for all items in stock and outputs the number of books, number of maps and the number of magazines in stock. Include any validation checks needed.

3

START

count = 1 Example 1 Input house

Is house> 200000

Yes

tax = house * 0.02

No

Is house> 1000000

Yes

tax = house * 0.015

No

Is house> 50000

Yes

tax = house * 0.01

No

Tax = 0

print tax

count = count + 1

Is count < 50001 Yes

4

No

END

START

Example 2 input X

is x = 0 ?

Yes

END

No

is x = 1 ?

Yes

output “error”

No

n = (x*x)/(1-x)

output n, x

5

START

count = 1 total1 = 0, total 2 = 0 Example 3

input temp

is temp < 20 ?

Yes

total1 = total1 + 1

No

is temp > 19 ?

Yes

total2 = total2 + 1

No

count = count + 1

is count < 101 ? Yes

output total1, total2

No

6

END

START

Example 4 fastest = 0 slowest = 1000 total = 0

count = 1

input topspeed

Yes

is topspeed > fastest ?

fastest = topspeed

No

Yes

is topspeed < slowest ?

slowest = topspeed

No

total = total + topspeed END count = count + 1 Output fastest, slowest, average

No

is count < 5001 ? Yes 7

average = total * 100/5000

8

START

books = 0, maps = 0, mags = 0

Example 5

input code

Is code = 9999?

END

Yes

output books, maps, mags

No

Yes

Is 999 < code < 2000

books + books + 1

No

Yes

Is 1999 < code < 3000

maps = maps + 1

No

Yes

Is 2999 < code < 4000

mags = mags + 1

No

output “error”

9

3

Dry running of flowcharts Dry running of flowcharts is basically a technique to: • • •

determine the output for a known set of data to check it carries out the task correctly check on the logic of the algorithm determine the function of the algorithm

When dry running a flowchart it is advisable to draw up a trace table showing how variables change their values at each stage in the algorithm. The advantages of doing this are: • • •

if you make a mistake, it is easier to back track to where the error occurred rather than starting from the beginning again there is less chance of an error being made encourages a more logical approach

The following three examples show all stages in the dry running for the given set of input data: 3.1

Example 1 This algorithm inputs 3 numbers, each number goes through successive division by 10 until its value is less than 1. An output is produced which contains the number input and a value generated by the flowchart processing. Data to be used: X = 85, 3190, -40

3.2

Example 2 This algorithm inputs 5 values and outputs how many input numbers were negative and how many were positive. Data to be used: N = 1, -5, 2, -8, -7

3.3

Example 3 This algorithm inputs the number of hours of sunshine recorded each day for a week (7 days). The output is the highest value for hours of sunshine and the average (mean) value for the numbers of hours of sunshine per day. Data to be used: hours = 9.0, 7.8, 1.2, 4.5, 10.0, 6.4, 3.1

10

START

input X

Example 1

N=1

T=X

X = X/10

Yes

Is X <1?

Output T,N

END

No

N=N+1

Trace Table X 85 8.5 0.85 3190 319 31.9 3.19 0.319 -40 -4

N

T

1 2

85

1 2 3 4

3190

1

-40

Output T, N

85, 2

3190, 4 -40, 1

11

START

C=1 neg = 0, pos = 0

Example 2

Input N

Is N < 0

Yes

neg = neg + 1

No

Is N > 0

Yes

pos = pos + 1

No

C=C+1

output neg, pos

Is C < 5

END

Trace Table C 1 2 3 4 5 6

N 1 -5 2 -8 -7

neg 0 1 2 3

pos

Output neg, pos

0 1 2

3, 2

12

START

Example 3

C=1

high = 0, total = 0

Input hours

Yes

Is hours > high

high = hours

No

total = total + hours

C=C+1

Yes

Is C < 7

No

output avge, high

avge = total/7

Trace Table C 1 2 3 4 5 6 7 8

hours 9 7.8 1.2 4.5 10 6.4 3.1

high 0 9 10

total 0 9 16.8 18 22.5 32.5 38.9 42

avge

Output avge, high

6

6, 10

13

END

4

Problems Questions 1 to 7 are problems which require an algorithm to be written in the form of a flowchart. Questions 8 to 10 require a trace table to be written and find the expected output for the given set of data. The answers to these questions can be found in booklet 6.

(1)

Regis lives in Brazil and often travels to USA, Europe and Japan. He wants to be able to convert Brazilian Reais into US dollars, European euros and Japanese yen. The conversion formula is: currency value = number of Reais X conversion rate For example, if Regis is going to USA and wants to take 1000 Reais (and the exchange rate is 0.48) then he would input USA, 1000 and 0.48 and the output would be: 480 US dollars. Write an algorithm, using a flowchart, which inputs the country he is visiting, the exchange rate and the amount in Brazilian Reais he is taking. The output will be value in foreign currency and the name of the currency.

(2)

As part of an experiment, a school measured the heights (in metres) of all its 500 students. Write an algorithm, using a flowchart, which inputs the heights of all 500 students and outputs the height of the tallest person and the shortest person in the school.

(3)

A geography class decide to measure daily temperatures and hours of sunshine per day over a 12 month period (365 days) Write an algorithm, using a flowchart, which inputs the temperatures and hours of sunshine for all 365 days, and finally outputs the average (mean) temperature for the year and the average (mean) number of hours per day over the year.

(4)

A small shop sells 280 different items. Each item is identified by a 3 – digit code. All items that start with a zero (0) are cards, all items that start with a one (1) are sweets, all items that start with a two (2) are stationery and all items that start with a three (3) are toys. Write an algorithm, using a flowchart, which inputs the 3 – digit code for all 280 items and outputs the number of cards, sweets, stationery and toys.

14

(5)

A company are carrying out a survey by observing traffic at a road junction. Each time a car, bus or lorry passed by the road junction it was noted down. 10 000 vehicles were counted during the survey. Write an algorithm, using an algorithm, which: • • •

(6)

inputs all 10000 responses outputs the number of cars, buses and lorries that passed by the junction during the survey outputs the number of vehicles that weren’t cars, buses or lorries during the survey

Speed cameras read the time a vehicle passes a point (A) on the road and then reads the time it passes a second point (B) on the same road (points A and B are 100 metres apart). The speed of the vehicle is calculated using: 100 (metres/sec)

speed = (time at point B – time at point A)

The maximum allowed speed is 100 kilometres per hour. 500 vehicles were monitored using these cameras over a 1 hour period. Write an algorithm, using a flowchart, which: • • • •

(7)

inputs the start time and end time for the 500 vehicles that were monitored calculate the speed for each vehicle using the formula above outputs the speed for each vehicle and also a message if the speed exceeded 100 km/hour output the highest speed of all the 500 vehicles monitored

There are ten stations on a railway line: 1 ------ 2 ------ 3 ------ 4 ------ 5 ------ 6 ------ 7 ------ 8 ------ 9 ------ 10 The train travels in both directions (i.e. from 1 to 10 and then from 10 to 1). The fare between each station is $2. A passenger inputs the number of the station at the start of his journey and the number of the destination station and the fare is calculated (e.g if a passenger gets on a station 3 and his destination is station 9 his fare will be $12). The calculation must take into account the direction of the train (e.g. a passenger getting on at station 7 and getting off at station 1 will also pay $12 and not a negative value!!). A discount of 10% is given if 3 or more passengers are travelling together.

15

Write an algorithm, using a flowchart, which: • • • • •

(8)

inputs the number of passengers travelling inputs the station number of the starting point and the station number of the destination calculates the total fare taking into account the direction of travel calculates any discount due outputs the cost of the tickets and prints the tickets

Draw the trace table and determine the output from the following flowchart using the following data: number = 45, -2, 20.5

START

input number

X=0

T = number

number = number - 10

X=X+1

No

Is number < 10

Yes

output X, number

END

16

(9)

Draw the trace table and determine the output from the following flowchart using the following data (NOTE: input of the word “end” stops the program and outputs results of the survey): vehicle = car, car, lorry, bus, van, van, car, car, bus, car, end START car = 0, bus = 0, lorry = 0, others = 0

input vehicle

is vehicle = end

Yes

output car, bus, lorry, others

No

is vehicle = car

Yes

car = car + 1

No

is vehicle = bus

Yes

bus = bus + 1

No

is vehicle = lorry

Yes

lorry = lorry + 1

No

others = others + 1

17

END

(10)

Draw the trace table and determine the output from the following flowchart using the following data: X = 5, -3, 0, -3, 7, 0, 6, -11, -7, 12 START

neg = 0, n = 0, pos = 0, p = 0

count = 1

input X

Yes

is X < 0

neg = neg + X n=n+1

No

is X > 0 Yes

pos = pos + X p=p+1

No

count = count + 1

is count <11

END

Yes No

output avge1, avge2

avge1 = neg/n avge2 = pos/p

18

Introduction tp pseudocode This section covers the use of pseudocode in the production of algorithms. Candidates should use standard computing text books to find out information on the features of programming languages (high level and low level), interpreters, compilers, assemblers, user documentation and technical documentation. No specific programming language is referred to; development of algorithms using pseudocode uses generic descriptions of looping, branching, data manipulation, input/output, totalling and counting techniques. The section is broken down into four areas: 1 2 3 4

description of common pseudocode terms writing algorithms using pseudocode finding errors in sections of pseudocode exercises

1

Common pseudocode terms 1.1

counting

Counting in 1s is quite simple; use of the statement count = count + 1 will enable counting to be done (e.g. in controlling a repeat loop). The statement literally means: the (new) count = the (old) count + 1 It is possible to count in any increments just by altering the numerical value in the statement (e.g. count = count – 1 counts backwards) 1.2

totalling

To add up a series numbers the following type of statement should be used: total = total + number This literally means (new) total = (old) total + value of number 1.3

input/output

Input and output indicated by the use of the terms input number, output total, print total, print “result is” x and so on. 1.4

branching

There are two common ways of branching: case of ….. otherwise …... endcase if ….. then ….. else ….. endif

19

case of

if … then

case number of

if number = 1 then x = x + 1 else if number = 2 then y = y + 1

1: x = x + 1

else print “error”

2: y = y + 1 otherwise print “error”

endif

endcase

endif

1.5

loops

There are three common ways of performing a looping function: for … to … next, while … endwhile and repeat … until The following example input 100 numbers and finds the total of the 100 numbers and outputs this total. All three looping techniques are shown:

for … to

while … endwhile

for count = 1 to 100

while count < 101

input number

input number

total = total + number next print total

repeat … until repeat input number

total = total + number

total = total + number

count = count + 1

count = count + 1

endwhile

until count = 100

print total

print total

20

2

Writing algorithms using pseudocode The following five examples use the above pseudocode terms. These are the same problems discussed in section 3.1 using flow charts – both methods are acceptable ways of representing an algorithm. 2.1

Example 1 A town contains 5000 houses. Each house owner must pay tax based on the value of the house. Houses over $200 000 pay 2% of their value in tax, houses over $100 000 pay 1.5% of their value in tax and houses over $50 000 pay 1% of their value in tax. All others pay no tax. Write an algorithm to solve the problem using pseudocode. for count = 1 to 5000 input house if house > 50 000 then tax = house * 0.01 else if house > 100 000 then tax = house * 0.015 else if house > 200 000 then tax = house * 0.02 else tax = 0 print tax next Notes: (1) a while loop or a repeat loop would have worked just as well (2) the use of endif isn’t essential in the pseudocode For example, count = 0 while count < 5001 input house if house > 50 000 then tax = house * 0.01 else if house > 100 000 then tax = house * 0.015 else if house > 200 000 then tax = house * 0.02 else tax = 0 endif endif endif print tax count = count + 1 endwhile

21

EXERCISE: Re-write the above algorithm using a repeat loop and modify the if … then … else statements to include both parts of the house price range. (e.g. if house > 50000 and house <= 100000 then tax = house * 0.01)

2.2

Example 2 The following formula is used to calculate n: n = x * x/(1 – x) The value x = 0 is used to stop the algorithm. The calculation is repeated using values of x until the value x = 0 is input. There is also a need to check for error conditions. The values of n and x should be output. Write an algorithm to show this repeated calculation using pseudocode. NOTE: It is much easier in this example to input x first and then loop round doing the calculation until eventually x = 0. Because of this, it would be necessary to input x twice (i.e. inside the loop and outside the loop). If input x occurred only once it would lead to a more complicated algorithm. (Also note in the algorithm that <> is used to represent ≠ ). A while loop is used here, but a repeat loop would work just as well. input x while x <> 0 do if x = 1 then print “error” else n = (x * x)/(1 – x) print n, x endif input x endwhile

22

2.3

Example 3 Write an algorithm using pseudocode which takes temperatures input over a 100 day period (once per day) and output the number of days when the temperature was below 20C and the number of days when the temperature was 20C or above. (NOTE: since the number of inputs is known, a for … to loop can be used. However, a while loop or a repeat loop would work just as well). total1 = 0: total2 = 0 for days = 1 to 100 input temperature if temperature < 20 then total1 = total1 + 1 else total2 = total2 + 1 endif next print total1, total2 This is a good example of an algorithm that could be written using the case construct rather than if … then … else. The following section of code replaces the statements if temperature < 20 then …… endif: case temperature of 1: total1 = total1 + 1 2: total2 = total2 + 1 endcase

2.4

Example 4 Write an algorithm using pseudocode which: • • •

inputs the top speeds of 5000 cars outputs the fastest speed and the slowest speed outputs the average speed of all the 5000 cars

(NOTE: Again since the actual number of data items to be input is known any one of the three loop structures could be used. It is necessary to set values for the fastest (usually set at zero) and the slowest (usually set at an unusually high value) so that each input can be compared. Every time a value is input which > the value stored in fastest then this input value replaces the existing value in fastest; and similarly for slowest).

23

fastest = 0: count = 0 slowest = 1000 repeat input top_speed total = total + top_speed if top_speed > fastest then fastest = top_speed if top_speed < slowest then slowest = top_speed endif endif count + count + 1 until count = 5000 average = total * 100/5000 print fastest, slowest, average

2.5

Example 5 A shop sells books, maps and magazines. Each item is identified by a unique 4 – digit code. All books have a code starting with a 1, all maps have a code starting with a 2 and all magazines have a code beginning with a 3. The code 9999 is used to end the program. Write an algorithm using pseudocode which input the codes for all items in stock and outputs the number of books, maps and magazine in stock. Include any validation checks necessary. (NOTE: A 4-digit code implies all books have a code lying between 1000 and 1999, all maps have a code lying between 2000 and 2999 and all magazines a code lying between 3000 and 3999. Anything outside this range is an error)

24

books = 0: maps = 0: mags = 0 repeat input code if code > 999 and code < 2000 then books = books + 1 else if code > 1999 and code < 3000 then maps = maps + 1 else if code > 2999 and code < 4000 then mags = mags + 1 else print “error in input” endif:endif:endif until code = 9999 print books, maps, mags (NOTE: A function called INT(X) is useful in questions like this. This returns the integer (whole number) part of X e.g. if X = 1.657 then INT(X) = 1; if X = 6.014 then INT(X) = 6 etc. Using this function allows us to use the case statement to answer this question:

books = 0: maps = 0: mags = 0 repeat input code * divides code by 1000 to give a

x = INT(code/1000)

* number between 0 and 9

case x of 1: books = books + 1 2: maps = maps + 1 3: mags = mags + 1 otherwise print “error” endcase until code = 9999 print books, maps, mags

this is probably a more elegant but more complex solution to the problem)

25

4

PROBLEMS

Questions 1 to 3 contain sections of pseudocode which contain errors. Locate the errors and suggest the correct coding. Questions 4 to 10 are problems which require an algorithm to be written in pseudocode – there is “no right answer” here; as long as the pseudocode works then the solution is acceptable. (1)

The following section of pseudocode inputs 1000 numbers and then outputs how many were negative, how many were positive and how many were zero. Locate the 3 errors and suggest a corrected piece of code. 1 2 3 4 5 6 7 8 9

(2)

negative = 1: positive = 1 for x = 0 to 1000 input number if number < 0 then negative = negative + 1 if number > 0 then positive = positive + 1 endif endif next print negative, positive

The following section of pseudocode inputs rainfall (in cm) for 500 days and outputs the average rainfall and the highest rainfall input. Locate the 3 errors and suggest a corrected piece of code. 1 2 3 4 5 6 7 8 9 10 11

(3)

highest = 1000 days = 1 while days > 0 input rainfall if rainfall > highest then highest = rainfall endif total = total + rainfall days = days + 1 average = total/500 endwhile print average, highest

The following section of pseudocode inputs a number, n, multiplies together 1 x 2 x 3 x ……. x n, calculates input number/sum and outputs result of the calculation. Locate the 3 errors and suggest a corrected piece of code. 1 2 3 4 5 6 7

input n for mult = 1 to n sum = 0 sum = sum * mult result = n/sum next print result

26

(4)

Regis lives in Brazil and often travels to USA, Europe and Japan. He wants to be able to convert Brazilian Reais into US dollars, European euros and Japanese yen. The conversion formula is: currency value = number of Reais X conversion rate For example, if Regis is going to USA and wants to take 1000 Reais (and the exchange rate is 0.48) then he would input USA, 1000 and 0.48 and the output would be: 480 US dollars. Write an algorithm, using pseudocode, which inputs the country he is visiting, the exchange rate and the amount in Brazilian Reais he is taking. The output will be value in foreign currency and the name of the currency.

(5)

As part of an experiment, a school measured the heights (in metres) of all its 500 students. Write an algorithm, using pseudocode, which inputs the heights of all 500 students and outputs the height of the tallest person and the shortest person in the school.

(6)

A geography class decide to measure daily temperatures and hours of sunshine per day over a 12 month period (365 days) Write an algorithm, using pseudocode, which inputs the temperatures and hours of sunshine for all 365 days, and finally outputs the average (mean) temperature for the year and the average (mean) number of hours per day over the year.

(7)

A small shop sells 280 different items. Each item is identified by a 3 – digit code. All items that start with a zero (0) are cards, all items that start with a one (1) are sweets, all items that start with a two (2) are stationery and all items that start with a three (3) are toys. Write an algorithm, using pseudocode, which inputs the 3 – digit code for all 280 items and outputs the number of cards, sweets, stationery and toys.

(8)

A company are carrying out a survey by observing traffic at a road junction. Each time a car, bus, lorry or other vehicle passed by the road junction it was noted down. 10 000 vehicles were counted during the survey. Write an algorithm, using pseudocode, which: • • •

inputs all 10000 responses outputs the number of cars, buses and lorries that passed by the junction during the survey outputs the number of vehicles that weren’t cars, buses or lorries during the survey

27

(9)

Speed cameras read the time a vehicle passes a point (A) on the road and then reads the time it passes a second point (B) on the same road (points A and B are 100 metres apart). The speed of the vehicle is calculated using: 100 (metres/sec)

speed = (time at point B – time at point A)

The maximum allowed speed is 100 kilometres per hour. 500 vehicles were monitored using these cameras over a 1 hour period. Write an algorithm, using pseudocode, which: • • • •

(10)

inputs the start time and end time for the 500 vehicles that were monitored calculate the speed for each vehicle using the formula above outputs the speed for each vehicle and also a message if the speed exceeded 100 km/hour output the highest speed of all the 500 vehicles monitored

There are ten stations on a railway line: 1 ------ 2 ------ 3 ------ 4 ------ 5 ------ 6 ------ 7 ------ 8 ------ 9 ------ 10 The train travels in both directions (i.e. from 1 to 10 and then from 10 to 1). The fare between each station is $2. A passenger inputs the number of the station at the start of his journey and the number of the destination station and the fare is calculated (e.g if a passenger gets on a station 3 and his destination is station 9 his fare will be $12). The calculation must take into account the direction of the train (e.g. a passenger getting on at station 7 and getting off at station 1 will also pay $12 and not a negative value!!). A discount of 10% is given if 3 or more passengers are travelling together. Write an algorithm, using pseudocode, which: • • • • •

inputs the number of passengers travelling inputs the station number of the starting point and the station number of the destination calculates the total fare taking into account the direction of travel calculates any discount due outputs the cost of the tickets and prints the tickets

28

Introduction to Logic Many electronic circuits operate using binary logic gates. Logic gates basically process signals which represent true or false or the equivalent i.e. ON or OFF, 1 or 0 Whilst there are a number of logic gates, only the five simplest are covered in this booklet: NOT gate, AND gate, OR gate, NAND gate and NOR gate. The following notes describe the function of all five gates, how to produce truth tables, how to design networks using logic gates, and how to determine the output from a logic network. The five main logic gates The most common symbols used to represent logic gates are shown below. To avoid confusion the graphical representations will be used in exam questions but candidates may use either set of symbols when answering questions. 1 simple graphical representations

NOT

AND

OR

NAND

NOR

2 MIL symbols used to represent logic gates

NOT gate

AND gate

OR gate

NAND gate

NOR gate

Truth tables are used to show logic gate functions (refer to next section). The NOT gate has only one input (and one output) but the other four gates have two inputs (but still only one output). The next section describes the function of all five logic gates.

29

Description of the function of the five logic gates The NOT gate A

NOT

A

X

The output (called X) is true (i.e. 1 or ON) when the INPUT A is NOT TRUE (i.e. 0 or OFF). INPUT A 1 0

X = NOT A

OUTPUT X 0 1

The AND gate A

A AND

B

X

X B

The output (called X) is only true (i.e. 1 or ON) if the (INPUT A AND INPUT B) are both true (i.e. 1 or ON). INPUT A 1 1 0 0

= A AND B

X = A OR B

X

INPUT B 1 0 1 0

OUTPUT X 1 0 0 0

The OR gate A

A OR

X

X

B

B

The output (called X) is true (i.e. 1 or ON) if the (INPUT A OR INPUT B) are true (i.e. 1 or ON). INPUT A 1 1 0 0

30

INPUT B 1 0 1 0

OUTPUT X 1 1 1 0

The NAND gate A

A

X

X

NAND

B

B

This is basically an AND gate with the output X inverted. The output (called X) is true (i.e. 1 or ON) if (INPUT A AND INPUT B) are NOT both true (i.e. 1 or ON). INPUT A 1 1 0 0

OT (A AND B)

NOT (A OR B)

INPUT B 1 0 1 0

OUTPUT X 0 1 1 1

The NOR gate A

A NOR

X

X

B

B

This is basically an OR gate with the output X inverted. The output (called X) is true (i.e. 1 or ON) if NOT (INPUT A OR INPUT B) are true (i.e. 1 or ON). INPUT A 1 1 0 0

INPUT B 1 0 1 0

OUTPUT X 0 0 0 1

The tables above containing 1s and 0s are known as truth tables and are an integral part of logic gates functionality. These are used extensively throughout this booklet in the design and testing of logic networks built up from logic gates.

31

Combinations of logic gates It is possible to combine logic gates together to produce more complex logic networks. This booklet will only deal with a maximum of three inputs and up to six logic gates. The output from a logic network is checked by producing the truth table (as shown in the examples below). We will deal with two different scenarios here. The first involves drawing the truth table from a given logic network; the second involves designing a logic network for a given problem and then testing it by drawing the truth table. Producing the truth table from a given logic network Consider the following logic network which contains three inputs and three logic gates: A

S NOR

B OR

X

AND C

T

If we now look at the output in two stages. First let us consider the outputs being produced at stages S and T. To do this we need to draw a truth table. There are three inputs (A, B and C) which gives 23 (i.e. 8) possible combinations of 1s and 0s. To work out the outputs at S and T we need to refer to the truth tables for the NOR gate and for the AND gate. For example, when A = 1 and B = 1 then we have 1 NOR 1 which gives the value of S = 0. Continuing doing the same thing for all 8 possible inputs we get the following interim truth table: A

A 1 1 1 1 0 0 0 0

S

T

32

B 1 1 0 0 1 1 0 0

C 1 0 1 0 1 0 1 0

S 0 0 0 0 0 0 1 1

T 1 0 0 0 1 0 0 0

The final stage involves S OR T. S 0 0 0 0 0 0 1 1

T 1 0 0 0 1 0 0 0

A 1 1 1 1 0 0 0 0

B 1 1 0 0 1 1 0 0

X 1 0 0 0 1 0 1 1

This gives the final truth table:

X

C 1 0 1 0 1 0 1 0

X 1 0 0 0 1 0 1 1

Designing logic networks to solve a specific problem and testing using truth tables Consider the following problem: “If button A or button B are on and button C is off then the alarm X goes on” We can convert this onto logic gate terminology (ON = 1 and OFF = 0): If (A = 1 OR B = 1) AND (C = NOT 1) then (X = 1) (Notice: rather than write 0 we use NOT 1) To draw the logic network, we do each part in brackets first i.e. A = 1 OR B = 1 is one gate then C = NOT 1 is the second gate. These are then joined together by the AND gate. Once the logic network is drawn we can then test it using a truth table. Remember the original problem – we are looking for the output to be 1 when A or B is 1 and when C is 0. Thus we get the following logic network and truth table from the network. Looking at the values in the truth table, we will be able to clearly see that it matches up with the original problem which then gives us confidence that the logic network is correct.

33

A 1 1 1 1 0 0 0 0

X

AND

B 1 1 0 0 1 1 0 0

C 1 0 1 0 1 0 1 0

X 0 1 0 1 0 1 0 0

Let us now consider a second problem: A steel rolling mill is to be controlled by a logic network made up of AND, OR and NOT gates only. The mill receives a stop signal (i.e. S = 1) depending on the following input bits: INPUT L T V

BINARY VALUE 1 0 1 0 1 0

CONDITION Length > 100 metres Length < 100 metres Temperature < 1000 C Temperature < 1000 C Velocity > 10 m/s Velocity < 10 m/s

A stop signal (S = 1) occurs when: either Length, L > 100 metres and Velocity, V < 10 m/s or

Temperature, T < 1000 C and Velocity, V > 10 m/s

Draw a logic network and truth table to show all the possible situations when the stop signal could be received. The first thing to do is to try and turn the question into a series of logic gates and then the problem becomes much simplified. • • •

The first statement can be re-written as: (L = 1 AND V = NOT 1) since Length > 100 metres corresponds to a binary value of 1 and Velocity < 10 m/s corresponds to a binary value of 0 (i.e. NOT 1). The second statement can be re-written as (T = NOT 1 AND V = 1) since Temperature < 1000C corresponds to a binary value of 0 (i.e. NOT 1) and Velocity > 10 m/s corresponds to a binary value of 1 Both these statements are joined together by OR which gives us the logic statement: if (L = 1 AND V = NOT 1) OR (T = NOT 1 AND V = 1) then S = 1

We can now draw the logic network and truth table to give the solution to the original problem (input L has been put at the bottom of the diagram just to avoid crossing over of lines; it merely makes it look neater and less complex and isn’t essential):

34

T NOT

AND V NOT

S

OR

L

AND

L 1 1 1 1 0 0 0 0

T 1 1 0 0 1 1 0 0

V 1 0 1 0 1 0 1 0

S 0 1 1 1 0 0 1 0

PROBLEMS In questions 1 to 6, produce truth tables from the given logic networks. Remember that if there are TWO inputs then there will be four (22) possible outputs and if there are THREE inputs there will be eight (23) possible outputs. i.e. A 1 1 1 1 0 0 0 0

B 1 1 0 0 1 1 0 0

C 1 0 1 0 1 0 1 0

X

A 1 1 0 0

35

B 1 0 1 0

X

(1) A

OR

NOT X OR

AND B (2)

A

NOT

OR

NOT X OR

AND B (3)

A NOR

NAND

X AND

NOT

B

(4) A

OR B OR X

AND

AND

C

36

(5) A

AND

NOT X NOR

B OR NAND

C

(6) NOT A OR AND

X

OR B OR AND

C

Questions 7 to 10 require both the logic network to be created and also the truth table. The truth table can be derived from the logic network, but also from the problem. This is a check that the logic network actually represents the original problem.

(7)

A computer will only operate if three switches P, S and T are correctly set. An output signal (X = 1) will occur if R and S are both ON or if R is OFF and S and T are ON. Design a logic network and draw the truth table for this network.

37

(8)

A traffic signal system will only operate if it receives an output signal (D = 1). This can only occur if: either (a) signal A is red (i.e. A = 0) or (b) signal A is green (i.e. A = 1) and signals B and C are both red (i.e. B and C are both 0) Design a logic network and draw a truth table for the above system.

(9)

A chemical plant gives out a warning signal (W = 1) when the process goes wrong. A logic network is used to provide input and to decide whether or not W = 1. Input C T X

Binary Value 1 0 1 0 1 0

Plant Status Chemical Rate = 10 m3/s Chemical Rate < 10 m3/s Temperature = 87 C Temperature > 87 C Concentration > 2 moles Concentration = 2 moles

A warning signal (W = 1) will be generated if either (a) Chemical Rate < 10 m3/s or (b) Temperature > 87 C and Concentration > 2 moles or (c) Chemical rate = 10 m3/s and Temperature > 87 C Draw a logic network and truth table to show all the possible situations when the warning signal could be received. (10)

A power station has a safety system based on three inputs to a logic network. A warning signal (S = 1) is produced when certain conditions occur based on these 3 inputs: Input T P W

Binary Value 1 0 1 0 1 0

Plant Status Temperature > 120C Temperature < 120C Pressure > 10 bar Pressure < 10 bar Cooling Water > 100 l/hr Cooling Water < 100 l/hr

A warning signal (S = 1) will be generated if: either (a) Temperature > 120C and Cooling Water < 100 l/hr or (b) Temperature < 120C and (Pressure > 10 bar or Cooling Water < 100 l/hr) Draw a logic network and truth table to show all the possible situations when the warning signal could be received.

38

Booklet 3.1 – answers and hints

(1) START

INPUT country

INPUT conv rate

INPUT reais

currency_value = reais x conv_rate

Is country = USA?

Yes OUTPUT “$”, currency_value

No

Is country = Europe?

Yes

OUTPUT “€”, currency_value

Yes

OUTPUT “¥”, currency_value

No

Is country = Japan?

No OUTPUT “error”

STOP

11

(2)

START

tallest = 0

smallest = 1000

count = 1

INPUT height

Yes

Is height > tallest ?

tallest =height

No

Yes

is height < smallest?

smallest = height

No

count = count + 1

Yes

No

Is count <= 500?

OUTPUT tallest, smallest

STOP

12

(3) START

count = 1: sum_temp = 0: sum_hours = 0

INPUT temp, hours

sum_temp = sum_temp + temp

sum_hours = sum_hours + hours

count = count + 1

Yes

Is count <= 365?

No

mean_temp = sum_temp/365 mean_hours = sum_hours/365

OUTPUT mean_temp, mean_hours

STOP

13

(4)

START

count = 1: cars = 0: stationery = 0: toys = 0

INPUT code

Is code < 100?

Yes cards = cards + 1

No

Yes

Is code < 200 and code > 99 ?

stationery = stationery + 1

No

Yes

Is code < 300 and code > 199 ?

toys = toys + 1

No

count = count + 1

STOP

Yes

is count <= 280?

No

OUTPUT cards, stationery, toys

14

(5) START

count = 1: cars = 0: buses = 0: lorry = 0: others = 0

INPUT vehicle

Is vehicle = car?

Yes

cars = cars + 1

No

Is vehicle = bus?

Yes buses = buses + 1

No

Is vehicle = lorry?

Yes

lorry = lorry + 1

No others = others + 1

count = count + 1

Yes

Is count <= 10000?

No

OUTPUT cars, buses, lorry, others

STOP

15

(6)

START

highest = 0

count = 1

INPUT start time

INPUT end time

speed = 100/(end_time – start_time)

speed = speed * 3.6

Is speed > 100?

Yes

OUTPUT “message”

No OUTPUT speed

Is speed > highest ?

Yes highest = speed

No count = count + 1

Yes

Is count <=500 ?

No

16

OUTPUT highest

STOP

(7) START

INPUT start

INPUT end

Is end > start ?

Yes

no_stations = end - start

No no_stations = start - end

cost = no_stations x 2

INPUT no_passengers

Is no_passengers > 2?

Yes cost = 0.9 x cost

No final_cost = cost x no_passengers

count = 1

OUTPUT ticket

Yes

Is count <= no_passengers ?

count = count + 1

17

No STOP

(8) (NOTE: there is an error in the question in booklet 3.1 – output box should read: OUTPUT X,T) number 45 35 25 15 5

X 0 1 2 3 4

T 45

-2 -12

0 1

-2

20.5 10.5 0.5

0 1 2

20.5

OUTPUT

4, 45

1, -2

2, 20.5

(9) (NOTE: there is an error in the question in booklet 3.1 – the “others = others + 1” statement should by-pass all the other counting procedures) vehicle car car lorry bus van van car bus car end

car 0 1 2 3 4

bus 0 1 2

lorry 0 1

other 0 1 2

OUTPUT

4, 2, 1, 2 (10) count 1 2 3 4 5 6 7 8 9 10 11

X 5 -3 0 -3 7 0 6 -11 -7 12

n 0 1 2 3 4

neg 0 -3 -6 -17 -24

p 0 1 2 3 4

18

pos 0 5 12 18 30

avge1

avge2

OUTPUT

-6

7.5

-6, 7.5

Booklet 3.2 – answers and hints (1)

Three errors: line 1 2 6

error

correction

totals should be zero loops 1001 times no checks for zeros Input

negative = 0: positive = 0 for x = 1 to 1000 if number = 0 then zero = zero + 1 (OR else zero = zero + 1 )

(lines 6 to 9 need to be re-numbered 7 to 10; also need to add the following: zero = 0 in line 1 and add zero to output list at the end of the algorithm)

(2)

Three errors: line 1 3 9

(3)

correction

wrongly set value while loops never stops average needs to be outside while loop

highest = 0 while days <= 5000 do line 9: endwhile line 10: average = total/500

error

correction

sum = 0 inside loop sum = 0 initial value calculation

should be set outside loop before line 1 this value should be sum = 1 result = n/sum should come between lines 6 and 7

Three errors: line 3 3 5

(4)

error

1 input country 2 input conv_rate 3 input no_reais 4 currency_value = no_reais * conv_rate 5 if country = USA then print “$”, currency_value 6 if country = Europe then print “€”, currency_value 7 if country = Japan then print “¥”, currency_value

19

(5)

1 tallest = 0 2 shortest = 500 3 for count = 1 to 500 do 4

input height

5

if height > tallest then tallest = height

6

if height < smallest then smallest = height

7 next 8 print tallest, shortest

(6)

1 sum_temp = 0: sum_hours = 0 2 for count = 1 to 365 do 3

input temp, hours

4

sum_temp = sum_temp + temp

5

sum_hours = sum_hours + hours

6 next 7 mean_temp = sum_temp/365 8 mean_hours = sum_hours/365 9 print mean_temp, mean_hours

(7)

1 cards = 0: stationery = 0: toys = 0 2 for count = 1 to 280 do 3

input code

4

if code < 100 then cards = cards + 1

5

if code > 99 and code < 200 then stationery = stationery + 1

6

if code > 199 and code < 300 then toys = toys + 1

7

else print “error”

8 next 9 print cards, stationery, toys

(8)

1 cars = 0: buses = 0: lorry = 0: others = 0 2 for count = 1 to 10000 do 3

input vehicle

4

if vehicle = car then cars = cars + 1

5

if vehicle = bus then buses = buses + 1

6

if vehicle = lorry then lorry = lorry + 1

7

else others = others + 1

8 next 9 print cars, buses, lorry, others 20

(9)

1 highest = 0 2 for count = 1 to 500 do 3

input start_time, end_time

4

speed = 100/(end_time – start_time)

5

speed = speed * 3.6

6

if speed <= 100 then print “speed is OK”

7

{NOTE: m/second} {NOTE: conversion to km/hour}

else print “maximum speed exceeded”

8

print speed

9

if speed > highest then highest = speed

10 next 11 print highest

(10) 1 input start 2 input end 3 if end > start then no_stations = end – start 4

else no_stations = start – end

5

cost = no_stations * 2

6

input no_passengers

7

if no_passengers > 2 then cost = 0.9 * cost

8

final_cost = cost * no_passengers

9 print final_cost 10 print tickets

[NOTE: it is possible to use other loop structures other than for …. to; the algorithms would work equally as well with repeat …. until or while …. endwhile. The for …. to loops work particularly well when an exact count is known (e.g. exactly 100 temperatures). If we had to input temperatures until they became negative it would be best to use a while or repeat loop, for example].

21

Booklet 3.3 – answers and hints (1) A 1 1 0 0

B 1 0 1 0

X 1 0 0 1

A 1 1 0 0

B 1 0 1 0

X 1 1 0 0

A 1 1 0 0

B 1 0 1 0

X 0 1 0 0

A 1 1 1 1 0 0 0 0

B 1 1 0 0 1 1 0 0

C 1 0 1 0 1 0 1 0

X 1 0 1 0 1 0 0 0

A 1 1 1 1 0 0 0 0

B 1 1 0 0 1 1 0 0

C 1 0 1 0 1 0 1 0

X 1 0 0 0 0 0 0 0

(2)

(3)

(4)

(5)

22

(6) A 1 1 1 1 0 0 0 0

(7)

B 1 1 0 0 1 1 0 0

C 1 0 1 0 1 0 1 0

X 1 0 1 0 1 1 1 1

Statement: X = 1 if ( R = 1 AND S = 1 ) OR ( R = NOT 1 AND ( S = 1 AND T = 1)) Truth table: R 1 1 1 1 0 0 0 0

S 1 1 0 0 1 1 0 0

T 1 0 1 0 1 0 1 0

X 1 1 0 0 1 0 0 0

Logic network:

AND

T

AND

NOT OR X R

AND

S

23

(8)

Statement: D = 1 if ( A = NOT 1 ) OR ( A = 1 AND ( B = NOT 1 AND C = NOT 1)) Truth table: A 1 1 1 1 0 0 0 0

B 1 1 0 0 1 1 0 0

C 1 0 1 0 1 0 1 0

D 0 0 0 1 1 1 1 1

Logic network: A NOT OR D AND

NOT B AND NOT C

(9)

Statement: W = 1 if ( C = NOT 1 ) OR ( T = 1 AND X = 1 ) OR ( C = 1 AND T = NOT 1 ) Truth table:

C 1 1 1 1 0 0 0 0

T 1 1 0 0 1 1 0 0

X 1 0 1 0 1 0 1 0

24

W 1 0 1 1 1 1 1 1

Logic network:

NOT C AND

NOT

OR

T

W OR AND

X

(10) Statement: S = 1 if ( T = 1 AND W = NOT 1 ) OR ( T = NOT 1 AND ( P = 1 OR W = NOT 1)) Truth table: T 1 1 1 1 0 0 0 0

P 1 1 0 0 1 1 0 0

W 1 0 1 0 1 0 1 0

S 0 1 0 1 0 1 0 0

Logic network:

P

OR

AND NOT S

W OR AND NOT T

25

Booklet 4

This covers the following topics found in section 4 of the computer studies syllabus:

Item 1 2 3 4 5 6 7 8 9 10 11 12 13 14

Topic Automatic data capture Validation techniques Check digits Verification techniques Files Binary data Word processors Desk top publishing (DTP) Spreadsheets Databases (DBMS) Authoring software “Off the shelf”/bespoke software Macros Problems based on section 4 topics

1

Page numbers 2 3 4 5 5 5 7 8 8 11 12 12 13 14

4.1

Data

Automatic Data Capture There are many techniques available to collect data automatically without the need for manual entry. Manual entry is slower, more expensive (need to employ people to key in data) and also prone to error (e.g. typing in 4.1 instead of 1.4). The following is a list of available automatic data capture techniques: Data logging

this technique involves collecting data automatically using sensors; often used when doing scientific experiments or monitoring a system (examples of sensors is given in booklet 5).

Barcode readers

these take data from printed barcodes and allow automatic stock control in, for example, supermarkets.

Radio Frequency Identification (RFID)

this method involves using small electronic devices containing a microchip and antenna; they work in a similar way to bar codes but can be read from a distance of 5 metres; often used to track live stock, vehicles, library books and goods sold in shops.

Biometrics

this involves obtaining data and identifying characteristics automatically in security systems e.g. use of finger prints, palm prints, facial images and iris prints.

Magnetic stripes

these contain information/data stored on magnetic material often on the back of a credit/debit card; the information is automatically read by swiping the magnetic stripe past a reading head.

Optical character information on paper is automatically read by a scanner and is recognition (OCR) then analysed/processed by OCR software and stored in an electronic format. Voice recognition

these systems recognise spoken words e.g. for disabled people who can’t use keyboards where they speak commands instead of having to type.

Smart cards

these contain embedded microchips and receive power from the card readers; the microchip is made up of RAM, ROM and 16bit processor and the stored data is automatically read by the card reader; used in credit cards, security cards, loyalty cards, etc.

Optical mark OMR technology scans a printed form and reads pre-defined recognition (OMR) positions (where specific fields have been filled in e.g. ●─● or ▄); the system records where marks have been made so can automatically determine responses to, for example, a questionnaire.

2

Data Collection Data collection can be either automatic (see previous page) or manual. Manual techniques can involve: -

keyboards/keypads to type in data touch screens to select data/options

Validation Techniques Validation is a process of checking if data satisfies certain criteria when input i.e. falls within accepted boundaries. Examples of validation techniques include: Range check

this checks whether data is within given/acceptable values e.g. checks if a person’s age is > 0 but is also < 140.

Length check

this checks if the input data contains the required number of characters e.g. if a field needs 6 digits, then inputting 5 digits or 7 digits, for example, should be rejected.

Character check check)

this checks that the input data doesn’t contain invalid (type characters; e.g. a person’s name shouldn’t contain numbers.

Format check (picture check)

this checks that data is in a specified format (template) e.g. date should be in the form dd/mm/yyyy.

Limit check

this is similar to a range check except only ONE of the limits (boundaries) is checked e.g. input data must be > 10.

Presence check

check that data is actually present and not missed out e.g. in an electronic form, somebody’s telephone number may be a required field.

Consistency check/ Cross field check

this checks if fields correspond (tie up) with each other e.g. if Mr. has been typed into a field called “Title” then the “Gender” field must contain M or Male.

Check digit

this is an extra digit added to a number which is calculated from the digits; the computer re-calculates and validates the check digit following input of the number (see next page). (NOTE: check digits can identify 3 types of error: (1) if 2 digits have been inverted e.g. 23459 instead of 23549 (2) an incorrect digit entered e.g. 23559 instead of 23549 (3) a digit missed out all together e.g. 2359 instead of 23549)

3

This section shows how check digits are calculated. The ISBN-10 (used on books) has been chosen as the example; this uses a modulo 11 system which includes the letter X to represent the number 10. Example 1 To calculate the check digit for the ISBN 0 - 2 0 1 - 5 3 0 8 2 - ? (i)

the position of each digit is considered: 10

← digit position

9 8 7 6 5 4 3 2 1

← number

0 - 2 0 1-5 3 0 8 2-?

(ii)

each digit is then multiplied by its digit position and the totals added together 0 x 10 + 2 x 9 + 0 x 8 + 1 x 7 + 5 x 6 + 3 x 5 + 0 x 4 +8 x 3 + 2 x 2 = 0 + 18 + 0 + 7 + 30 + 15 + 0 + 24 + 4 = 98

(iii)

the total is then divided by 11 (modulo – 11) and the remainder, if any, is subtracted from 11 to give the check digit. 98 ÷ 11 = 8 remainder 10 11 – 10 = 1 this gives a check digit of 1 final ISBN becomes 0 -2 0 1 - 5 3 0 8 2 - 1

Example 2 To check the correctness of a check digit the computer re-calculates it as follows: The ISBN to check is: 0 - 1 3 1 5 - 2 4 4 7 - X (i)

the position of each digit is considered: 10

← digit position

9 8 7 6 5 4 3 2 1

← number

0 - 1 3 1-5 2 4 4 7-X (ii)

each digit is then multiplied by its digit position and the totals added together 0 x 10 + 1 x 9 + 3 x 8 + 1 x 7 + 5 x 6 + 2 x 5 + 4 x 4 + 4 x 3 + 7 x 2 + X x 1 = 0 + 9 + 24 + 7 + 30 + 10 + 16 + 12 + 14 + 10

(recall that X = 10)

= 132 (iii)

the total is then divided by 11; if there is no remainder then the check digit is correct: 132 ÷ 11 = 12 remainder 0 hence the check digit is correct

4

Verification Verification is a way of preventing errors when data is copied from one medium to another (e.g. from paper to disk/CD, from memory to DVD, etc.). There are a number of ways in which verification can be done: Double entry

in this method, data is entered twice (using two different people); the data is only accepted if both versions match up. Often used to verify passwords by asking them to be typed in again by the same person.

Visual check

this is checking for errors by comparing entered data with the original document (NOTE: this is not the same as proof reading!!).

Parity check

this is used to check data following potential transmission errors; an extra bit is added to each binary number before transmission – e.g. EVEN parity makes sure each number has an even number of 1 – bits; Example: if

11000110 is sent (four 1’s)

and 11100110 is received (five 1’s) then the system will know an error has occurred.

4.2

Files

File maintenance is important. Updating of files usually involves amending, inserting and deleting data. Example A bank would amend data if a customer changed their personal details (e.g. telephone number, address or their name through marriage). Data would need to be inserted if a new customer joined the bank and deletion of data would occur if a customer left the country or died (in both cases their accounts would be closed).

4.3

Binary Data

Controlled devices usually contain registers which are made up of binary digits (bits). The following example shows how these registers can be used to control a device. Example

The device on the left is a mobile trolley with 3 wheels. All three wheels can turn left or right and each wheel has its own electric driving motor. Sensors at the front and rear of the trolley detect an object in its path which would subsequently stop all movement. An 8-bit register is used to control the device. these represent the three wheels these represent the three sensors

5

Front wheel turns left (on/off)

Rear wheels turn left (on/off)

Front wheel turns right (on/off)

Forward direction (on/off) Backward direction (on/off)

Rear wheels turn right (on/off)

Motor (on/off)

Error (object in the way = 1, clear path = 0)

(1 = ON and 0 = OFF) Therefore, means:

10101010 front wheel turns left back wheels turn left the direction is forward the motors are on

therefore the trolley is moving forward and turning left. (i)

What does this register mean?

00010111 (ii)

?

How would the following be represented using the above register? - front wheel turning right - back wheels turning left - moving in a forward direction - motors on - no object in its path

Answers (i)

- front wheel not turning left or right - rear wheels turning right - going in backward direction - motors on - error – object in path So the vehicle is going nowhere.

(ii)

01101010

6

4.4

Software

Some of the key features of software are considered in this section. Familiarisation with software packages is usually best achieved by carrying out a variety of tasks on the computer. Word processors Word processors now have many features over and above the original task of generating a typed document. This section will concentrate purely on word processing features.

Sample of a word processing page showing icons and functions available Main features available in all word processors: - ability to set the page size and page orientation - ability to change font style and font size (e.g. arial, courier, times new roman, etc.) - ability to change margins (top, bottom and sides) - page format (e.g. paragraphs, columns, etc.) - importing text, graphics and pictures into the document body - inserting and deleting text - cut and paste/copy and paste (to prevent the need to re-type sections of text or to move/remove text) - search and replace based on key words - word wrap (e.g. auto adjust a line to fit into paragraph alignment such as straight margins on left and right, etc.) - file management (create/delete/move/search for files) - headers and footers and the automatic numbering of pages - graphics (embed drawings and graphs into the document)

7

-

macros (see later notes) merge (merge text files from one file into another e.g. mail merge) ability to send documents to a printer carry out a word count on the document add and manipulate tables in the main body of the document windows (edit 2 or more documents at the same time) WYSIWYG (what you see is what you get) – preview document to see how it will look when printed - spell checkers, language check and thesaurus - simple translation from one language to another; for example:

This is an example of a document translated from English to French C'est un exemple d'un document traduit d'anglais-français

Desk Top Publishing (DTP) As word processors develop increasingly more sophisticated features, the differences with desk top publishing (DTP) packages becomes more and more blurred. Essentially in DTP, a user creates a page layout with text, graphics, photos and other elements. The following is a list of key differences to word processors: - most word processors force users to work on a document in a linear fashion (i.e. paragraph by paragraph and page by page); with DTP it is possible to place elements on the page and then move them around as you wish to create the desired product. - elements repeated throughout a document (e.g. a company logo) can be placed in master pages rather than setting up each page individually as would be the case with a word processor. - text is usually imported from a word processor or is typed into the document directly using a frame. This allows you to create the layout first, link the frames together and add the text into the frames later (e.g. in newsletters and magazines where layouts are created before any of the actual text becomes available). Spreadsheets

8

The following is a brief summary of the common features found in spreadsheets: - it is made up of columns and rows; each row is identified by a number and each column is identified with a letter (or letters) - each cell is identified by its column id and row id e.g. A4, ET300 etc. - a cell may contain a label (text entry such as MEAN VALUE) or a value (which can be a number, a date, a formula, result of a calculation, or currency) - the cursor identifies the current cell selected; it is possible to click on to a cell and a “+” sign appears in the bottom right hand corner; by dragging the formula down it is possible to replicate it in other cells For example: A 1 2 3 4 5

-

-

-

B 15 11 7 9 10

3 5 7 9 11

C =(A1 * B1)

By selecting cell C1 and dragging the formula down to C5 the following formulae will be replicated in C2 to C5: (A2*B2), (A3*B3), (A4*B4) and (A5*B5) formulas are used to represent a mathematical function e.g. = (C5 * D5) * 100 = A5 + B5 + C5+ D5 functions allow computations to take place e.g. SUM, AVERAGE, MAX, MIN e.g. the second formula above could be written as = SUM(A5:D5) it is also possible to use mathematical/logical expressions within cells e.g. IF G5 > 100 THEN “Y” ELSE “N” it is also possible to create charts and graphs from spreadsheets (e.g. using a chart wizard). For example:

1 2 3 4 5 6 7 8 9 10 11 12 13 14

A B rainfall temperature 10 17 12Cells A1 to 15 A13 are highlighted and 15the first chart 13is created. Then cells 28B1 to B13 11 are selected and the 37second chart10created. 62 8 58Other aspects 9 such as colours, 47labels, etc. are 11 then added. 32 12 20 15 15 16 8 22

9

temperature and rainfall 25

70 60

rainfall

40 15 30 20

hours sun

20

50

10

10 0

5 1

2 rain

3

4

5

6

temp

7

8

9

10

11

12

m onth

- now consider the following spreadsheet:

1 2 3 4 5 6 7 8 9

A vehicle id A B C D E F

B kilometres 150 200 300 250 100 400

C litres 12.5 27 20 15 10 33 average km/l maximum km/l

D kilometres/litre 12.0 7.4 15.0 16.7 10.0 12.1 12.2 16.7

formula in cell D2 is = (B2/C2) replicating this formula (by highlighting then drag down to D7) gives all the formulas needed in cells D3 to D7 formula in D8 (to find average) can be done in 3 ways: = AVERAGE(C2:C7) or = SUM(C2:C7)/6 or =(C2+C3+C4+C5+C6+C7)/6 formula in D9 to find maximum value in column is = MAX(C2:C7) - problems associated with spreadsheets: - capacity (i.e. maximum number of rows and columns) can be limiting when dealing with large data sets - security issues in some spreadsheets (i.e. if you can open a spreadsheet you can also change any part of it; this can lead to fraud - lack of concurrency; usually only one person can work on a spreadsheet at any given time (databases are better in this aspect since they can usually be opened by more than one user at a time) - because of their structure it is easy to enter an error (whether on purpose or by mistake) by entering data in the wrong cells or dependencies among cells incorrectly applied

10

Databases (Database Management Systems – DBMS) Databases are used to collect and organise information. Most database have all of the following properties: Tables Data is stored in rows and columns (much like a spreadsheet – the main difference is how the data is organised). Each row in a table is called a record which is made up of a number of fields (columns in the table). The data type in the fields is usually either text, numeric or date/time. Most databases contain a number of tables which are usually linked together in some way. Forms Forms are commonly called data entry screens since they are the user interface which allows data in the tables to be viewed, entered or edited. Forms permit the control of how other users interact with the information in the database e.g. only allow certain fields to be seen or only allow certain operations to be carried out. This subsequently helps the protection of the information and also ensures it is entered correctly. Reports Reports are produced as a result of questions such as “how many times has a type of car broken down” or “which cities have the highest house prices”. Reports can be printed out, viewed on the screen or exported (e.g. to a word processor, an email message, etc.). Queries Queries most commonly allow information to be retrieved from tables. Since the information is often spread across several tables, queries allow it to be viewed as one single datasheet. They also allow filtering so only the records required are seen. Queries can be either results seen directly on the screen or the output to another form or report. Example of a query: (house > 200 000) OR (no_of_rooms < 4). Sample database/table from a database Name of substance

cement dust coal dust common sand paint pigments talcum powder pollen smog viruses bacteria human hair

Toxic

Smallest size (microns)

Largest size (microns)

Filtered out by 10 micron mesh?

no no no yes no no no yes yes no

3 1 10 0.01 3 10 0.01 0.002 0.2 20

100 100 2000 5 80 100 1 0.04 20 300

some some yes no some yes no no some yes

11

Points to note:

(1) there are 10 records in this section of the database (2) each record has 4 fields (3) sample queries: (Smallest size (microns) < 1) OR (Toxic = “yes”) would output records 4, 7, 8 and 9 (Largest size (microns) > 99) AND (Toxic = “no”) Would output records 1, 2, 3, 6 and 10

The query should match up with the field titles to ensure a correct search is carried out. Search engines on the Internet work in a similar way; the clever part is how the information is stored on the databases so that the time to do the search (based on key words) and the effectiveness of the search itself results in a very powerful and very useful tool. Authoring Software Also known as authorware; this is a program that helps in the writing of hypertext or multimedia applications. Authoring tools usually allow the creation of the actual required application by linking together objects which can be text, graphics, music file, etc. By defining the relationship between objects it is possible to produce very useful and eye catching applications. Many authoring packages support a scripting language to allow for even more sophisticated applications to be produced. Scripting languages have pre-built functionality (such as menu styles, graphic displays, etc.) that is embedded within HTML. These pre-built functions allow users to engage with a web-site in real time. The distinction between authoring tools and programming tools is not at first obvious. However, authoring tools require less technical knowledge to master and are usually used for applications that present a mixture of text, graphics, and audio/music files. Bespoke versus off-the-shelf software Usually software packages are bought off-the-shelf. However, certain applications (usually for commercial businesses, industrial companies, etc.) require specially written software which is unique to that customer and is known as bespoke software. There are many advantages and disadvantages of both systems. Off-the-shelf – advantages -

tends to be less expensive since development costs can be spread over the many users can be more sophisticated since large sales bring in considerable revenue which can be used to enable a lot of development to be done. there will be considerable support from other user groups sharing of files with other packages is usually easier since they are likely to be compatible (e.g. Excel and Word) the package is available immediately – no need to wait for development period tried and trusted software since usually highly developed due to considerable user feedback

12

Off-the-shelf – disadvantages -

can be over-complex as it tries to cover as many aspects as possible (e.g. most users of Word only utilise about 10% of its features) the software is often a compromise since it is intended for many users all with different requirements may be very complex to learn because of the complexity caused through having unwanted features may not fit exactly into the company requirements causing a compromise in the way it has to be used within the organisation if there are major concerns with a software problem it is unlikely that it will be fixed immediately (since it may cause problems with other users and/or cause software instability)

Bespoke Software – advantages -

-

specifically designed for the application and therefore more efficient and will only contain the features wanted; since it will be devoid of unwanted features the software can take its specific requirements to new levels which will make it very powerful can be customised to interface with all other software within the company thus preventing software clashes easier to use since very specific and the writers of the software can also be involved in the training of staff which will be geared towards their requirements can be modified/updated as the company’s requirements change much better customer support since they will be in direct contact with the software designers

Bespoke Software – disadvantages -

-

very dependent on the suppliers of the software; if they go out of business there will be little or no support if problems occur less likely to be as well developed/tested as off-the-shelf software much more expensive since all the development costs need to be met by the company (but efficiency savings may compensate for this and it may prove to be less expensive in the long run) the development time can be very long which may cause problems difficult to tell how good the final software package will be (could be a real problem if the company have waited 2 to 3 years to receive their new software only to find it doesn’t meet their needs!!)

Macros A macro is a name or key that represents a series of commands or key strokes. Many applications allow single word or single nominated key on a keyboard to perform a whole series of actions. Macros can be either written as required and then stored or stored in a library for future use. For example, suppose you want some data to be input into a spreadsheet if the result of a calculation in cell K40 is negative: move to cell K40 is result of calculation < 0 if < 0 then load file “error report” if >= 0 then output value

13

Macros can be very sophisticated and save the operator a lot of time. For example, the name and address in a word processor could be set up by pressing key F1 and the system brings information from a related database. Other software Other software, such as web browsers and search engines, communications software (including emails) and graphics interfaces are all covered in other booklets and the information won’t be duplicated here.

4.5

Problems

A list of examination-based problems now follows. These can be used as revision questions or centres can use the questions to make up their own assessments to give candidates practice under examination conditions.

(1)

Describe four methods used for automatic data capture. Give a different application for each of the methods chosen.

(2)

A record contains the following fields: -

Title (Mr/Mrs/Miss) and Sex (Male or Female) Date of birth (written in the form dd/mm/yyyy) Pay Number (which is made up of 8 digits) Telephone Number Pay

Give a different validation check for each of the above fields and explain why it is used. (3)

A system uses the ISBN-10 (modulo 11) method to generate and validate bar codes: - each digit in the number is multiplied by its digit position - the result of each multiplication is added to a total - the total is then divided by 11 - the remainder is subtracted from 11 to give the check digit (if the remainder is 10, the letter “X” is used as the check digit) (a)

Which of the following numbers have the correct check digit? (i)

0–555–21622–5

(ii) 0 – 1 2 1 – 9 0 0 2 1 – X (b)

Calculate the check digit for the following number: 0 – 1 5 0 – 2 4 6 2 2 – ………

(c)

Discuss the types of errors that check digits can identify.

14

(4)

(5)

(a)

Describe three ways of carrying out verification checks.

(b)

Give two examples where verification checks would be made.

A burglar alarm system uses an 8 – bit register. The first 4 bits indicate if a sensor has picked up an intruder (shown with a 1 – value) and the second four bits indicate the zone where the sensor has picked up an intruder:

A

B

C

8

4

2

1

8 1

4 1

2 1

1 0

D

(where A = window sensors B = floor sensors C = door sensors D = infra red heat sensors) For example:

1

0

0

0

A B C D Indicates: window sensor detected an intruder in zone (8 + 4 + 2) 14 (a)

What do the following indicate:

0

0

(b)

(6)

1

0

0

1

1

8 0

4 1

2 1

1 0

0

8 1

4 0

2 1

1 1

What would be the binary pattern for a window broken and an infra red sensor detecting an intruder both in zone 15?

A company is using a word processor to produce a page advertising their products. Unfortunately, the information wouldn’t fit onto one single page. Which five features of a word processor could be used to ensure that the advert fits onto one page only.

15

(7)

A college has invested in a computer system to help carry out the following tasks: -

advertise their college (both on the Internet and by paper leaflets) keep a track of student and staff information/contact details keep a track of payments and fees produce on line courses for the students

Describe four software packages the college could use to carry out the above tasks and explain why each software package has been chosen.

(8)

Describe three fundamental differences between word processors and desk top publishing packages.

(9)

The following spreadsheet has been set up to compare the depreciation of 8 new cars over a 4 year period. A

B

C

D

E

F

G

1

name of car

new price ($)

Value after year 1 ($)

Value after year 2 ($)

Value after year 3 ($)

Value after year 4 ($)

Depreciation over 4 years (%)

2 3 4 5 6 7 8 9 10 11

Fiat Bravo 150 Honda Civic “R” Range Rover SE Mitsubishi Lancer Citroen C8 LX BMW 320 Conv. Audi A3 1.6 SE Mercedes SLK 350

28 000 36 000 80 000 20 000 40 000 72 000 30 000 68 000

21 000 28 800 64 000 12 000 20 000 57 600 22 500 57 800

15 600 23 400 60 000 9 000 13 200 50 000 18 000 51 000

11 200 20 000 50 000 6 400 10 000 43 200 15 000 48 000 Mean Highest

9 800 18 000 48 000 5 000 8 000 36 000 12 000 45 600 Deprecn Deprecn.

65 50 40 75 80 50 60 33 56.6 80.0

(a)

What formula must be in cell G4 to find the depreciation on a Range Rover after 4 years?

(b)

What formula must be in cell G10 to calculate the mean (average) depreciation of all 8 cars?

(c)

What formula must be in cell G11 to find the highest (maximum) depreciation of all 8 cars?

(d)

Describe how it would be possible to predict the value of each car after 5 years and after 10 years?

16

(10)

A database has been set up to compare certain features of freezers. section of the database is shown below. Item I.d.

Price ($)

A B C D E F G H

300 250 400 300 520 360 410 290

Lowest temp (0C) - 20 - 18 - 22 - 20 - 40 - 25 - 30 - 18

Capacity (m3) 0.16 0.15 0.25 0.18 0.35 0.30 0.30 0.20

Warranty (years) 1 1 2 3 3 1 2 2

A

Colour white silver white white silver white white silver

(a)

How may records are shown in this section of the database?

(b)

What items would be output if the following search condition was input: (Price($) > 300 OR Warranty(years) > 1) AND (Colour = “silver”) ?

(c)

Give the search condition to find all freezers which operate below - 250C and have a capacity of more than 0.25 m3.

17

Booklet 4 – answers and hints

(1)

Methods used in automatic data capture + applications -

(2)

data logging bar code readers RFID biometrics magnetic stripe reader OCR voice recognition smart cards OMR

e.g. monitoring river pollution e.g. stock control, getting prices at POS e.g. tracking livestock on a farm e.g. fingerprints at airport security e.g. cards used to open doors in secure areas e.g. scanning paper documents into computer e.g. help disabled people enter data into computer e.g. loyalty cards storing “points” e.g. reading questionnaires directly

Possible validation checks: Title and sex Date of birth Pay number Telephone No Pay

-

consistency check format check character/type check, check digit, length check character/type check, length check range check

(3)(a) 10 9 8 7 6 5 4 3 2 1 0 5 5 5 2 1 6 2 2 5

← position ← bar code digits

Multiplication: (10x0)+(9x5)+(8x5)+(7x5)+(6x2)+(5x1)+(4x6)+(3x2)+(2x2)+(1x5) Result: 176/11 = 16 remainder 0. Hence, bar code check digit is correct 10 9 8 7 6 5 4 3 2 1

← position

0 1 2 1 9 0 0 2 1 X

← bar code digits

Multiplication: (10x0)+(9x1)+(8x2)+(7x1)+(6x9)+(5x0)+(4x0)+(3x2)+(2x1)+(1x10) Results: 104/11 = 9 remainder 5. Hence, bar code check digit is incorrect (b)

10 9 8 7 6 5 4 3 2 1

← position

0 1 5 0 2 4 6 2 2 ?

← bar code digits

Multiplication: (10x0)+(9x1)+(8x5)+(7x0)+(6x2)+(5x4)+(4x6)+(3x2)+(2x2) Results: 115/11 = 10 remainder 5. Hence check digit is 11 – 5 i.e. 6 (alternative: to make the total, i.e. 115 into a number which gives a remainder of 0 when divided by 11 (i.e. 121) we need to add 6 – which also gives us the check digit).

26

(c)

Check digits can identify the following errors: - inverted figures i.e. 23459 instead of 23549 - incorrect digits i.e. 23559 instead of 23549 - missed digits i.e. 2359 instead of 23549

4(a)

Verification methods: - double data entry (two people type in the same data from source document) - visual check (where the information on screen is compared to source document) - parity check (where the number of bits is checked for even or odd)

(b)

Examples where verification checks are made: - password entry check - when filling out forms on line (e.g. verify your age) (many more examples exist)

5(a)

B = 1 and D = 1 i.e. floor sensor and infra red sensor detect presence of an intruder (since 0 1 1 0 is equal to 6), the intruder has been identified in zone 6 C=1 i.e. door sensor detects presence of an intruder (since 1 0 1 1 is equal to 11), the intruder has been identified in zone 11

(b) 6

1001

Features expected in word processors to allow one page fitting: -

7

1111

set page size change font size change margins page format don’t use bold type re-size photographs remove (edit) unwanted text

Four software packages: - advertise the college (use DTP – could also use word processor or authoring software) - keep track of students and staff information (use a database) - keep track of payment of fees (use of spreadsheets) - produce on line courses (use authoring software – could also use DTP or word processing) 27

8

Differences between word processing and DTP: - DTP allows elements on a page to be moved about as required; word processor usually requires a linear approach (i.e. paragraph by paragraph, page by page) - repeating elements (e.g. company logo) can be placed on master pages; with word processors each page has to be set up separately - use of frames in DTP (i.e. create layout, link frames as required and add text in frames later)

9(a)

G4 cell:

= ((B4 – F4)/B4) * 100

(b)

G10 cell

= SUM(G2:G9)/8

or

= AVERAGE(G2:G9)

or

= (G2+G3+G4+G5+G6+G7+G8+G9)/8 (c)

G11 cell

= MAX(G2:G9)

(d)

- draw a graph of the given data and use a tend line to predict; extend graph to ten graph (or use mathematical formula (best fit) based on existing curve to allow predictions to be made) - add additional columns assuming that depreciation follows a “known pattern”

(10)(a) 8 (A to H) (b) E (c) (Lowest temp (0C) < -25) AND (Capacity (m3) > 0.25)

28

Booklet 5

This covers the following topics found in section 5 of the computer studies syllabus:

Item 1 2 3 4 5 6 7 8 9 10 11

Topic Hardware Computer memories External storage systems Credit cards and smart cards Sensors Operating systems Batch processing Real time systems Network topology Multimedia applications Problems based on section 5 topics

1

Page numbers 2 5 7 8 8 9 10 10 11 12 13

5.1

Hardware

Laptop/notebook computers Laptop computers have the obvious advantage over desk top computers (PCs) in that they are fully portable. This is of particular value if a user wishes to do work away from the office (e.g. when travelling) or if they want the freedom to work anywhere within a building taking full advantage of WiFi technology. One of the main considerations when buying a laptop is the battery life. This can depend on a number of things but one major factor is the processor specification. The following is a list for consideration: -

the processor should consume as little power as possible thereby prolonging internal battery life the processor should run as cool as possible minimising the problems associated with heat dissipation no fans needed to cool the processor thus reducing the load on the internal battery

The main disadvantages of laptops compared to desk top PCs are: -

they tend to be more expensive to purchase it is easier to steal a laptop security risks (if sensitive data is stored on the internal hard drive) laptops tend to have a lower specification than an equivalent desk top computer

Household devices (Note: also check out the section on Embedded web Technology in booklet 1) Many household devices now use microprocessors to control their various functions. The following is just a sample of common devices (showing some of the functions controlled by the microprocessor and general notes on the application; it is worth doing further research to find out more about these devices): Digital cameras The microprocessor would be used to control the following functions, for example: -

shutter speed lens focus flash aperture (light intensity)

(Note 1: the sensitivity of the camera depends on the number of pixels used to represent the picture taken e.g. an 8 megapixel camera takes a sharper image than a 5 megapixel camera. The camera memory size also dictates how many photos can be taken or limits the pixel size of a photo. The sharpness of the image also depends largely on the lens quality.

2

Note 2: the advantages of digital cameras over manual cameras include: no processing costs (since there is no need to develop film or make prints), easy to delete unwanted photos, direct transfer of photos from camera to computer through the USB port (no need to scan in photos), easier to modify photos on screen (e.g. crop, change colour density, etc.) etc.) Washing machines The microprocessor would be used to control the following features, for example: -

water temperature time for each cycle the wash cycle (when to add powder, when to rinse, etc.) loading (i.e. weight of the washing in the drum)

(Note 1: the main advantages are that these machines are fully automatic (wash programs are fully stored) which makes them easy to use, they are cheaper to manufacture (modular design) and generally more reliable). Digital televisions The microprocessor would be used to control the following features, for example: -

automatically tuning into television stations allow digital signals to be decoded since constantly monitoring signal strength (etc.) far better sound and picture quality result) allows interface with many devices controls picture and sound quality (factory settings can be stored, etc.) in built diagnostics in case of faults

(Note 1: signals to televisions are now sent digitally so need a computer to interpret and decode these signals into a picture/sound; need multi-functional system to control plasma and LCD screens)

Input and output devices Input and output devices need to be matched up to the computer application. Several of these have been covered already in booklet 1: -

computer-aided design (large screens, graph plotters, etc.) virtual reality (data goggles, data gloves, etc.) control/monitoring applications (sensors, ADC/DAC, actuators, etc.)

Other examples include:

3

Information centres Airports, supermarkets, and any application where information needs to be relayed to customers, gain benefit from having automatic information kiosks rather than having manned desks. These allow customers to automatically obtain information when they require it. Output is normally on a screen but the input devices can vary and are usually: -

touch screens (with menu options) mouse/trackerballs to select options limited options keyboard light pens (although these are becoming increasingly less common)

(keyboards are usually not offered since the number of options is limited and the owners of the system don’t want customers keying in information and attempting to “hack” into the system). Using this automated information system affords the following advantages to the customers and company: -

the system can be linked into websites to give live updates (very useful option at airports, bus terminals, railway stations, etc.) information is usually more up to date using this method no language problems (manually operated desks may have limited language capability) no need to wait in queues companies can advertise special offers, special services, key notices, etc. lower costs to companies (fewer staff needed) automatic information kiosks are always open

Supermarkets/retailers These use several types of specialist input/output hardware. For example: -

bar code readers/scanners (to read product details and enable automatic stock control) Point of Sale (POS) terminals – usually include the bar code readers/scanners CAD output/input devices (the supermarkets produce their own notices etc. and need this specialist hardware to carry out these tasks) sensors (counting customers entering and leaving the supermarket to allow efficient check out performance)

4

Facilities for the disabled There are many input/output devices to help disabled people. Some of these are summarised below: Device Touch screens + head wand On-screen keyboards Voice recognition

Trackerball

Large font size/use of colour

Braille printers

Voice synthesis

Large/concept keyboards Prediction software Foot activated controls

5.2

Application For people who can’t use a keyboard allowing input; also helps people with learning difficulties since icons are easier to understand For people who can’t use keyboards (use head wand to select letters) Blind and partially-sighted people can communicate with a computer using microphone and software (keyboard and touch screens can’t be used) Easier to use than a mouse if people have problems using their arms and hands or if they have a coordination problem Helps people who are partially-sighted since the larger icons and/or colourful outputs on large screens are much easier to see Dot matrix printers can be modified to produce raised dots (i.e. Braille) – this helps blind and partially-sighted people to read the output Loud speakers and special software are used to output information in the form of sound to help blind and partially-sighted people; it also helps people who have difficulty reading/understanding text These help people who have difficulty using normal keyboards (either because of difficulty using hands/ arms or coordination problems) To help dyslexic people when typing To allow people with restricted hand/arm movement to communicate

Computer Memories

Computer memories are either internal or external. Internal memories are either ROM (read only memory) or RAM (random access memory). External memories can take on many forms (and discussed in some detail later). The first part of this discussion considers internal memory systems:

5

MEMORY

ROM

RAM

(Read Only Memory)

(Random Access Memory)

PROM – Programmable Read Only Memory EPROM – Erasable Programmable Read Only Memory EEPROM – Electrically Erasable Programmable Read Only Memory

SRAM (Static RAM)

DRAM (Dynamic RAM)

Read only memory (ROM) ROM holds the instructions for starting up the computer. This type of memory can only be read and cannot be altered (i.e. deleted or written to) and is non-volatile (i.e. it doesn’t lose its contents when the computer is switched off). Programmable read only memory (PROM) A PROM is a memory chip on which data can be written only once. Once a program has been written onto a PROM, it is permanent. Unlike RAM, PROM's retain their contents when the computer is turned off. The difference between a PROM and a ROM (read only memory) is that a PROM is manufactured as a blank memory, whereas a ROM is programmed during the manufacturing process. To write data onto a PROM chip, a special device called a PROM programmer or PROM burner is required. Erasable programmable read only memory (EPROM) This is a special type of PROM that can be erased by exposing it to ultraviolet (UV) light. Once it has been erased, it can be re-programmed using an EPROM burner. Electrically erasable programmable read only memory (EEPROM) An EEPROM is a special type of PROM that can be erased by exposing it to an electrical charge. Like other types of PROM, EEPROM retains its contents even when the power is turned off. Also, as with other types of ROM, EEPROM access time is not as fast as RAM. EEPROMs are similar to flash memories (sometimes called flash EEPROM). The principal difference is that an EEPROM requires data to be written or erased one byte at a time, whereas a flash memory allows data to be written or erased in whole blocks.

6

Random access memory (RAM) This is a volatile memory (i.e. contents are lost when the computer is switched off). A user can write or delete data as well as read the contents. Before a program can be ran it must first be loaded into RAM which allows the CPU to access the program. Battery-backed RAMs overcome data loss on switching power off, but are outside the scope of these booklets. (NOTE: For completeness, it is worth mentioning that two types of RAM exist called SRAM (static RAM) and DRAM (dynamic RAM) – SRAM doesn’t need to be constantly refreshed to retain its memory unlike DRAM. Also note that computers use cache which is a portion of memory made from SRAM. Memory caching works since programs usually access the same data or instructions over and over again. By retaining as much information as possible in SRAM, the computer operates more quickly (cache is usually termed level 1, 2 or 3 (termed L1, L2 or L3)). External storage systems A number of different types of external memory devices are now available. Some of these are described below (hard drives haven’t been mentioned since these are usually internal; hard drives contain much of the applications software to enable the computer to run effectively). MP3 (MPEG-3) MPEG-3 uses an audio compression technology; it compresses CD-quality sound by a factor of about 10 whilst retaining most of the quality e.g. a 60 Mbyte CD track is turned into a 6 Mbyte MP3 file. Music data is often stored on an MP3 player which plugs into the computer through a USB port. The music data is downloaded to the MP3 player where it is stored in a file. The player has its own internal battery which allows a user to listen to the music files through personal head phones or connect the player to an external sound amplification unit. Variations of MP3 players (e.g. I-pods) exist which use their own file structures when storing music; these require compatible software to enable files to be stored in the correct format. MP4 (MPEG-4) MPEG-4 files are in a format that can hold a mixture of multimedia objects such as audio, video, images, animation, etc. MP4 players again use compression technology to store data in files. They operate in much the same way as MP3 players described above. Flash memories These are non-volatile re-writable memories evolved from the EEPROM; they are often connected to the USB port on the computer enabling a user to transfer files between computers. SD (secure digital) cards are a type of flash memory used in digital cameras and mobile phones. XD (extreme digital) cards are also a type of flash memory used in digital cameras and are similar to SD cards.

7

Compact disks (CD) These are an optical storage media which have basically taken over from the floppy disk. Software is now usually supplied on a CD (in the form of CD-R which can be read only or CD-RW which allows reading and writing of data). Digital versatile disk (DVD) This is an optical system for storing data. It is similar to CD but typically can hold 4.7 Gbyte of data compared to only 700 Mbyte of data on a CD. This is due to dual layering and higher density of data storage.

Credit cards and smart cards Credit cards contain a magnetic stripe on the back which is made up of iron-based particles in a plastic film. The stripe is split up into three tracks which are read by a magnetic stripe reader. Usually only tracks 1 and 2 are used. The information stored usually follows the following format: track 2

track 1



√ √ √ √ √ √ √ √ √ √ √ √

√ √ √ √ √ √ √

description start sentinel (1 character only) format code (“B”) (1 character only) account number (19 characters) separator (1 character only) country code (3 characters) name (between 2 and 26 characters) separator (1 character only) expiry date or separator (4 or 1 character(s)) service code (3 characters) optional data to fill up (max record length – 79)* end sentinel (1 character only) character check (1 character only)

(* the optional data often contains a PIN verification code or card verification code) Smart cards are discussed in detail in booklet 1.

Sensors Numerous types of sensors are used to give real time information to computers (see data capture devices in booklet 1). Frequently, an analogue to digital converter (ADC) is needed since sensor data is often in analogue form and computers can only process digital data. The following is a list of common sensors and examples of applications which make use of these sensors:

8

Sensor type temperature moisture

(1)

oxygen

(1) (2) (3) (1) (2) (1) (2) (1) (2) (1) (1) (2) (3)

light infra red pressure acoustic motion pH proximity/distance

5.3

(1) (2) (1) (2)

(1)

Possible applications used in controlling central heating systems used to control/monitor temperatures in chemical processes monitoring of greenhouse environment any process where moisture is an issue (e.g. production of tablets in a pharmaceutical company) environment (e.g. measuring oxygen content in a river to check for pollution) growth control in a greenhouse traffic lights to detect the presence of a vehicle on automatic doors to detect the presence of a person detecting an intruder by breaking an infra red beam counting (e.g. counting coins as each one breaks the beam) detecting intruders in a burglar alarm system some systems still use these to count vehicles on the road picks up sound (e.g. burglar alarm system) detecting liquids moving in pipes (chemical processes) detecting speed (e.g. radar guns measuring vehicle speed) used to measure acidity in rivers (pollution monitoring) used in greenhouses to monitor soil acidity used to monitor/control chemical process where acidity levels are important these tend to be versions of the above (e.g. light or infra red)

Systems

Operating Systems (OS) The operating system (OS) is a program that, after being initially loaded into the computer by a boot program, manages all the other programs/applications. On a PC, the first program that runs is stored on a ROM chip. This program checks the system hardware to make sure everything is functioning normally. This checks the CPU, memory and basic input-output systems (bios) for errors. If all is satisfactory, the BIOS will activate the disk drives. When the hard drive is activated, the OS is found in the boot and is then loaded. The following is a list of functions carried out by various operating systems: -

provides a user interface device management (input/output control) security (e.g. log on, passwords, etc.) handles interrupts spooling memory management multitasking batch processing multiprogramming error reporting and handling loading and running software processor management maintain user accounts utilities (such as copy, save, re-name, etc.)

9

Many household appliances that are microprocessor-controlled don’t have operating systems (e.g. microwave oven, fridge, etc.). The microprocessor has just one set of tasks to perform; essentially straightforward inputs are expected (e.g. a keypad on the front of a microwave oven) and they have simple never-changing hardware to control. Thus, it isn’t necessary to have an OS; thus leading to reduced development and manufacturing costs for the household devices. Batch processing In this process, a number of tasks (or jobs) are all collected together over a set period of time. They are then all loaded into the computer system (in a job queue) and processed in one go (or batch). Once a batch job begins, it continues until it is completed or an error is encountered. No user interaction is required once execution begins. This has the advantage that jobs can be processed when computer resources are less busy (e.g. during the evening or at night); thereby utilising an expensive resource. Batch processing is often used in the following application areas: -

billing systems (gas, electricity, water, etc.) payroll systems processing cheques

Real time (transaction) processing When booking seats on a flight, for example, real time (transaction) processing would be used. Response to a query needs to be very fast and once a seat is booked it needs to marked as “not available” immediately to avoid any risk of double booking. Using this example of booking seats on a flight, the following sequence of events would take place: -

customer/travel agent contacts the airline the customer/travel agents types in the day/time of flight and number of travellers the customer/travel agent types in the departure airport and the destination airport the airline database is searched and availability of seats checked if seats are available on the required day/time then a booking is made the database/file is updated immediately to indicate that these seats are no longer available and prevents double booking from occurring if no seats are available a message is sent back to the customer/travel agent this uses real time (transaction) processing since the files are updated in real time; interrogation of files will have access to totally updated information

(NOTE: the above is sometimes referred to as pseudo real time since some applications don’t need immediate updating of the files)

10

Real time process control Process control is a real time system. But this is very different to real time (transaction) processing; this system usually involves sensors and feed back loops i.e. the output can influence the next input to the system. Sensors send data (via an analogue to digital converter – ADC) to a computer or microprocessor which decides whether or not to take action (based on comparison with stored data). If a change needs to be made, the computer/microprocessor sends signals (via a digital to analogue converter – DAC) to the devices being controlled and alters their status (e.g. turn a heater on if a temperature sensor indicates that a temperature is too low) – actuators are often used to open valves, turn on equipment, etc. As this is continuously monitored, eventually the temperature will equal the stored value in the computer/microprocessor – this will then cause the heater to be turned off. The role of sensors is also discussed earlier in this booklet and also in some depth in booklet 1. In real time (transaction) processing files are often updated in real time (e.g. when booking flights on an airplane); but in real time process control, physical quantities (such as temperature) are continuously monitored and the input is processed sufficiently quickly to be capable of influencing the data source. Networks For types of network topology are briefly described here. Ring networks:

Comments 1 - a faulty connection between two stations can cause network failure 2 - it is difficult to add a new station/device as it has to come between 2 existing stations 3 - this type works well during heavy loading 4 - it is possible to create large networks using this topology

Bus networks:

Comments 1 - requires less cabling than a star network 2 - if there is a central cable problem the entire network goes down 3 - less expensive network than the other systems 4 - works best with a limited number of stations; performance worsens as new stations added

11

Star networks: Comments 1 - if one station/connection fails the other devices are not affected 2 - if the central hub breaks down, the whole network fails 3 - it is easier to identify faults using this type of topology 4 - it is easy to expand this type of network

Tree networks:

Comments 1 - this features star nodes on a bus network 2 - all the advantages and disadvantages of both types of networks described above apply to this system; it is quickly gaining in popularity since it has all the good features of bus and star topologies

Multimedia applications Multimedia involves the use of a computer to present: -

text graphics video animation sound

in an integrated form. It has its main uses in: -

commercial applications (advertising, journalism, presentations, etc.) entertainment (special effects, video games, fine arts, etc.) education (CBT training, uses in virtual reality training, etc.)

12

5.4

Problems

A list of examination-based problems now follows. These can be used as revision questions or centres can use the questions to make up their own assessments to give candidates practice under examination conditions.

(1)

(2)

(3)

(a)

Name two household appliances that are microprocessor controlled.

(b)

Describe what functions the microprocessor controls in the named appliances.

(a)

Name four different types of sensors and give an application for each one named.

(b)

Choose one of your named applications and describe how the sensors are used to control and monitor it.

(a)

Describe the main differences between Random Access Memory (RAM) and Read Only Memory (ROM).

(b)

Various external, removable memory devices exist. Choose which device (using a different one in each case) you would use for the following, and give a reason for your choice: (i) (ii) (iii)

(4)

storing multimedia files storing music files storing documents produced on a word processor

A number of specialised input/output devices have been developed to help disabled people use computer systems. Name three input/output devices and describe how they would help a disabled person.

(5)

Compare the type of data that would be stored on a barcode with the data that would be stored on a credit card magnetic stripe. Describe the different types of validation checks that would be made on data stored on: (i) (ii)

barcodes magnetic stripes on credit cards

13

(6)

(7)

A railway station management team has decided to set up automatic information kiosks to keep passengers up to date with train times, cancellations, and general information. (a)

Which input devices could be used at these information kiosks?

(b)

What advantages do these kiosks give customers compared to an information desk manned by a human operator?

(c)

What advantages does this system give to the station management?

(d)

Using the space below show a typical “home page” which could be presented to passengers at the railway station. Show any links, menus, etc. which you think would be needed to make the system as user friendly as possible.

(a)

Give four functions carried out by a typical operating system.

(b)

Describe the main differences between real time (transaction) processing and real time process control.

(c)

Give two applications that would use: (i) (ii)

real time (transaction) processing real time process control

14

(8)

(9)

(a)

Draw diagrams of a ring network and a star network

(b)

Give one advantage and one disadvantage for each of the above network topologies.

A very large city library is changing over to a fully computerised system to control all their operations. The training department has been asked to develop a presentation to explain to the library staff how their new system will affect them. (a)

What features should the trainer use in the design of the presentation to make it is as interesting as possible?

(b)

The presentation is to be stored on a laptop computer. What features make the laptop computer ideal for this application?

(c)

Many of the books in the library have been scanned in and stored on the computer. What advantages does this give to the customer?

(10)

(a)

A music file is 45 Mbyte in length. Approximately how much memory space would this same file need if stored in MP3 format?

(b)

Describe how it is possible to store considerably more data on a DVD than on a CD even though dimensionally they are the same?

(c)

Why have CDs and DVDs taken over from floppy disks as the main secondary storage media on home computer systems?

15

Booklet 5 – answers and hints 1(a) (b)

Examples of household appliances using microprocessors: Together with what is controlled:

Appliance Digital camera Washing machine Television Microwave oven

2(a)

Types of sensor and applications where they are used Sensor Temperature Moisture Oxygen Light pH Infra red Pressure Acoustic Motion Proximity/distance

(b)

What is controlled shutter speed, lens focus, flash, aperture, etc. Water temperature, cycle time, wash cycle, loading, etc. Tuning of stations, decoding of digital signals, interface with devices, picture/sound control Timing, weight calculations, function (e.g. defrost etc.)

Application(s) Central heating system, chemical process Greenhouse environment, production where moisture is an issue (e.g. pharmaceuticals) Pollution monitoring, engine management systems Greenhouse environment, traffic light control, automatic doors Pollution monitoring, greenhouse (soil), chemical process control Burglar alarms, counting people, detection of heat sources (e.g. automatic light control in washrooms) Burglar alarm, counting vehicles (traffic light control) Burglar alarm (listening for foot steps, measuring flow rates of liquids in pipes (chemical plant) Radar guns (traffic speeding detectors) Same applications as light sensors and infra red sensors

Example chosen: automatic doors: - (light, infra red, pressure) sensors monitor the area constantly - if a person is detected (breaks a beam or heat source picked up or weight detected on a pressure mat) …. - …. a signal is sent to the microprocessor controlling the process - …. an ADC is used if the signal is analogue - the microprocessor compares incoming signal with stored data/current status (e.g. checks if the door is already open) - if a person has been identified, then a signal is sent …. - …. to an actuator to open the door

29

3(a)

(b)

4

Differences between RAM and ROM RAM

- volatile memory - can be written to or contents read - temporary store to hold data currently being used

ROM

- holds instructions to start computer (e.g. BIOS) - can only be read and cannot be changed (i.e. ROM cannot be written to or edited) - non-volatile memory

Uses for various memory devices: Application

Device

Multimedia files

MP4 or DVD

Music files

MP3

Word processed document

CD or flash memory

Reason for choice Holds large amounts of data to allow audio, visual, video and animation Compresses sound files to allow several tracks to be stored using less memory Can store files which can be taken away and used on any computer; don’t normally need a huge memory capacity therefore other devices not really needed

Devices to help disabled people: Device Touch screens + head wand On-screen keyboards Voice recognition

Trackerball

Large font size/use of colour

Braille printers

Voice synthesis

Large/concept keyboards Foot activated controls

Application For people who can’t use a keyboard allowing input; also helps people with learning difficulties since icons are easier to understand For people who can’t use keyboards (use head wand to select letters) Blind and partially-sighted people can communicate with a computer using microphone and software (keyboard and touch screens can’t be used) Easier to use than a mouse if people have problems using their arms and hands or if they have a coordination problem Helps people who are partially-sighted since the larger icons and/or colourful outputs on large screens are much easier to see Dot matrix printers can be modified to produce raised dots (i.e. Braille) – this helps blind and partially-sighted people to read the output Loud speakers and special software are used to output information in the form of sound to help blind and partially-sighted people; it also helps people who have difficulty reading/understanding text These help people who have difficulty using normal keyboards (either because of difficulty using hands/ arms or coordination problems) To allow people with restricted hand/arm movement to communicate

30

5

Data stored on magnetic stripes and bar codes: - bar codes would contain key data such as product details (data is coded in the form of light and dark bands of variable thickness) - magnetic stripes (these contain key data such as customer account number, etc. and is stored in an electronic form) validation check on a bar code and credit card is usually a check digit

6(a)

Input devices on an information kiosk: - touch screen - mouse/trackerball - light pens

(b)

Advantages of automatic kiosks to customers: -

(c)

no language problems no need to wait in a queue always open information usually more up to date and more accessible

Advantages to management: - system can be linked into websites to give live updates - can advertise special offers, services, notices, etc. - lower costs to the company (fewer staff to pay)

(d)

Sample screen:

C.I.E. RAIL LINK HOME

HELP

PRINT

EXIT

Timetables Buy tickets Train info Platform map Car hire Local hotels 15/10/2010 16:40

[NOTE: there is no “right answer” to this type of question. Examiners will look out for (1) layout is sensible (not crammed into one corner) (2) logical screen options given (3) clearly a computer screen (e.g. drop down menu boxes)]

31

7(a)

Operating system provides, for example: - user interface - device management - handles interrupts - spooling - memory management - multitasking - batch processing - multiprogramming - error reporting/handling - loading/running software - processor management - maintain user accounts - utilities (e.g. copy, save, re-name, sort, etc.)

(b)

RTTP features: -

fast response needed files updated immediately used when making bookings (etc.) to stop double booking no control takes place, but human involvement takes place

RTPC features: (c)

use of sensors and feedback loops output can influence the input used to monitor and control processes usually no human involvement needed

Applications include: (i) booking airline tickets (ii) control of a chemical process

8(a)

STAR

RING

32

(b)

Advantages of ring:

Advantages of star:

- works well under heavy loading

- if one station fails/connection fails the other stations are not affected - easier to identify faults in the system - easy to expand network

- possible to create large networks

9(a)

Disadvantages of ring:

Disadvantages of star:

- faulty connection between two stations can cause network failure - difficult to add new stations

- if central hub breaks down, the whole network fails

Features expected in the presentation: - multimedia (text, graphics, video, animation, sound, etc.)

(b)

Laptop features: - can store presentations on the hard drive - portable system can link into any multimedia system - take full advantage of WiFi system

(c)

Advantages of scanning in books to customers: -

easy to import text, graphics, photos, etc. into own work easier to locate information in books easier to cross-check information in books access to old and rare books (more accessible) can “blow up” text/diagrams to make them clearer easier to “make notes” on the pages for future reference more than one customer can access a book at the same time

10(a) 90% reduction – so memory space required is ~ 4.5 Mbyte (b) DVD features: - dual layering - higher density of data storage is possible (c) Reasons for increase in usage of CDs/DVDs: - greater capacity (can store multimedia files) - more robust technology (harder to damage) - longer “shelf life” if stored properly

33

Computer Studies Support Booklets.pdf

There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Computer ...

2MB Sizes 7 Downloads 209 Views

Recommend Documents

EduInsight- Business Studies 2013 Support Seminar Question ...
EduInsight- Business Studies 2013 Support Seminar Question paper 2.pdf. EduInsight- Business Studies 2013 Support Seminar Question paper 2.pdf. Open.

Computer Studies (7010)
Computer with Inqilab Patel (ruknuddin.com:03002724734). 2 | Page. Contents ..... Explain how the shop can print a list of mountain bikes. f. There is an error in the table. .... produce on line courses for the students. Describe four software ...

Part15 - Computer Support Cooperative Work.pdf
Try one of the apps below to open or edit this item. Part15 - Computer Support Cooperative Work.pdf. Part15 - Computer Support Cooperative Work.pdf. Open.

Part15 - Computer Support Cooperative Work.pdf
Part15 - Com ... ive Work.pdf. Part15 - Comp ... tive Work.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Part15 - Computer Support Cooperative ...

2013-Marking Schema - Aurora Computer Studies
Where student.studentld = studentsport.studentid and. studentSport.capacity = captain. Student. Studentspend. |spens. عوا. (J) erro Hrne Co na osnous nem hal.

2013-Marking Schema - Aurora Computer Studies
:D :ද :b :b 3 9 : 36. 37. 38. .... When only the foreign key definition is given: 1 mark only. 2. ... Three tables to represent student, sport and participate: 1 mark. 2.

KCSE 2014 Computer Studies Project.pdf
KABUMBU FOOTBALL LEAGUE MANAGEMENT INFORMATION SYSTEM. Kabumbu Football League (KFL) is a secondary school organisation charged with ...

man-39\aoc-for-computer-studies-waec.pdf
man-39\aoc-for-computer-studies-waec.pdf. man-39\aoc-for-computer-studies-waec.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying ...

NCDC Computer Studies Teaching Syllabus 2008.pdf
NCDC Computer Studies Teaching Syllabus 2008.pdf. NCDC Computer Studies Teaching Syllabus 2008.pdf. Open. Extract. Open with. Sign In. Main menu.

Computer Self-Efficacy and Technical Support
Some have found that levels of CSE in undergraduate students increased ... healthcare organization are of crucial importance to MHS (mobile healthcare systems) success”. (Wu, J.H., Wang, S.C., ..... __administration (director's office, etc).

viscon: computer visualisation support for constructability - Journal of ...
During the construction process, subcontractors face a number of problems, one of ..... Number of Employees. Annual Turnover. A. 26,000. £70m. B. 1,800. £85m. C .... system in situations suitable to their business; as a result the business may ...

Computer Repair and IT Support in Taunton.pdf
Computer Repair and IT Support in Taunton.pdf. Computer Repair and IT Support in Taunton.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying ...