CP01 - NEAB. Revision Notes.

[Back To Computing Index]

NOTICE: If after revising these notes you gain anything below a grade A, then you are this thickest person in the whole world. These notes are compiled according to the NEAB (AQA) answer schemes published in the past. It is constructed taking into account the way in which the NEAB examiners think. ... Wajid.

Features that render a problem suitable for computerisation:

1. Repetitive nature of calculations.
2. Large volumes of data.
3. Complex calculations against time constraint processing in a dangerous environment.
4. Need for better access and up-to-date information.
5. Better Service & Access could result.

Proposed solution must be cost effective (Tested over a fixed term with manual system), developed to an agreed time scale and within an agreed budget. A Systems Flowchart is a diagram showing overview of a complete system. Data flow diagrams show how data moves through a system.

Job of a systems analyst:

1. Analyse data processing requirements.
2. Decide if new computerised system is to be introduced/current modified.
3. Specify how the new computer system is to work & H/W & S/W Reqs.
4. Responsible for implementing new system & ensuring efficient execution of task.

 

The System's Lifecycle (The way NEAB wants it, Taken from Specimen answer papers)

Stage Activity Outcomes People Involved

[Problem Investigation] -1. Problem Definition & 2. Feasibility Study)

Identify Problem - (Scope & Limitation)

[Requirement Analysis]

Feasibility Study (Cost Effective? To Time Scale?)

Problem Spec.

Requirements Spec

Feasibility Report

Users

Consultant

Analyst

[Analysis & Design] (3. Analysis & 4. Design)

Fact Finding (data flow)

Requirement Analysis

Data Modelling (Validation, Pseudo, Types, File Structures etc.)

Prototyping

Req. Spec.

Solution Spec.

Data Flow Diagrams

Test Strategy etc.

Programmers

Analyst

[Development] (5. Development)

H/W Purchase & Installation

S/W Purchase.

Programming & Testing

Documentation (Technical & Operational)

[Start of Training]

Working System

Documentation

Programmers

Analyst

[Implementation] (6. Implementation)

File Conversion [add info]

User Training

Changeover

Post Implementation Review (Programming errors are identified)

Operational System Users
[Maintenance] (7. Maintenance)

Correc./Perf./Adap. Maintenance Evaluation against est. criteria

  Programmers

A Company wants a computerised system, it can:

1. Hire Analyst/programmer & develop in-house.
2. Commission S/W house to develop bespoke system.
3. Use of-the-shelf package.
4. Develop/adapt system on commercial framework (e.g. SAP, Oracle, SQL, Access etc.)

Top-Down-Design

.. is the progressive sub-division of a problem in to further sub-problems until the sub-problems are easily implemented in the target language. (ref. Mr. Marshall, CC)

Advantage (Top Down Design) Disadvantage (Top Down Design)
More control over complex projects. Time consuming.
Ability to delegate different sub-problems to different teams. May not be necessary for small "One time" projects.
Facilities the replacement of components for maintenance staff.  
Understandable components./can be tested separately.  
Reuse of components.  
Deeper understanding of problem.  

HCI

(Human Computer interface) The term is used to describe the interaction between a user & the computer. (i.e. the input to the software)

What is need in a good HCI?

1. Simple enough to start using it before reading its documentation.
2. Does not crash on any key combination, no matter how weird it is.
3. Consistent style between forms (constant layout).
4. Helpful error messages.
5. Shortcuts for power users.

Different interfaces are needed, for the experiences and technically disabled part of the society. Also the target audience must be taken into consideration when developing a HCI.

HCI's

Input Output
Keyboard Overlay - kids, machine ops, tills etc. Sounds - Music, Blind, Kids etc.
Concept Keyboard - kids, machine ops, tills etc. Colourful text - Kids etc.
Speech Input - Typist etc. Print - Where a hard copy is needed.
touch screen - ATM's etc. Other machinery - Factory etc.
WIMP, Dump people etc.  
Command Driven, where there are no recources for GUI etc.  
Brailed Keyboards - Blind People etc.  
   

Changeover

Direct Changeover:

The user stops using the old system one-day and start using the new system the next, usually over a weekend or over a slack period. Advantage is that it's fast and minimum duplication involved. Disadvantage is that normal operations could seriously be disrupted if errors in the new system are found.

Parallel Changeover:

