You are on page 1of 22

Computer Pioneers

Computer Ace Computer Studies O level

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

This pamphlet incorporates the latest changes in the syllabus and should be used as additional teaching material for the Computer Pioneers Computer Ace course.

V4.0

August 2011

Page 2 of 22

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

1.

System Analysis and Design (Chapter 6) ........................................................................... 4 1.1. Data Flow Diagrams (New Symbols) ........................................................................ 4 1.2. Action Plans ............................................................................................................ 5 PERT (Project Evaluation and Review Technique) ......................................................... 5 Gantt Charts ........................................................................................................... 6 Critical Path Analysis ............................................................................................... 7 1.3. Testing (Chapter 6 Section 3. Systems Implementation) ......................................... 8

2. 3. 4.

Algorithm Design and Programming Concepts (Chapter 8) .................................................. 9 2.1. For Next loop ....................................................................................................... 9 Video conferencing.........................................................................................................10 Logic Gates and Circuits .................................................................................................12 4.1. Introduction to Logic Gates ...................................................................................... 12 4.2. Truth Tables .......................................................................................................... 13 4.3. Combination of Logic Gates ..................................................................................... 16 4.4. Designing a Simple Logic Network ............................................................................ 19

V4.0

August 2011

Page 3 of 22

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

1. System Analysis and Design (Chapter 6) 1.1. Data Flow Diagrams (New Symbols)

DFD is a pictorial representation that shows the flow of data in a system. It shows the interaction between the entities and system. The symbols used for DFD are:

Process

This symbol is used to represent a process within the system.

This symbol is used to represent an Entity that Entity interacts with the process

Data Store

This symbol is used to represent a data store/file used in the system.

Arrows show the flow of data in the system. Data Flow

V4.0

August 2011

Page 4 of 22

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

1.2.

Action Plans

PERT (Project Evaluation and Review Technique)


PERT is a project management tool that is used to show and analyse the tasks involved in a project. It shows the flow of dependent tasks that must be followed in order to complete the project. PERT charts are used to handle large projects where analysis of task and time allocation is of great importance. They were originally developed in 1950s. The steps used in PERT chart planning are: 1. Identification of activities involved in the project 2. Analysing the sequence of flow of dependencies 3. Developing a network diagram for the above identified activities 4. Estimating the time for each activity identified in Step 1 5. Determining the critical path for the set activities. 6. Updating the PERT chart as the project activities continue Benefits of PERT Ability to identify the expected project completion time Shows the activity start and end dates Helps to identify the probability of completion of tasks before a specified date Shows the critical path activities that directly impact the completion time Shows the activities that have slack time and could lend resources to critical path activities in order to complete the project Activity Symbol
Duration of the activity

Earliest Start time of an activity

Earliest finish time of an activity Task name Latest finish time of an activity

Latest Start time of an activity

Slack time

PERT charts are created using series of boxes as shown above. Each box represents an activity or a task.
V4.0 August 2011 Page 5 of 22

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

Example

Duration Earliest Start Earliest Finish

In the above example, there are 2 activities, A and C. Activity A must be completed before Activity C begins. Activity A requires 5 days and Activity C requires 4 days. Therefore this part of the project will require 9 days in total.

Gantt Charts
A Gantt chart is a pictorial representation that illustrates a project schedule. It shows all the tasks and resources needed to complete a project. It is a project management tool that helps to show planned work targets. Example: A Gantt chart for a simple project is given below. The project has 5 tasks. Each task has been allocated the number of days required to complete it.

V4.0

August 2011

Page 6 of 22

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

In this example, Task 1 (Analyse data) requires 5 days, Task 2 (Design the product) requires 12 days and so on. Task 2 can start after 4 days of work of Task 1 and other activities will follow according to the scheduled start dates. Critical Path Analysis When planning a project, we want to know how long will the project take. When will we be able to start a particular task? If this task is not completed on time, will the entire project be delayed? Which tasks should we speed up in order to finish the project earlier? Critical Path Analysis (CPA) is a pictorial representation for scheduling activities within a project. It helps to determine the time required to complete a project and shows which activities are critical and which are not. The Critical Path is the route through the CPA, which has no idle time in any of the activities. In other words, if there is any delay to any of the activities on the critical path, the whole project will be delayed The total time along this critical path is also the minimum time in which the whole project can be completed.

V4.0

August 2011

Page 7 of 22

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

Example

In this example, there is a clear sequence of events that have to happen in the right order. If any of the events on the critical path is delayed, then the project cannot be completed on time. Task A-C-F takes 3 + 1 + 3 = 7 weeks Task A-D takes 3 + 2 Task B-E takes 4 + 2 = 5 weeks = 6 weeks

Task A-C-F is said to be the critical path as if it is delayed the entire project would be delayed.

1.3.

Testing (Chapter 6 Section 3. Systems Implementation)

There are three general categories of test data:

Normal data:
Valid data in a range that the system is able to handle.

Extreme data:
Valid data at the highest or lowest value that can be accepted for a variable.