The old system is run concurrently with the new system using the same input data. Loads of duplication, but outputs can be compared and discrepancies eliminated without disrupting normal work.

Pilot/Phased Conversion:

Can be direct or parallel. It is used with large systems that be broken down into individual modules that can be implemented separately at different times. Only a portion of the whole organisation (e.g. one dept) will use the new system.

 

When deciding which method of changeover to adopt, a company must consider the following:

Staff retraining?
Continuity of customer service? (Not that much companies offer much anyway).
Risks involved in complete transition?

How will the company demand changes?

After the project has been implemented, the following should also be done:

Performance must be monitored
Error logs generated
Modifications demanded
Documents kept up-to-date

Vast majority of programmer's are employed to maintain & update existing programs rather than to write new ones. Maintainance falls into 3 categories:

Adaptive Maintenance: Changing the system to adapt needs of the business (A company may expand) therefore the need to meet revised requirements.
Perfective Maintenance: Improving running of the system (file access times, algorithm toughening etc.)
Corrective Maintenance: Continuing to test & correct errors even after thorough testing (fix bugs found after testing)

The table below shows what documentation is interleved with a project & what it should contain:

System Documentation/ Maintenance guide Clerical Procedures Documentation Operating Instructions/ User Guide
Accurate Specs. Take through batch processing, with screenshots etc. (i.e. tour) Starting the program.
Data Flowcharts. Action to take when validation error occurs. Disk Requirements.
System Flowcharts.   Stationary Requirements.
Description of each module.   Backup procedures.
Pseudo of each module.   Recovery Procedures.
Organisation, content, structure & access of each file involves.   * Installation notes.
Version of each module.   * Tutorial.
Test data & results.   * Reference Notes.

Documentation must be up-to-date, good layout and must be in a state so that another programmer can understand and maintain the system incase you (the programmer) die.

Programming lingo

Iteration: For Loops, Repeat Loops and While Loops ONLY. Simple repetition of a sequence of code.