Abnormal data:
Invalid data that should be rejected by the system. Example 1: In the context of numbers within the range of 1 to 200: 1. Normal data: Any number between 1 and 200 2. Extreme data: Both 1 and 200, the maximum and the minimum values 3. Abnormal data: Any number outside the range 1 to 200, any negative number, any alphabetic character or other symbol/character

V4.0

August 2011

Page 8 of 22

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

Example 2: In the context of an alphabetic value: 1. Normal data: Any letter between a and z 2. Extreme data: Both a and z 3. Abnormal data: Any number or any other symbol/character Example Test Case
Field Customer Number Abnormal : -2A Extreme : 9999 System rejects System accepts System rejects System accepts Data type Numeric 4 Normal : 24 Length Test Data Expected Result System accepts System accepts Actual Result

2. Algorithm Design and Programming Concepts (Chapter 8 Section 5. Pseudocodes - Repetition Control Structure)
As you have already learned, a repetition control structure has a repetition loop that will end when the condition is false. In addition to the Repeat Until and While Do Endwhile structures, the For Next loop is also a repetition structure.

2.1.

For Next loop

Example 1 Write an algorithm using pseudocode to input 5 numbers and display them. Use a For Next loop. For x = 1 to 5 Input x Print x Next x

V4.0

August 2011

Page 9 of 22

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

Example 2 Write an algorithm using pseudocode to print 5 * and display them. Use a For Next loop. For x = 1 to 5 Print * Next x Example 3 Write an algorithm using pseudocode to input 25 marks. If mark greater than 50, it should display Pass or otherwise display Fail. Use a For Next Loop. Start Define variable x, mark For x = 1 to 25 Input mark If (mark > 50) then Display Pass Else Display Fail End if Next x

3. Video conferencing
Video conferencing is a communication technology which is also known as video teleconferencing. This allows users to communicate in two or more locations via video and audio transmissions simultaneously (i.e. moving pictures and sound). This facility can be used whenever a live conversation is needed where the people involved cannot physically come to the same location for the meeting. Another consideration resulting in the utilise to travel to a meeting.
Figure 7.8 Video conferencing

use of video conferencing could be the expenses or the time that a person would have to

V4.0

August 2011

Page 10 of 22

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

Basic requirements needed for this facility: Video camera or Webcam Computer monitor or television Microphones Speakers, display device or telephone Data transfer telephone network, LAN or internet

Due to the availability of high speed internet connection with better images at a reasonable cost, more people can afford to use this facility nowadays. Reasons for the popularity of video conferencing: Reduces cost - money is saved on travelling, accommodation, costs of lost time whilst employees are out of the office, etc.). Less impact on the environment (e.g. less traffic) Flexibility ability to call off a meeting at short notice, workers can work from home, etc. Allows staff around the world to see and interact with each other more personal than only hearing the voice Applications of video conferencing: Education Distance learning programmes, virtual field trips Business - Meetings on short notice Media Live press conferences Health and Medicine transmit data about a patient to another doctor for specialist advice etc.

V4.0

August 2011

Page 11 of 22

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

4. Logic Gates and Circuits 4.1. Introduction to Logic Gates


A computer is an electronic device which can solve problems by accepting data, performing various operations with the data, and supplying the desired output. The operations performed by the computer can be divided into two categories; arithmetic operations and logical operations. The central processing unit (CPU) in the system unit carries out all of these operations. The central processing unit has a highly complex, extensive set of electronic circuitry that executes stored program instructions. Have you ever wondered how a computer carries out its operations? In order to find the answer to this question, you need to understand something called Boolean algebra.

Algebra is a part of mathematics in which signs and letters represent numbers. Boolean algebra is used as the basis of computer operations. This was developed by an English mathematician called George Boole in the mid-nineteenth century.

Boolean algebra deals with binary variables and logic operations. Boolean variables can have only two values, 0 or 1. Logic gates process signals which represent true or false. Some common representations of logic operations are: 0 False Off Low No / / / / / 1 True On High Yes / Close Switch

Open Switch

V4.0

August 2011

Page 12 of 22

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

Logic Gate Symbols


The following are the five main logical operators used in Boolean algebra: Simple graphical representations MIL symbols used to represent logic gates

NOT

AND

OR

NAND

NOR

4.2.

Truth Tables

A truth table is used to show how the logic gate functions.

NOT Operator
This logical operator is different from the rest as it normally has only one operand/input. A 0 1 X (NOT A) 1 0

NOT

Note that NOT simply reverses the truth-value of its operand.


V4.0 August 2011 Page 13 of 22

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

AND Operator

A B X A 0 0 A AND X 1 1 B 0 1 0 1 X (A AND B) 0 0 0 1

Can you see that X (A and B) is true only when both A and B are True? It is false when at least one of A and B is false.

OR Operator

A B X

A 0 0 1 1

B 0 1 0 1

X (A OR B) 0 1 1 1

OR