Rogue Value: An unused value that the algorithm will recognise as an outstanding value (hence can be used to symbolise the end-of-the-list entry, end of link list etc. e.g. -1 or 999.

Recursion: When a routine calls itself from within its body. An example of such a routine is the "factorial calculation" of a number in mathematics. It is also used in Backas Nuar notation & Tree traversal routines. The disadvantage is that it may cause stack overflow as the register holding the return addresses of the code overflows.

Global variables can be referenced anywhere in the program (and can be altered = not good). The global variable can be scoped by any part of the program because it is on the top of the hierachy.

Local variables can be referenced only by the procedure or function in which they are declared (& also by any siblings to that procedure/function).

Parameters: Data communicated between a subprogram and it's calling program specific to that invocation of the subprogram. This enables "black box" programming, encouraging re-use.

Array: A Finite ordered set of homogeneous element of the same data type.

Value Parameters: data value copied to a local variable in subprogram. Used when subprogram should not alter the calling programs data.

Reference Parameter: Data address (Var Name) supplied to program Used when result must be exported from sub program.

The following tables list the benefits of using parameters:

1. Reusable code.
2. Self contained procedures/functions.
3. More manageable.
4. Encourages modular programming (Top-Down-Design).

 

AND gate (Reset 111111X1)

A
B
C
0
0
0
0
1
0
1
0
0
1
1
1

Uses for the AND gate: Conversion from lowercase to uppercase.

Difference between 'a' (97h) and 'A' (65h) is 32h.

32h = 0010000

lowercase => uppercase = -32
Therefore mask any Lowercase with an "AND 223" $DF (11011111) to get to uppercase.

Just say a greenhouse has an 8 bit system in which the lsb (Least Significant Bit, the bit if changed will make the least difference to the value) controls the windows. We must shut the window (setting the lsb to 0). In the process we must NOT set/reset any other bit. How will we do this?

Just say below is the port. Now we want to set the LSB (to the extreme right) to 0, without effecting the state of any other bit.

01101011

so from the above we need to mask the combination in such a way so that we can gain the value:

01101010

This is where the AND gate will help, remember the keywords (Reset 111111X1). This, to me means (and hopefully will also mean to you), that if I put a "0" in the place of X, I will Reset THAT BIT, and the others (1) will remain unchanged. So...

01101011 - Original (Window Open)
11111110 - Our Mask
01101010 - Final (Window Closed)

Notice that none of the other bits are effected. So for the AND gate, remember to keep the keywords... RESET 111111X1. Used when you want to set something to 0. Mask it with 11111101, where 0 indicates what you want to set to 0.

OR gate (Set 000000X0)

A
B
C
0
0
0
0
1
1
1
0
1
1
1
1

Uses for the OR gate: Conversion from uppercase to lowercase.

Difference between 'a' (97h) and 'A' (65h) is 32h.

32h = 0010000

Uppercase => Lowercase= +32

Therefore mask any Lowercase with an "OR 32" $20 (00100000) to get to uppercase.

Just say a greenhouse has an 8 bit system in which the MSB (Most Significant Bit, the bit if changed will make the most difference to the value) controls the heater. We must switch the heater ON (setting the MSB to 1). In the process we must NOT set/reset any other bit. How will we do this?

Just say below is the port. Now we want to set the MSB (to the extreme left) to 1, without effecting the state of any other bit.

01101010

so from the above we need to mask the combination in such a way so that we can gain the value:

11101010

This is where the OR gate will help, remember the keywords (Set 0000000X0). This, to me means (and hopefully will also mean to you), that if I put a "1" in the place of X, I will Set THAT BIT, and the others (0) will remain unchanged. So...

01101010 - Original (Heater off)
10000000 - Our Mask
11101010 - Final (Heater On)

Notice that none of the other bits are effected. So for the OR gate, remember to keep the keywords... SET 000000X0. Used when you want to set something to 1. Mask it with 00000010, where 1 indicates what bit you want to set to 1.

A NOT Gate

A
C
1
1
0
1

 

Uses for the OR gate: Can be used to find 2's complement of a number.

Yes, its true a NOT gate has only ONE input. The input is just reversed.

Just say we have a number, 8, in decimal form, & we want to convert it into 2's complement, how would we go about it?

Convert 8 decimal => 8 binary:

8 => 00001000

NOT the binary value 00001000 and add 1:

NOT 00001000 = 11110111
11110111 + 00000001 = 11110111

2's Complment = 11110111

2's complement of 08h = 01h

[i.e. 8 => - 8]

An XOR Gate

A
B
C
0
0
0
0
1
1
1
0
1
1
1
0

Uses for the XOR gate: Can be used for error checking + Can also be used to turn graphics On and Off (read below).

An XOR (or sometimes written EXOR), can be used in many ways. This is by far a very important assembly instruction, which is used quite often. For example lets say a register, EAX (.. Now dont get confused a register, just holds binary digits, usually 32 bits, when we are talking about "E", this is double length (usuall length is 16), and if we wanted to refer to the lower part of eax (16 bits), we would say AX) holds the data FFFFFFFF. Just say that we dont need the data anymore, we will need to clear it. You may be thinking (as you are A-Level students), why cant we just do "EAX:=0". But I'm afraid the computer does not understand Pascal, honest...

Before: EAX = FFFFFFFF

XOR EAX, EAX

After: EAX = 00000000

This instruction can also be used to change pixels on a screen, where the whole screen is treated as bits. It can also be used to error check or compare two values, this can be done apon receival of a signal or otherwise. Infact it is being done inside the computer all the time, even when the computer copies data from memory location to memory location, and sometimes, problems do occur, which you may have witnessed by seeing a blue screen, indicating a page fault. When the Operating System crashes on you, it does it on purpose. It tries to minimise the amount of data that will be lost or corrupted, but unfortunatley enough we always end up with lost clustors & file chains. So next time you see a blue screen dont kick the computer, kiss it.

Variables & Ranges

Pascal Var Name Range Signed/Unsigned
ShortINT -128..+127 Signed 8-bit
Byte 0..255 Unsigned 8-bit
Integer -32768..32767 Signed 16-bit
Word 0..65535 Unsigned 16-bit
LongINT -2147483684..2147483647 Signed 32-bit
Real   Signed 16-bit

Sorting

The Need: Files need to be sorted to increase response/access & retrieval times.

Binary Search: The middle item of a sorted data set is read & tested with the search value. If it equal to the search value then the search can be abandoned as we have found the item, if not, and is greater the search item, then the upper half or the ordered data set is of no further interest. The number of items is therefore halved. This process is repeated to the truncated data set until the item under examination = our search value or until the HP > LP (higher & lower pointers cross), or set reduces to a single record. This indicates that our search item is non-existent.

NOTE, FOR BINARY SEARCH TO TAKE PLACE, Files must be sorted under the requested field as sort key. Also, search can be abandoned if the selected set is reduced to a single record, and the search value has not been found.

Linear Search: (!!NOTE: DO NOT ALWAYS ASUME THAT THE FILE IS ORDERED UNLESS STATED!!) The ordered data set is searched in sequential order from the beginning. Each item is compared with the search value. The search can be abandoned if: The item under examination has a higher value that the search item, the item is found or the end of the file is reached.

Low Level & High Level Languages

Low Level Languages:

Machine oriented.
Use mnemonics (e.g. MOV EAX, EDX).
Program may be incompatible with different processor families.
Time consuming as 1 instruction = I CPU command.
Complex bit-wise algorithms may be required, even for simple commands.
Used in embedded systems & Device driver programming (Although programmers are moving to C++, duh...)
Useful in debugging/cracking when the source code of the program is not available.
The Programmer has total control of the system, the program does not reference unknown buggy DLL's of the programming language. It references what it is programmed to reference and nothing else.

 

High Level Languages:

An English-like problem solving language. Designed for a particular type of problem rather than a particular type of machine. Problem oriented not machine oriented.

Turbo Pascal - encourages modular design.
COBOL - Powerful file handling, built in sort routines.
C++ - Low-level oriented, allows programmers to directly access system API calls.
Not Machine Oriented (More portable). ╖
Language is a lot more English-like.
1 statement = Many CPU commands
Many structures available (e.g. If, Else etc.)
Different languages are designed for many different contexts.
Problem Oriented. I.e. each language has its particular use.

Generations of languages:

Classification according to major changes in methodologies

1st Generation: Low Level Languages.
2nd Generation: Unstructured High Level Languages. (Early Fortran & Basic)
3rd Generation: Structured High Level Languages. (Pascal, C etc.)
4th Generation: Languages that accompany spreadsheets & a whole host of other applications.
5th Generation: Very high level languages (e.g. Prolog).

 

Advantages of using a higher generation:

- Programmer productivity is increased
- Systems are developed faster
- Users can maintain their own systems
- Users can develop their own bespoke solutions
- Smaller teams required

Questions to ask when considering choosing a generation

- Cost?
- Portability across machines?
- Range of facilities?
- Security provided for the stored data?
- Can data be imported/exported from other systems?
- Help facilities provided?
- What other organisations are using this language?
- Is the language well established?


Translators

Convert high-level language into machine code:

Compilers

╖ Translates the whole source-code into a compiled executable that is directly executable by the computer.
╖ Program will run faster than an interpreted one (after compilation), as intermediate translation would not be needed.
╖ Source code is not available. Hence used for commercial distrubution.
╖ Compiler/translator is not needed by the end user.

Interpreter

╖ Program is not compiled in entirety, hence useful (faster) for debugging large programs.
╖ Each high-level instruction is translated and executed in turn, hence a bit slower, but useful for debugging when this is needed.
╖ The Interpreter is memory resident, hence system requirements may be greater.

Most high-level languages (Delphi, Visual Basic, C++ etc.) have both Compilers & Interpreters. The compiler is used to make the final executable. The interpreter is used to debug (i.e. help the debugger to single step).

Program Errors

Execution Errors: (Errors that translator not will pick up): Errors or unpredicted results that will not occur until the program is executed.

Logic Errors: Errors in the logical operation of an algorithm, made by the stupid programmer. Wrong output due to incorrect algorithm.

Run-time errors: See execution errors. Possible Runtime errors (Execution errors):

1. Reading past the end of the file
2. Trying to read memory protected memory areas
3. Typing to output to an non-existent device (i.e. opening a deleted file)
4. Hardware failure
5. Division by zero
6. Infinite loop

Translation Error (Errors that translator will pick up). There are 2 types of translation errors:

1. Syntax Errors: breaking the rules & regulations governing the expressions and keywords of a language. (i.e. Misspelling: "read1n(eax);")
2. Symantec Errors: Type mismatch. (i.e. assigning 3.1 to a string variable). Undeclared variables, misspelt keywords, invalid expressions etc.

It is therefore important to test for errors right at the start. It is important to adopt a testing stratergy. This lists the type of data that we are dealing with also accompanying appropriate testing techniques to be adopted.

Testing for errors

(Choose: Normal, Erroneous & Extreme Data)

- Bugs can be undetected if: wrongly coded algorithm followed by inadequate testing.
- Testing large variety of acceptable data
- Test for extreme/erroneous data: e.g. if you were to test a date DDMMYY you could: Test invalid day (32) Test invalid month (13) Test invalid date in some months (e.g. 30/02/99) Leap year check.
- Test data for different environments: Test in heavy data volume conditions & Test with machines with variable configuration/specs.

Systems & Application Software

Systems Software: Level of software allowing the hardware of the computer to communicate with the application.

1. Operation System
2. Defragmentation program
3. File Manager
4. Device Drivers
5. Scandisk

And so onà

Application Software: Software which can help a business carry out a common business task or solve a problem.

1. Word processing applications
2. Spreadsheets programs
3. Database programs
4. Graphic manipulation programs

And so onà

Software Packages

Integration A group of applications sold together as a single application, but which embrace more than one area of functionality. The ability of an application to transfer data between other applications. (e.g. within the MS Office family, you can Import graphics, database or spreadsheet information into Word) The term is sometimes used to mean "the integration" of many tools into one package.

Generic Package & Facilities provided by them

Word Processor:

1. Mail merge - Quickly send documents to customer.
2. Find & Replace text/graphics between documents - increase productivity.
3. Spell check and grammar check - Minimise errors
4. Loads of fonts - Be Creative
5. Import text/graphics - Use different packages
6. Templates & Layouts - Increase productivity/presentation
7. Clip art - Be Creative
8. Ability to create macro's - Automate tasks
9. AutoSave - Incase of failure
10. Backward compatibility - Swap documents with your collegues
11. Table facilities - Better Presentation (via graphs, charts etc.)
12. Fax/email facilities - Faster delivery, no need to open a dedicated mail sending program (i.e. Eudora Pro).

Database applications

1. Tough Password protection
2. Access privilages to different users

Spreadsheets

1. Alter column size
2. Insert/delete rows/columns
3. Provide lookup and other functions
4. Fill down (replicate) formula options, for relative & absolute reference.
5. Ability to easily convert data into outstanding statistical presentations

Graphic Applications / DTP

1. Layering of graphics
2. Graphic filters to apply to image
3. Ability to take addons/plugins made by other vendors (Photoshop)
4. Range of Colour palettes including RGB CMYK
5. Print Review

Macro: The integration of a series of commands into a single command or the ability to program within the application. Used for automating a common sequence of actions or extending scope of application.

Specific Packages: These consist of only a specific function, such as "Microsoft Notepad" - used for typing text.

Generic Packages: These consist of a number of functions of other packages. For example Microsoft Word 97 has the ability to insert tables, which may be considered a characteristic of another package.

Batch Processing

Past Paper Questions

 

1. Many advertisements describing software now mention rge inclusion of macro facilites.

(i). What is a macro?
(ii). What is it's purpose?

(i) Answer
(ii) Its purpose is to automate a common sequence of instructions/ extend the scope of an application.

2. A program under development includes a routine to enter a date, in the format DDMMYY, and check that it is valid. Give, with reasons, four items of data that you could use to test this routine.

(i) Answer

3.

(i). Describe the process of linear (serial) search of a file, including how the absence of a record will be detected.
(ii). Explain how the process can be improved if the records are stored in search key order.

(i). ASSUME THE THE FILE IS NOT SORTED HERE!! The data set is searched in sequential order from the beginning. Each item is compared with the search value. The search can be abandoned if: the item is found or the end of the file is reached.
(ii). The search can be abandoned if: The item under examination has a higher value that the search item.

ref here

Notes: They tried to cop out students, as some students assume that a linear file HAS to be sorted. It doesn't!

4. A mailorder company has been in business for 10 years & has built up a computerised database of around 100,000 customers. It wishes to extend the facilites of its system & modernise the existing software. The original software authors are no longer available.

Describe 3 different stratergies that the company could adopt in modernising & extending its computer software.

The usuall scenario followed by the question....

1. Hire analysts & programmers & develop in-house.
2. Commision the project to Software House.
3. Use commercial of-the-shelf package.
4. Develop/adopt system on commercial framework.

phew.... I cant be bothered to carry on man... I'm tired.... anyway... check out the NEAB HOMEPAGE for past paper questions & answers.

(C) Copyright 1999. Wajid. Any literature found at this site MAY NOT be reproduced partially or in whole without my prior written consent.