Can you see that X (A OR B) becomes true when at least one of A and B is true? It is false when both A and B are false. A simple expression has only one operator. The examples above are simple Boolean operators. Expressions can also have more than one operator and these are known as compound expressions. Now we are going to derive truth tables for some compound Boolean expressions.

V4.0

August 2011

Page 14 of 22

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

NAND (AND & NOT) Operator

A A X B 0 0 1 A
NAND

B 0 1 0 1

A AND B 0 0 0 1

NAND X 1 1 1 0

First values for A AND B were derived. Then the NOT operator was applied. You can derive truth tables for compound Boolean expressions in stages as shown above.

NOR (OR and NOT) Operator

A A B X 0 1 A NOR X 1 0

B 0 1 0 1

A OR B 0 1 1 1

NOR X 1 0 0 0

First apply the OR operator to variables A and B. Then apply the NOT operator to the result from the OR operator.

V4.0

August 2011

Page 15 of 22

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

4.3.

Combination of Logic Gates

Two or more logic gates can be combined in order to develop a more complex logic network. Look at the following example. This contains two inputs (A, B) and two logic gates: A
AND

NOT

To draw the truth table for the above logic circuit, we need to identify the number of combinations. There are two inputs (A, B). Therefore, number of combinations of 1s and 0s would be 22=4. To derive the output of P we need to refer to the output of B. A 1 1 0 0 B 1 0 1 0 P (NOT B) 0 1 0 1 X (P*A) 0 1 0 0

Now lets consider three inputs (A, B, C) and three logic gates: A B

OR AND

NOT

A B C X

V4.0

August 2011

Page 16 of 22

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

We begin by identifying the number of combinations. There are three inputs (A, B, C). Therefore the number of combinations of 1s and 0s would be 2 3=8. Now we look at the outputs produced at P and Q and construct the 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

P 0 1 0 1 0 1 0 1

Q (P * B) 0 1 0 0 0 1 0 0

Now the final output (i.e. Q OR A)

A 1 1 1 1 0 0 0 0

Q 0 1 0 0 0 1 0 0

X 1 1 1 1 0 1 0 0

V4.0

August 2011

Page 17 of 22

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

Exercise
Draw the truth tables for the following logic gate circuits. 1. A NOT OR AND B X

2. A NOT OR AND B NOT X

3. A NOR AND X

NOT

V4.0

August 2011

Page 18 of 22

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

4.4.

Designing a Simple Logic Network

Consider the following statement: If A and B are on, then the lights will be on. In order to convert this on to a logic gate, lets consider 1=ON and 0=OFF. If A=1 AND B=1 then X should be =1. Now lets draw the logic network.

A B

Once the logic circuit is drawn, we can then test it by drawing the truth table. A 1 1 0 0 B 1 0 1 0 X (A*B) 1 0 0 0

Remember X should be ON only when A and B both are ON. The truth table shows us that the above logic circuit is correct.

V4.0

August 2011

Page 19 of 22

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

Now lets consider another problem. If A AND B are on AND if C is on, then the lights will be on. This means: If (A=1 AND B=1) AND C=1 then X=1 To draw the logic circuit, lets first consider the part written in brackets (i.e. A=1 AND B=1) which is one gate. A B P

Then we move on to the next gate (i.e. P=1 AND C=1), which again is an AND gate. P C X

Now lets combine both the gates, and draw the truth table. A B C

A 1 1 1 1 0 0 0 0

B 1 1 0 0 1 1 0 0

P (A*B) 1 1 0 0 0 0 0 0

C 1 0 1 0 1 0 1 0

X (P*C) 1 0 0 0 0 0 0 0

V4.0

August 2011

Page 20 of 22

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

Test and Review


Q1
Draw the truth tables for the following Logic gate circuits. 1. A B NOR NAND X

2. A
AND NOT NOR

B
NAND

OR

3.

A B C D

NOR NOR NOR

V4.0

August 2011

Page 21 of 22

Computer Ace Computer Studies O Level

NCC Education Computer Pioneers

Q2
Produce a simple logic network and the truth table for these statements. 1. If button A or button B are on and button C is off, then the alarm X is on. 2. A stadium has 3 entrances (A, B and C). A system is created which makes an alarm X sound each time a door opens. 3. A nuclear plant gives out a warning signal (X = 1) when a process goes wrong. A logic network is used to provide input and to decide whether X=1 or not. See the table below. Input A B C Binary Value 1 0 1 0 1 0 Plant Status Temperature>=125C Temperature<125C Pressure>= 160Pounds/Sq Inch Pressure< 160Pounds/Sq Inch Chemical Rate = 10 m3/s Chemical Rate < 10 m3/s

A warning signal (X=1) will be generated if: Either Temperature>=125C (i.e. A=1) or Temperature>=125C (i.e. A=1) and Pressure< 160Pounds/Sq Inch and Chemical Rate < 10 m3/s (i.e. B and C are both 0)

V4.0

August 2011

Page 22 of 22

You might also like